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:
- Download the database and copy the executable file to the
/usr/local/bin
directory - Create the
/usr/local/etc/reductstore.env
file with your configuration - 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
- Enable and start the service:
sudo systemctl enable reductstore.service
sudo systemctl start reductstore.service
That’s it!