(((meta (@ (content . "Installation of Zettelstore on a server") (name . "title"))) (meta (@ (content . "manual") (name . "role"))) (meta (@ (content . "#installation #manual #zettelstore") (name . "tags"))) (meta (@ (content . "zmk") (name . "syntax"))) (meta (@ (content . "00001003000000 00001003315000") (name . "back"))) (meta (@ (content . "00001003000000 00001003315000") (name . "backward"))) (meta (@ (content . "1") (name . "box-number"))) (meta (@ (content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta (@ (content . "20211125191727") (name . "created"))) (meta (@ (content . "en") (name . "lang"))) (meta (@ (content . "EUPL-1.2-or-later") (name . "license"))) (meta (@ (content . "20211125185833") (name . "modified"))) (meta (@ (content . "20211125185833") (name . "published"))) (meta (@ (content . "public") (name . "visibility")))) (p "You want to provide a shared Zettelstore that can be used from your various devices." " " "Installing Zettelstore as a Linux service is not that hard.") (p "Grab the appropriate executable and copy it into the appropriate directory:") (pre (code (@ (class . "language-sh")) "# sudo mv zettelstore /usr/local/bin/zettelstore")) (p "Create a group named " (kbd "zettelstore") ":") (pre (code (@ (class . "language-sh")) "# sudo groupadd --system zettelstore")) (p "Create a system user of that group, named " (kbd "zettelstore") ", with a home folder:") (pre (code (@ (class . "language-sh")) "# sudo useradd --system --gid zettelstore \\\n --create-home --home-dir /var/lib/zettelstore \\\n --shell /usr/sbin/nologin \\\n --comment \"Zettelstore server\" \\\n zettelstore")) (p "Create a systemd service file and store it into " (kbd "/etc/systemd/system/zettelstore.service") ":") (pre (code (@ (class . "language-ini")) "[Unit]\nDescription=Zettelstore\nAfter=network.target\n\n[Service]\nType=simple\nUser=zettelstore\nGroup=zettelstore\nExecStart=/usr/local/bin/zettelstore run -d /var/lib/zettelstore\nWorkingDirectory=/var/lib/zettelstore\n\n[Install]\nWantedBy=multi-user.target")) (p "Double-check everything. Now you can enable and start the zettelstore as a service:") (pre (code (@ (class . "language-sh")) "# sudo systemctl daemon-reload\n# sudo systemctl enable zettelstore\n# sudo systemctl start zettelstore")) (p "Use the commands " (code (@ (class . "language-sh")) "systemctl") " and " (code (@ (class . "language-sh")) "journalctl") " to manage the service, e.g.:") (pre (code (@ (class . "language-sh")) "# sudo systemctl status zettelstore # verify that it is running\n# sudo journalctl -u zettelstore # obtain the output of the running zettelstore")))