mirror of
https://github.com/thomiceli/opengist.git
synced 2024-12-23 13:02:39 +00:00
fa8e068e24
Co-authored-by: Cyberes <64224601+cyberes@users.noreply.github.com>
983 B
983 B
Run with Systemd
For non-Docker users, you could run Opengist as a systemd service.
On Unix distributions with systemd, place the Opengist binary like:
sudo cp opengist /usr/local/bin
sudo mkdir -p /var/lib/opengist
sudo cp config.yml /etc/opengist
Edit the Opengist home directory configuration in /etc/opengist/config.yml
like:
opengist-home: /var/lib/opengist
Create a new user to run Opengist:
sudo useradd --system opengist
sudo mkdir -p /var/lib/opengist
sudo chown -R opengist:opengist /var/lib/opengist
Then create a service file at /etc/systemd/system/opengist.service
:
[Unit]
Description=opengist Server
After=network.target
[Service]
Type=simple
User=opengist
Group=opengist
ExecStart=opengist --config /etc/opengist/config.yml
Restart=on-failure
[Install]
WantedBy=multi-user.target
Finally, start the service:
systemctl daemon-reload
systemctl enable --now opengist
systemctl status opengist