(zettel (meta (back "00001003000000 00001003300000 00001003315000") (backward "00001003000000 00001003300000 00001003315000") (box-number "1") (created "20211125191727") (forward "00001010090100") (modified "20250227220033") (published "20250227220033") (role "manual") (syntax "zmk") (tags "#installation #manual #zettelstore") (title "Installation of Zettelstore on a server")) (rights 4) (encoding "") (content "You want to provide a shared Zettelstore that can be used from your various devices.\nInstalling Zettelstore as a Linux service is not that hard.\n\nGrab the appropriate executable and copy it into the appropriate directory:\n```sh\n# sudo mv zettelstore /usr/local/bin/zettelstore\n```\nCreate a group named ''zettelstore'':\n```sh\n# sudo groupadd --system zettelstore\n```\nCreate a system user of that group, named ''zettelstore'', with a home folder:\n```sh\n# sudo useradd --system --gid zettelstore \\\n --create-home --home-dir /var/lib/zettelstore \\\n --shell /usr/sbin/nologin \\\n --comment \"Zettelstore server\" \\\n zettelstore\n```\nCreate a systemd service file and store it into ''/etc/systemd/system/zettelstore.service'':\n```ini\n[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\n```\nDouble-check everything. Now you can enable and start the zettelstore as a service:\n```sh\n# sudo systemctl daemon-reload\n# sudo systemctl enable zettelstore\n# sudo systemctl start zettelstore\n```\nUse the commands ``systemctl``{=sh} and ``journalctl``{=sh} to manage the service, e.g.:\n```sh\n# sudo systemctl status zettelstore # verify that it is running\n# sudo journalctl -u zettelstore # obtain the output of the running zettelstore\n```\n\nA word of caution: Never expose Zettelstore directly to the Internet.\nAs a personal service, Zettelstore is not designed to handle all aspects of the open web.\nFor instance, it lacks support for certificate handling, which is necessary for encrypted HTTP connections.\nTo ensure security, place Zettelstore behind a proxy server designed for Internet exposure.\nFor more details, see: [[External server to encrypt message transport|00001010090100]]."))