Open sascha-wi opened 4 months ago
I assume the error lies somewhere here: Environment=ATUIN_CONFIG_DIR=/etc/atuin ReadWritePaths=/etc/atuin
What do I need to set these variables to when I install atuin through cargo? Can you please update your self-hosting documentation?
@sascha-wi I got this working, but it was a bit of a mess.
I installed atuin using the install script with my normal user (on a ubuntu headless server in my homelab) which dropped the atuin binary into the ~/.atuin/bin
directory, which is not at all helpful for getting the server going.
So, I was getting the same error you are seeing above. To get this thing to run I had to:
/etc/sysusers.d/atuin-server.conf
for systemd to have a system user in place to use. Here I had to create the /etc/sysusers.d
dir with root user as well. /etc/atuin
directory/etc/atuin
directory so it was owned by the atuin
system user I just created (otherwise systemd chokes on bad permissions)cp
the atuin binary to a path found in $PATH
so systemd can run it. I used /usr/local/bin
but really it is dealer's choice (pick something logical from echo $PATH
). It didn't matter if the copied binary was owned by root or atuin
user, but I found if you instead attempted to created a symlink with ln -s
of the binary the permissions with the atuin
user would still throw a permission denied
in journalctl -u atuin-server.service | tail -20
. I am thinking this might be by design with systemd (or the hardening settings in the .service file), but I don't care to figure it out.sudo systemctl start atuin-server
, which still failed, but it creates the /etc/atuin.server.toml
file for you now.server.toml
file with the appropriate values for postgres and all that and the sucker started up on the next sudo systemctl restart atuin-server
call. Basically, the documentation needs to be updated to outline the process here (or something that at least alerts users to the nuances of running your own sync server as a systemd service).
I can do that if the admins want me to (I don't remember if this is FOSS/licensed for contributors, but I am guessing that it is).
Wow what a hassle, I got i working with your instructions. Would be really nice if somebody can edit the documentation.
Glad to hear you got it running. If I find time this month I might sniff around and see if I can bother to do this.
What did you expect to happen?
Easy to set up atuin self-hosted server
What happened?
When starting the server it gives gibberish error:
(atuin)[38065]: atuin-server.service: Failed at step NAMESPACE spawning atuin: No such file or directory (atuin)[545]: atuin-server.service: Failed to set up mount namespacing: /run/systemd/unit-root/etc/atuin: No such file or directory
Atuin doctor output
Code of Conduct