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/tidecoinCreate /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.confUnit 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.targetUse 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 tidecoindCheck logs:
journalctl -u tidecoind -fCheck node state:
sudo -u tidecoin tidecoin-cli -datadir=/var/lib/tidecoin getblockchaininfoStop cleanly:
sudo systemctl stop tidecoindConfig for service nodes
For an infrastructure node without wallet private keys:
server=1
disablewallet=1
txindex=1
v2transport=1
rpcbind=127.0.0.1For 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:
- Stop the service.
- Back up wallets.
- Replace binaries.
- Start the service.
- Check
getblockchaininfoand logs.
See also: Install a Node, Configuration, Monitoring, RPC Security.