Repository navigation
Description
Since I run the Trilium server instance in my home network, most of the time I can access it directly through local IP instead of making a detour via the internet through a secure Cloudflare Tunnel (OAuth SSO) using the external hostname that I can use for seamless access when out of my known networks and not logged in to a VPN.
As Trinote already has some connection statistics/details in settings, without looking at the code I'd assume it'd be pretty straightforward to add new functionality, settings for the Internal URL, and possibly renaming existing URL to External URL like shown below. App then chooses which URL to use to communicate with the server, based on the SSID the device is connected to (if any) and using External URL by default. Configuring Internal URL would be optional of course and if it isn't configured, then always use the external URL.
Home Assistant Companion App does this exact thing already. It is intuitive and also works great. (Two server configuration screens attached. HA allows multiple SSIDs to be set for the internal URL, but even just one would be really nice.)
P.S. As an added functionality there could maybe even be a separate option toggle to use internal URL also if a VPN is active. Apparently one can use NWPathMonitor to detect it (albeit one commenter said that it could be against Apple's policies). But at least for me this would only be the sprinkles on top of a huge sundae that the ability to use separate URLs itself would be.
Home Assistant Companion App screenshots
Screenshot 1
Home Assistant allows multiple servers configured, here are the settings to my only server called "Home" (Device name is the configured name the Companion App uses for my iOS device, that is used in HA sensors/automations/etc - so that propably isn't relevant for Trinote).
Screenshot 2
Here I've clicked on the Internal URL row on the previous screen. SSIDs are just strings that are then used by the internal logic to string match connected WLAN name. External URL opens the same kind of editing screen, with only the URL section shown (can't remember how the onboarding/adding a server works in this regard).

Activity
StephenArg commentedon Apr 27, 2026
Is this a feature that Trilium even natively supports? It may be a bit too niche for me to address rn in the UI.
You can probably just remove the external domain name on the public url and type the local ip instead if you want to access it locally. Just remember, technically, any shared Trilium notes are publicly accessible if the link gets out.
StephenArg commentedon Sep 3, 2026
@geekuality Hey, I'm looking back at this. Is this still something that's needed?
Does swapping in the local ip address allow you to access the shared note locally still?
If manually swapping in the local IP doesn't work, wouldn't this be a trilium feature to allow for local IP to resolve the correct note?
deftdawg commentedon Sep 14, 2026
I actually wanted to use this with a tailscale address for my Trilium server. I usually only turn tailscale on when I want to access something from my home network because I have concerns about battery drain and DNS routing getting messed up.
Tried
Account->Add Instance-> adding my tailscale server address w/ Trilium port, however attempting to add it crashed Trinote.StephenArg commentedon Oct 27, 2026
I can look into this for the next release. (Next few weeks probably)
StephenArg commentedon Nov 28, 2026
Sorry for the delay, this didn't make it into the last few releases. Here's where it stands.
@deftdawg 1.24.2 should already help with your Tailscale setup. When your phone is online but the server can't be reached (VPN off), the app now works from its cache, queues your edits, and syncs once the server answers again. The add-server screen has also been rebuilt since you reported the crash. Could you try adding your Tailscale address again on the latest version and let me know if it still crashes?
@geekuality Internal URL is still planned. My current idea is an optional second URL per server that the app tries first, switching to the external URL if it doesn't answer within a couple of seconds. That would work on your home Wi-Fi and over a VPN, and the app wouldn't need location permission, which iOS requires before an app can read the Wi-Fi network name. Would that work for you, or do you need it tied to specific SSIDs like Home Assistant does?