What type of hardware are you using: Raspberry Pi 3, 4+ What YunoHost version are you running: 12.0.16 How are you able to access your server: The webadmin Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: No
Describe your issue
I am connecting to my Yunohost instalation in a home Rasperberry Pi using Tailstcale magicDNS (eg. “raspberrypI[DOT]bird-tail[DOT]ts[DOT]net”). I currenty have 2 apps installed in Yunohost (eg. “app1” and “app2”).
I have added the “raspberrypi[DOT]bird-tail[DOT]ts[DOT]net” domain in Yunohost admin and I can reach it via this tailscale address but I need a way to access directly each of the apps.
I have tried adding a prefix to the subdomain (“app1[DOT]raspberrypi[DOT]bird-tail[DOT]ts[DOT]net” and “app2[DOT]raspberrypi[DOT]bird-tail[DOT]ts[DOT]net”) but I don’t know how to make yunohost redirect these requests to the corresponding apps.
Thanks for reaching out. I have already tried both: #1 is not possible because the apps require to be installed in the domain root (grist and n8n) and I tried #2: the app is apparently moved to that sub-sub-domain but the app is not found afterwards. I am not sure if I need to change something in Yunohost or Tailscale but Tailscale finds Yunohost admin. And if I install one app to the same Tailscale domain (without “app1”) the app does work. But that means I can only have one app running. Bottomline: I think it is a redirecting issue that I need to address in Yunohost.
It seems that ‘‘domain name’’ means ‘‘hostname+tailsdomain.tld’’. So you can reach main domain but no others. Can you set a ‘‘custom’’ DNS in tailscale?
Thanks for the suggestion. Will check it out asap, meawhile, got it working with PiHole (I’ll post the how-to) because I have it already installed and been using it for a few years.
Basically I’ve added a custom nameserver in Tailscale admin pointing to the machine where I had PiHole running (100.x.x.x). Then, in PiHole admin I added Local DNS records (app1.local, app2.local) and pointed them to the IP of the other machine hosting Yunohost (100.x.x.x).
Then, in Yunohost admin / Apps, I’ve chosen to serve each app from the respective local domain (app1.local, app2.local).
Now, using Tailscale, I can reach each Yunohost app and get ad blocking. Each DNS query goes to PiHole, gets blocked for ads, and then checked if it should resolve to a local machine (i.e. the apps installed in Yunohost) or the broader internet.
Great that you could solve it! just be aware that PiHole won’t have updates in Yunohost, and also I don’t know if you managed to use self-signed certs in case you need https, in that case it’s always a good idea to use “.internal” instead of “.local”
Folowing this topic I got into another problem which I have been trying to solve but with no luck, and I don’t know if its a configuration issue I should tackle in Yunohost, in Tailscale or in n8n app inside Yunohost.
Problem is: i have Grist running on grist.local and n8n running on n8n.local addresses. I can reach both from inside my home network and away from it using Tailscale. Tailscale is using my DNS resolver from my raspberry pi, which is running the resolver via PiHole.
What I am trying to do: backup my grist databases with n8n, saving them to a nextcloud instance hosted online. For that I am doing an http request in n8n using the address n8n.local but that address can’t be found. I think it may be due to it being .local and having some limitations on that aspect.
An alternative I have tried was to use my Tailscale tailnet DNS name, eg. consider it being “tail-name”). I can make Grist in yunohost use the domain “yunohostMachine[dot]tail-name[dot]ts[dot]net” and it will open fine. Or I can use n8n use the exact same address and it works fine. But I need to separate them adding a prefix, for example:
And yet again solved it after digging into Yunohost nginx config.
Turns out grist was using port 8485 instead of default 8484 because I had a previsous instalation that used 8484. As such, one of my earlier attemps failed since I was using the wrong port.
Solution was to fetch grist data via http request using localhost:8485.