aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/book/src/getting_started/daemon.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/book/src/getting_started/daemon.md b/doc/book/src/getting_started/daemon.md
index 0f0199fe..7c303c6a 100644
--- a/doc/book/src/getting_started/daemon.md
+++ b/doc/book/src/getting_started/daemon.md
@@ -186,3 +186,36 @@ Please note that we use host networking as otherwise Docker containers can no co
To upgrade, simply stop and remove this container and start again the command with a new version of garage.
### For systemd/raw binary users
+
+Create a file named `/etc/systemd/system/garage.service`:
+
+```toml
+[Unit]
+Description=Garage Data Store
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+Environment='RUST_LOG=garage=info' 'RUST_BACKTRACE=1'
+ExecStart=/usr/local/bin/garage server -c /etc/garage/config.toml
+
+[Install]
+WantedBy=multi-user.target
+```
+
+To start the service then automatically enable it at boot:
+
+```bash
+sudo systemctl start garage
+sudo systemctl enable garage
+```
+
+To see if the service is running and to browse its logs:
+
+```bash
+sudo systemctl status garage
+sudo journalctl -u garage
+```
+
+If you want to modify the service file, do not forget to run `systemctl daemon-reload`
+to inform `systemd` of your modifications.