Skip to content

Instantly share code, notes, and snippets.

@garbados
Created June 4, 2020 02:34
Show Gist options
  • Save garbados/8b1d95a10757599227ac9e04f162a147 to your computer and use it in GitHub Desktop.
Save garbados/8b1d95a10757599227ac9e04f162a147 to your computer and use it in GitHub Desktop.
SystemD service for hyperdrive-daemon https://github.com/hypercore-protocol/hyperdrive-daemon
[Unit]
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=oneshot
ExecStart=`which node` `which hyperdrive` start
User=$USER
WorkingDirectory=/home/$USER/
[Install]
WantedBy=multi-user.target
npm i -g hyperdrive-daemon
vi /etc/systemd/system/hyperdrive.service
# enter hyperdrive.service, update its variables
sudo systemctl daemon-reload
sudo service hyperdrive start
# now the hyperdrive daemon is running
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment