|
| 1 | +SYSTEMD SUPPORT IN BITCOIN |
| 2 | +========================== |
| 3 | + |
| 4 | +Packagers can find a .service file in this repo in order to integrate bitcoin's |
| 5 | +daemon into systemd based distributions. |
| 6 | + |
| 7 | +bitcoind.service file is located in contrib/systemd/ folder. |
| 8 | + |
| 9 | +1. Users |
| 10 | +--------------------------------- |
| 11 | + |
| 12 | +This .service file assumes bitcoind user and group exist in the system, so packager |
| 13 | +should make sure they are created on installation. |
| 14 | + |
| 15 | +2. Files |
| 16 | +--------------------------------- |
| 17 | + |
| 18 | +The .service file assumes several paths that might need to be adjusted according |
| 19 | +to packager's needs. |
| 20 | + |
| 21 | +Daemon's config file is assumed to be located at /etc/bitcoind.conf (you can |
| 22 | +use contrib/debian/examples/bitcoin.conf as an example). Once installed, users |
| 23 | +must edit the file in order to update at least these two |
| 24 | +values: rpcuser and rpcpassword . Failing to do so will make the daemon fail |
| 25 | +to boot. However, the message written to /var/lib/bitcoind/debug.log file is |
| 26 | +very helpful and no default values should be set: |
| 27 | + |
| 28 | + YYYY-MM-DD HH:MM:DD Error: To use the "-server" option, you must set a rpcpassword in the configuration file: |
| 29 | + /etc/bitcoind.conf |
| 30 | + It is recommended you use the following random password: |
| 31 | + rpcuser=bitcoinrpc |
| 32 | + rpcpassword=HdYZ5HGtAF7mx8aTw6uCATtD2maMAK4E12Ysp4YNZQcX |
| 33 | + (you do not need to remember this password) |
| 34 | + The username and password MUST NOT be the same. |
| 35 | + If the file does not exist, create it with owner-readable-only file permissions. |
| 36 | + It is also recommended to set alertnotify so you are notified of problems; |
| 37 | + for example: alertnotify=echo %s | mail -s "Bitcoin Alert" [email protected] |
| 38 | + |
| 39 | +Daemon's data and pid files will be stored in /var/lib/bitcoind directory, so it |
| 40 | +should be created on installation and make bitcoind user/group it's owner. |
| 41 | + |
| 42 | +3. Installing .service file |
| 43 | +--------------------------------- |
| 44 | + |
| 45 | +Installing this .service file consists on just copying it to /usr/lib/systemd/system |
| 46 | +directory, followed by the command "systemctl daemon-reload" in order to update |
| 47 | +running systemd configuration. |
0 commit comments