Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1# It is not recommended to modify this file in-place, because it will2# be overwritten during package upgrades. If you want to add further3# options or overwrite existing ones then use4# $ systemctl edit bitcoind.service5# See "man systemd.service" for details.7# Note that almost all daemon options could be specified in8# /etc/bitcoin/bitcoin.conf, but keep in mind those explicitly9# specified as arguments in ExecStart= will override those in the10# config file.12[Unit]13Description=Bitcoin daemon14Documentation=https://github.com/bitcoin/bitcoin/blob/master/doc/init.md16# https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/17After=network-online.target18Wants=network-online.target20[Service]21ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \22-conf=/etc/bitcoin/bitcoin.conf \23-datadir=/var/lib/bitcoind \24-startupnotify='systemd-notify --ready' \25-shutdownnotify='systemd-notify --stopping'27# Make sure the config directory is readable by the service user28ExecStartPre=!/bin/chgrp bitcoin /etc/bitcoin30# Process management31####################33Type=notify34NotifyAccess=all35PIDFile=/run/bitcoind/bitcoind.pid37Restart=on-failure38TimeoutStartSec=infinity39TimeoutStopSec=60041# Directory creation and permissions42####################################44# Run as bitcoin:bitcoin45User=bitcoin47# /run/bitcoind48RuntimeDirectory=bitcoind49RuntimeDirectoryMode=071051# /etc/bitcoin52ConfigurationDirectory=bitcoin53ConfigurationDirectoryMode=071055# /var/lib/bitcoind56StateDirectory=bitcoind57StateDirectoryMode=071059# Hardening measures60####################62# Provide a private /tmp and /var/tmp.63PrivateTmp=true65# Mount /usr, /boot/ and /etc read-only for the process.66ProtectSystem=full68# Deny access to /home, /root and /run/user69ProtectHome=true71# Disallow the process and all of its children to gain72# new privileges through execve().73NoNewPrivileges=true75# Use a new /dev namespace only populated with API pseudo devices76# such as /dev/null, /dev/zero and /dev/random.77PrivateDevices=true79# Deny the creation of writable and executable memory mappings.80MemoryDenyWriteExecute=true82# Restrict ABIs to help ensure MemoryDenyWriteExecute is enforced83SystemCallArchitectures=native85[Install]86WantedBy=multi-user.target
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.