Automatic URL Switching works on my phone but not my wife's
Both devices are Android (Mine is OnePlus13R, my wife has the Pixel 7)
I have setup a public domain that we can all access from outside our home network, and it works with no problems. I have also setup a local DNS and made a rewrite using AdguardHome for the local IP routing traffic from hpe.home.lan to 192.168.0.192
In both devices I have provided location access to the application + precise location + disabled Private DNS
In both devices I have enabled Automatic URL Switching and have provided the exact same name for the Wi-Fi and the DNS for the local connection (http://hpe.home.lan:2283 It is also worth mentioning that I have tried with the IP of the NAS directly instead of the DNS record, to no avail)
In both devices I have configured on the bottom the server list and I have added one record, and that is the public domain: https://ptohos.whatever.eu
When on my phone if I switch off my mobile data and I am only connected to Wi-Fi and i restart the immich app I check the settings and see that I am connected via the local DNS, and when I turn off my Wi-Fi and use only mobile data I see that the app is using the public domain after restarting the app.
The same thing does NOT happen on my wife's Pixel 7. When I switch on the Wi-Fi and restart the app I see that I am still connected to the public domain instead of the local one. In the logs from the application I could not find any errors even after I cleared them and tried again. I only see a few logs, one of them says Resuming connection to public DNS.
So my questions:
How do I enable Automatic URL switching on my wife's phone?
How the hell is it working on my phone? I did not import any certificates that I have manually trusted.
5 Replies
:wave: Hey @Hristakis,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.As I was checking the log message I noticed an error that I have not seen before, I tried to setup the switching with the IP directly like http://192.168.0.192:2283 And again it did not connect, so I went for some coffee. After about 10-15 minutes later I got this error, however I lost the exact text but it was something like, failed SSL connection to http://192.168.0.192:2283/
So I started googling, and I guess I don't have an SSL certificate for hpe.home.lan. Could that be the issue?
If you have a public domain why don’t you just.. use that domain at home?
Seems like you’re trying to solve the wrong problem here. You should set a local DNS entry for your domain to resolve to your proxy, or use hairpin NAT
I have a limit of 100Mb per file from Cloudflare, so I wanted to avoid that until batching is introduced if ever 🙂
Right so last night what I ended up doing was just deploying my own nginx in docker, and providing a local docker network for nginx as well as immich, I also changed OMV's Workbench to be on a port different then 80/443 and in nginx I added a proxy host that has a destination of the immich container with port 2283, as well as I added an SSL certificate via Let's Encrypt by specifying my provider was Cloudflare (I got a new API token from Cloudflare) and finally I added a rewrite in my AdGuard Home to forward all request from https://ptohos.whatever.eu/ to point to the local IP address of the OMV server, so that nginx can proceed to handle the requests.
And voila, now locally by accessing the same domain I skip the whole Cloudflare tunnel, outside access still works.
I didn't want to mess with all that because I was afraid of braking something with the networking I already set up, and I am not a pro in that region for sure.
This thread has been closed. To re-open, use the button below.