(BLOCK (PARA (TEXT "You want to provide a shared Zettelstore that can be used from your various devices.") (SOFT) (TEXT "Installing Zettelstore as a Linux service is not that hard.")) (PARA (TEXT "Grab the appropriate executable and copy it into the appropriate directory:")) (VERBATIM-CODE (("" . "sh")) "# sudo mv zettelstore /usr/local/bin/zettelstore") (PARA (TEXT "Create a group named ") (LITERAL-INPUT () "zettelstore") (TEXT ":")) (VERBATIM-CODE (("" . "sh")) "# sudo groupadd --system zettelstore") (PARA (TEXT "Create a system user of that group, named ") (LITERAL-INPUT () "zettelstore") (TEXT ", with a home folder:")) (VERBATIM-CODE (("" . "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") (PARA (TEXT "Create a systemd service file and store it into ") (LITERAL-INPUT () "/etc/systemd/system/zettelstore.service") (TEXT ":")) (VERBATIM-CODE (("" . "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") (PARA (TEXT "Double-check everything. Now you can enable and start the zettelstore as a service:")) (VERBATIM-CODE (("" . "sh")) "# sudo systemctl daemon-reload\n# sudo systemctl enable zettelstore\n# sudo systemctl start zettelstore") (PARA (TEXT "Use the commands ") (LITERAL-CODE (("" . "sh")) "systemctl") (TEXT " and ") (LITERAL-CODE (("" . "sh")) "journalctl") (TEXT " to manage the service, e.g.:")) (VERBATIM-CODE (("" . "sh")) "# sudo systemctl status zettelstore # verify that it is running\n# sudo journalctl -u zettelstore # obtain the output of the running zettelstore") (PARA (TEXT "A word of caution: Never expose Zettelstore directly to the Internet.") (SOFT) (TEXT "As a personal service, Zettelstore is not designed to handle all aspects of the open web.") (SOFT) (TEXT "For instance, it lacks support for certificate handling, which is necessary for encrypted HTTP connections.") (SOFT) (TEXT "To ensure security, place Zettelstore behind a proxy server designed for Internet exposure.") (SOFT) (TEXT "For more details, see: ") (LINK () (ZETTEL "00001010090100") (TEXT "External server to encrypt message transport")) (TEXT ".")))