Skip to content

Commit

Permalink
init: Modify docs and add release note for 12255
Browse files Browse the repository at this point in the history
  • Loading branch information
dongcarl committed Feb 1, 2019
1 parent c25d5fd commit 9c8d535
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
16 changes: 15 additions & 1 deletion doc/init.md
Expand Up @@ -56,7 +56,7 @@ All three configurations assume several paths that might need to be adjusted.
Binary: `/usr/bin/bitcoind`
Configuration file: `/etc/bitcoin/bitcoin.conf`
Data directory: `/var/lib/bitcoind`
PID file: `/var/run/bitcoind/bitcoind.pid` (OpenRC and Upstart) or `/var/lib/bitcoind/bitcoind.pid` (systemd)
PID file: `/var/run/bitcoind/bitcoind.pid` (OpenRC and Upstart) or `/run/bitcoind/bitcoind.pid` (systemd)
Lock file: `/var/lock/subsys/bitcoind` (CentOS)

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

NOTE: When using the systemd .service file, the creation of the aforementioned
directories and the setting of their permissions is automatically handled by
systemd. Directories are given a permission of 710, giving the bitcoin group
access to files under it _if_ the files themselves give permission to the
bitcoin group to do so (e.g. when `-sysperms` is specified). This does not allow
for the listing of files under the directory.

NOTE: Command line options (often specified in init files) take precedence over
options in configuration files. Therefore, if a command line option is specified
in the init file (e.g. `-datadir` is specified in the systemd init file
`bitcoind.service`), then it is not currently possible to override said option
in the configuration file (e.g. setting `datadir=/foo/bar` in the configuration
file will have no effect).

### macOS

Binary: `/usr/local/bin/bitcoind`
Expand Down
19 changes: 19 additions & 0 deletions doc/release-notes/release-notes-pr12255.md
@@ -0,0 +1,19 @@
PR #12255
=========

The systemd init file (`contrib/init/bitcoind.service`) has been changed to use
`/var/lib/bitcoind` as the data directory instead of `~bitcoin/.bitcoin`. This
change makes Bitcoin Core more consistent with other services, and makes the
systemd init config more consistent with existing Upstart and OpenRC configs.

The configuration, PID, and data directories are now completely managed by
systemd, which will take care of their creation, permissions, etc. See
[`systemd.exec (5)`](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#RuntimeDirectory=)
for more details.

When using the provided systemd init file, any command line options specified in
that init file takes precedence over options specified in configuration files.
Therefore, if a command line option is specified in the init file (e.g.
`-datadir`), then it is not currently possible to override said option in the
configuration file (e.g. setting `datadir=/foo/bar` in the configuration file
will have no effect).

0 comments on commit 9c8d535

Please sign in to comment.