Created
October 20, 2018 11:56
-
-
Save rraallvv/b942490d3d5c2d91d2e82548ee4de3c4 to your computer and use it in GitHub Desktop.
Bitcoin service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server=1 | |
daemon=1 | |
#debug=mempool | |
debug=rpc | |
# If run on the test network instead of the real bitcoin network | |
# testnet=1 | |
# You must set rpcuser and rpcpassword to secure the JSON-RPC api | |
# Please make rpcpassword to something secure, `5gKAgrJv8CQr2CGUhjVbBFLSj29HnE6YGXvfykHJzS3k` for example. | |
# Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332) | |
rpcuser=deploy | |
rpcpassword=pass | |
rpcport=8332 | |
# Notify when receiving coins | |
walletnotify=/usr/local/sbin/rabbitmqadmin publish routing_key=peatio.deposit.coin payload='{"txid":"%s", "currency":"btc"}' | |
# Enable blocks pruning | |
prune=550 | |
# Limit | |
dbcache=50 | |
maxconnections=4 | |
rpcthreads=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# It is not recommended to modify this file in-place, because it will | |
# be overwritten during package upgrades. If you want to add further | |
# options or overwrite existing ones then use | |
# $ systemctl edit bitcoind.service | |
# See "man systemd.service" for details. | |
# Note that almost all daemon options could be specified in | |
# /etc/bitcoin/bitcoin.conf | |
[Unit] | |
Description=Bitcoin daemon | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/bitcoind -daemon -datadir=/home/deploy/.bitcoin -conf=/home/deploy/.bitcoin/bitcoin.conf -pid=/home/deploy/.bitcoin/bitcoind/bitcoind.pid | |
# Creates /run/bitcoind owned by bitcoin | |
RuntimeDirectory=/home/deploy/.bitcoin/bitcoind | |
User=deploy | |
Group=deploy | |
Type=forking | |
PIDFile=/home/deploy/.bitcoin/bitcoind/bitcoind.pid | |
#Restart=on-failure | |
# Hardening measures | |
#################### | |
# Provide a private /tmp and /var/tmp. | |
PrivateTmp=true | |
# Mount /usr, /boot/ and /etc read-only for the process. | |
ProtectSystem=full | |
# Disallow the process and all of its children to gain | |
# new privileges through execve(). | |
NoNewPrivileges=true | |
# Use a new /dev namespace only populated with API pseudo devices | |
# such as /dev/null, /dev/zero and /dev/random. | |
PrivateDevices=true | |
# Deny the creation of writable and executable memory mappings. | |
# Commented out as it's not supported on Debian 8 or Ubuntu 16.04 LTS | |
#MemoryDenyWriteExecute=true | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment