aboutsummaryrefslogtreecommitdiff
path: root/doc/book/src
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-03-17 20:04:27 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-03-17 20:04:27 +0100
commit44d0815ff98b72cd4f23b41ab6c87a867a392815 (patch)
tree1c9a8238f97583c5e177c9a4f57b4ffb83b9e630 /doc/book/src
parent468e45ed7f47ce41f196274519c6b59f3bf46f0e (diff)
downloadgarage-44d0815ff98b72cd4f23b41ab6c87a867a392815.tar.gz
garage-44d0815ff98b72cd4f23b41ab6c87a867a392815.zip
Wrote daemon
Diffstat (limited to 'doc/book/src')
-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.