How to run trilium as rootless on server #8342
Replies: 3 comments 1 reply
-
|
Hi @podhorsky-ksj! I'm Dosu and I’m helping the Trilium team. To run Trilium rootless on a server with Podman Quadlet, you should use the rootless image (triliumnext/trilium:rootless or build it locally if not available). The standard image expects root privileges for UID/GID changes and will fall back to UID 1000 if you set USER_UID=0, causing permission mismatches with your host data directory. Running as root (UID 0) or using su inside the container is not supported in rootless mode and will fail or cause the data to be owned by the wrong user source. Here's what works:
This approach avoids root, aligns permissions, and works with Podman’s rootless defaults. If you hit permission errors, double-check the UID/GID on both host and container, and check logs for EACCES or ENOENT errors. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
I have issue with the build: |
Beta Was this translation helpful? Give feedback.
-
|
I also tried to get this working on Podman and ran into the same issues: when running Trilium Notes' container with my user in ~/.config/containers/systemd, even if I have I tried running rootful Podman changing to As I understand from your post, the fix would be some access or option to change the user running the data directory within the container. I wonder if there is a way for Podman to map all users (not just root) running within the container to a desired one on the host system. Edit: I somehow managed to get rootful Podman working with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
how to run trilium as rootless?
this manual seems to be outdated
https://docs.triliumnotes.org/user-guide/setup/server/installation/docker
I'm trying to run it on podman quadlet
But even this is not proper way. this is working, but /data are still under user node (uuid 1000), not under root, so they will show under different user than host user on host
When I try another uid and guid than 0, e.g. 1000 like the node, it will fail, bacause it doesn't have su priviledges.
Beta Was this translation helpful? Give feedback.
All reactions