Systemd
First, create the service unit file
atuin-server.service
at
/etc/systemd/system/atuin-server.service
with contents like this:
[Unit]Description=Start the Atuin server syncing serviceAfter=network-online.targetWants=network-online.target systemd-networkd-wait-online.service
[Service]ExecStart=atuin server startRestart=on-failureUser=atuinGroup=atuin
Environment=ATUIN_CONFIG_DIR=/etc/atuinReadWritePaths=/etc/atuin
# Hardening optionsCapabilityBoundingSet=AmbientCapabilities=NoNewPrivileges=trueProtectHome=trueProtectSystem=strictProtectKernelTunables=trueProtectKernelModules=trueProtectControlGroups=truePrivateTmp=truePrivateDevices=trueLockPersonality=true
[Install]WantedBy=multi-user.target
This is the official Atuin service unit file which includes a lot of hardening options to increase security.
Next, create atuin-server.conf
at
/etc/sysusers.d/atuin-server.conf
with contents like this:
u atuin - "Atuin synchronized shell history"
This file will ensure a system user is created in the proper manner.
Afterwards, run
systemctl restart systemd-sysusers
to make sure the file is read. A new atuin-server
user should then be available.
Now, you can attempt to run the Atuin server:
systemctl enable --now atuin-server
systemctl status atuin-server
If it started fine, it should have created the default config inside /etc/atuin/
.