# /etc/systemd/system/tbitcoind.service [Unit] Description=Bitcoin Testnet daemon After=network.target [Service] # Service execution ################### ExecStart=/usr/local/bin/bitcoind -daemon -testnet \ -pid=/run/tbitcoind/tbitcoind.pid \ -conf=/home/bitcoin/.bitcoin/bitcoin.conf \ -datadir=/home/bitcoin/.bitcoin \ -startupnotify="chmod g+r /home/bitcoin/.bitcoin/testnet3/.cookie" # Process management #################### Type=forking PIDFile=/run/tbitcoind/tbitcoind.pid Restart=on-failure TimeoutSec=300 RestartSec=30 # Directory creation and permissions #################################### User=bitcoin UMask=0027 # /run/tbitcoind RuntimeDirectory=tbitcoind RuntimeDirectoryMode=0710 # Hardening measures #################### # Provide a private /tmp and /var/tmp. PrivateTmp=true # Mount /usr, /boot/ and /etc read-only for the process. ProtectSystem=full # Disallow the process and all of its children to gain # new privileges through execve(). NoNewPrivileges=true # Use a new /dev namespace only populated with API pseudo devices # such as /dev/null, /dev/zero and /dev/random. PrivateDevices=true # Deny the creation of writable and executable memory mappings. MemoryDenyWriteExecute=true [Install] WantedBy=multi-user.target