Skip to Content
Node & Operationssystemd Service

systemd Service

A systemd unit lets tidecoind start at boot, restart on failure, and run as a dedicated non-root user. The canonical pattern is a Type=simple service with Restart=on-failure, User=tidecoin, and the data directory owned by the same user.

This page is for Linux service operation. It assumes binaries are already installed and configuration is in /var/lib/tidecoin/tidecoin.conf.

Create a service user

sudo useradd --system --home /var/lib/tidecoin --create-home --shell /usr/sbin/nologin tidecoin sudo install -d -o tidecoin -g tidecoin -m 0750 /var/lib/tidecoin

Create /var/lib/tidecoin/tidecoin.conf and make it readable only by the service user:

sudo install -o tidecoin -g tidecoin -m 0640 tidecoin.conf /var/lib/tidecoin/tidecoin.conf

Unit file

Create /etc/systemd/system/tidecoind.service:

[Unit] Description=Tidecoin daemon After=network-online.target Wants=network-online.target [Service] Type=simple User=tidecoin Group=tidecoin ExecStart=/usr/local/bin/tidecoind -datadir=/var/lib/tidecoin -conf=/var/lib/tidecoin/tidecoin.conf -printtoconsole ExecStop=/usr/local/bin/tidecoin-cli -datadir=/var/lib/tidecoin stop Restart=on-failure RestartSec=10 TimeoutStopSec=120 NoNewPrivileges=true PrivateTmp=true ProtectSystem=full ProtectHome=true ReadWritePaths=/var/lib/tidecoin [Install] WantedBy=multi-user.target

Use ProtectSystem=full rather than strict unless you have verified every path the node needs on your distribution. The data directory must remain writable.

Start and verify

sudo systemctl daemon-reload sudo systemctl enable --now tidecoind sudo systemctl status tidecoind

Check logs:

journalctl -u tidecoind -f

Check node state:

sudo -u tidecoin tidecoin-cli -datadir=/var/lib/tidecoin getblockchaininfo

Stop cleanly:

sudo systemctl stop tidecoind

Config for service nodes

For an infrastructure node without wallet private keys:

server=1 disablewallet=1 txindex=1 v2transport=1 rpcbind=127.0.0.1

For a wallet-capable service, review RPC Security first and keep wallet backups outside the service directory.

Logs and maintenance

With -printtoconsole, logs go to journald. Without it, debug.log is written under the network-specific data directory. Use one logging path deliberately; do not assume both are complete.

Before upgrades:

  1. Stop the service.
  2. Back up wallets.
  3. Replace binaries.
  4. Start the service.
  5. Check getblockchaininfo and logs.

See also: Install a Node, Configuration, Monitoring, RPC Security.

Last updated on