Skip to content

Commit bad1716

Browse files
committed
init: Modify docs and add release note for 12255
1 parent b0c7b54 commit bad1716

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

Diff for: doc/init.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ All three configurations assume several paths that might need to be adjusted.
5656
Binary: `/usr/bin/bitcoind`
5757
Configuration file: `/etc/bitcoin/bitcoin.conf`
5858
Data directory: `/var/lib/bitcoind`
59-
PID file: `/var/run/bitcoind/bitcoind.pid` (OpenRC and Upstart) or `/var/lib/bitcoind/bitcoind.pid` (systemd)
59+
PID file: `/var/run/bitcoind/bitcoind.pid` (OpenRC and Upstart) or `/run/bitcoind/bitcoind.pid` (systemd)
6060
Lock file: `/var/lock/subsys/bitcoind` (CentOS)
6161

6262
The configuration file, PID directory (if applicable) and data directory
@@ -65,6 +65,22 @@ reasons to make the configuration file and data directory only readable by the
6565
bitcoin user and group. Access to bitcoin-cli and other bitcoind rpc clients
6666
can then be controlled by group membership.
6767

68+
NOTE: When using the systemd .service file, the creation of the aforementioned
69+
directories and the setting of their permissions is automatically handled by
70+
systemd. Directories are given a permission of 710, giving the bitcoin group
71+
access to files under it _if_ the files themselves give permission to the
72+
bitcoin group to do so (e.g. when `-sysperms` is specified). This does not allow
73+
for the listing of files under the directory.
74+
75+
NOTE: It is not currently possible to override `datadir` in
76+
`/etc/bitcoin/bitcoin.conf` with the current systemd, OpenRC, and Upstart init
77+
files out-of-the-box. This is because the command line options specified in the
78+
init files take precedence over the configurations in
79+
`/etc/bitcoin/bitcoin.conf`. However, some init systems have their own
80+
configuration mechanisms that would allow for overriding the command line
81+
options specified in the init files (e.g. setting `BITCOIND_DATADIR` for
82+
OpenRC).
83+
6884
### macOS
6985

7086
Binary: `/usr/local/bin/bitcoind`

Diff for: doc/release-notes/release-notes-pr12255.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
systemd init file
2+
=========
3+
4+
The systemd init file (`contrib/init/bitcoind.service`) has been changed to use
5+
`/var/lib/bitcoind` as the data directory instead of `~bitcoin/.bitcoin`. This
6+
change makes Bitcoin Core more consistent with other services, and makes the
7+
systemd init config more consistent with existing Upstart and OpenRC configs.
8+
9+
The configuration, PID, and data directories are now completely managed by
10+
systemd, which will take care of their creation, permissions, etc. See
11+
[`systemd.exec (5)`](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=)
12+
for more details.
13+
14+
When using the provided init files under `contrib/init`, overriding the
15+
`datadir` option in `/etc/bitcoin/bitcoin.conf` will have no effect. This is
16+
because the command line arguments specified in the init files take precedence
17+
over the options specified in `/etc/bitcoin/bitcoin.conf`.

0 commit comments

Comments
 (0)