cd $WORKSPACEmkdir-pbouncebit/binmkdir-pbouncebit/config
Create work user
sudogroupadd-r-g979bouncebitsudouseradd-m-u979-g979--system-s/sbin/nologin-d/var/lib/bouncebitbouncebitsudomkdir/etc/bouncebit&&sudochownbouncebit:bouncebit/etc/bouncebitsudotee/etc/bouncebit/bbcored.env<<EOFGOGC=75EOF## rm old node keysudorm/data/bouncebit/config/node_key.json
We recommend using Systemd to manage Bouncebit service and check logs.
Setting up systemd unit file
You can create a Systemd unit file at the following location /etc/systemd/system/bouncebit.service:
sudotee/etc/systemd/system/bouncebit.service<<EOF[Unit]Description=bouncebit node daemonAfter=network-online.targetWants=network-online.target data.mountRequires=data.mount[Service]ExecStart=/usr/local/bin/bbcored start \\ --log_format=json \\ --log_level=info \\ --home=/data/bouncebitType=simpleRestart=on-failureKillMode=processKillSignal=SIGINTTimeoutStartSec=infinityTimeoutStopSec=600User=bouncebitGroup=bouncebitCPUSchedulingPolicy=batchLimitNOFILE=524288LimitNPROC=16384MemoryMax=27GWorkingDirectory=/data/bouncebitEnvironmentFile=-/etc/bouncebit/bbcored.env# /run/bouncebitRuntimeDirectory=bouncebitRuntimeDirectoryMode=0700# /etc/bouncebitConfigurationDirectory=bouncebitConfigurationDirectoryMode=0755# /var/lib/bouncebitStateDirectory=bitcoindStateDirectoryMode=0710SyslogIdentifier=bbcored# Provide a private /tmp and /var/tmp.PrivateTmp=true# Mount /usr, /boot/ and /etc read-only for the process.ProtectSystem=full# Deny access to /home, /root and /run/userProtectHome=true# 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.MemoryDenyWriteExecute=true[Install]WantedBy=multi-user.targetEOF