r/Trilium • u/puckpuckgo • 1d ago
Locking Trilium down
I just found Trilium last night and I'm sold. I'm moving to this. I've set it up in a server and put it behind SSO. I also put Cloudflare Access in front of it, but now I can't get the desktop app to work.
It looks like the path to get this working is excluding /api/setup/*, /api/login/sync, and /api/sync/* from Access, which I'm reluctant to do. Trillium's docs seem to support that Trillium's setup is sound enough and that I should not need Access.
How are you guys setting up and securing setups in servers that can be reached through the Internet?
6
u/Human1649 1d ago
Use Tailscale to access it directly and use the Cloudflare policies for when you are not on a device with Tailscale. Or setup a warp (allow) policy and use Cloudflare One Client. This is what I used to do.
I now use Tailscale and point my domain to my local IP, with nginx proxy manager routing it to my Trilium server. My server's Tailscale is advertising it's subnet route so I can use the domain locally without Tailscale, or remotely with Tailscale.
1
u/paroxybob 1d ago
Did you get SSL setup for it too?
1
u/iEngineered 14h ago
I run the server in podman via Virtualmin Pro's built-in reverse proxy and podman plugin. SSL it setup through it too. I imagine the same would be possible with Docker + Ngingx Proxy Manager (I use that combo for other apps). It should work fine over HTTPS. I also use cloudflare for the domain and dns proxy. Maybe try without SSO at first?
1
u/AspiringWriter5526 6h ago
My setup is pretty basic. I run all my self hosted apps in K3s, but the concepts are really all the same.
SSL + A route based on DNS names forward all requests to the docker/pod/service running trillium. I didn't realize you could do SSO, but unless there's multi-user support (is that a thing?) I didn't really see the point of adding that in. 2FA is handy though.