ReductStore as systemd service

Hey, I’d like to deploy ReductStore as a system service. Could you advise how I should do it best.

Hey @User1231 , ReductStore uses environment variables for configuration. So do the following steps:

  1. Download the database and copy the executable file to the /usr/local/bin directory
  2. Create the /usr/local/etc/reductstore.env file with your configuration
  3. Create the /etc/systemd/system/reductstore.service file with the following content:
[Unit]
Description=ReductStore Service
Requires=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/reductstore
Restart=on-failure
RestartSec=5s
EnvironmentFile=/usr/local/etc/reductstore.env

[Install]
WantedBy=multi-user.target
  1. Enable and start the service:
sudo systemctl enable reductstore.service
sudo systemctl start reductstore.service

That’s it!