fractal-bitcoin / fractald-release

118 stars 39 forks source link

Add Linux Service modle #6

Open joepeak opened 1 month ago

joepeak commented 1 month ago

In order to facilitate Linux users to test and deploy nodes, it is recommended to add Linux service form startup, the specific steps are as follows.

The first step is to add the configuration file ‘/etc/systemd/system/fractal-bitcoin.service’ with the following contents:

[Unit]
Description=bitcoin
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/fractald-release/fractald-x86_64-linux-gnu/bin/bitcoind -daemon \
                            -pid=/fractald-release/fractald-x86_64-linux-gnu/bitcoind.pid \
                            -conf=/fractald-release/fractald-x86_64-linux-gnu/bitcoin.conf \
                            -datadir=/fractald-release/fractald-x86_64-linux-gnu/data

Type=forking
PIDFile=/fractald-release/fractald-x86_64-linux-gnu/bitcoind.pid
Restart=on-failure
TimeoutStopSec=600

User=bitcoin
Group=bitcoin

[Install]
WantedBy=multi-user.target

Step 2: Set up the bootloader:

sudo systemctl enable --now fractal-bitcoin.service

Juniorduc44 commented 1 month ago

Giving love to the Linux community? God Bless you sir.