11. Node System Services
In this step you will configure, enable and start the xxnetwork-chain and xxnetwork-cmix systemd services.
About xxnetwork-chain.service
The service file for the xxnetwork-chain systemd service is the xxnetwork-chain.service file. It is located in /opt/xxnetwork/
. In most cases, you will only need to modify the User
and optionally add the --name
flag.
Default xxnetwork-chain.service file
[Unit]
Description=Job that starts the xx network chain binary
After=local-fs.target network-online.target network.target
Wants=local-fs.target network-online.target network.target
[Service]
User=ubuntu
Type=simple
ExecStart=/bin/bash -c "/opt/xxnetwork/bin/xxnetwork-chain --validator --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' --base-path /opt/xxnetwork/db --port 15974 --ws-port 63007 >> /opt/xxnetwork/log/chain.log 2>&1"
LimitNOFILE=infinity
Restart=always
RestartSec=120
[Install]
WantedBy=multi-user.target
About xxnetwork-cmix.service
The service file for the xxnetwork-cmix systemd service is the xxnetwork-cmix.service file. It is located in /opt/xxnetwork/
. In most cases, you will only need to modify the User
.
Default xxnetwork-cmix.service file
[Unit]
Description=Job that starts the cmix Wrapper service
StartLimitIntervalSec=5
StartLimitBurst=10
After=local-fs.target network-online.target network.target
Wants=local-fs.target network-online.target network.target
[Service]
User=ubuntu
Type=simple
ExecStart=/opt/xxnetwork/cmix-wrapper.py \
--err-path /opt/xxnetwork/log/cmix-err.log \
--cmd-dir /opt/xxnetwork/log/cmix-cmd \
--wrapper-log /opt/xxnetwork/log/cmix-wrapper.log \
--binary-path /opt/xxnetwork/bin/xxnetwork-cmix \
--gpu-lib /opt/xxnetwork/lib/libpowmosm75.so \
--gpu-bin /opt/xxnetwork/lib/libpow.fatbin \
--config-path /opt/xxnetwork/config/cmix.yaml \
--id-path /opt/xxnetwork/cred/cmix-IDF.json \
--log-path /opt/xxnetwork/log/cmix.log \
--management-cert /opt/xxnetwork/cred/network-management.crt \
--s3-access-key KEY \
--s3-secret SECRET \
--s3-region us-west-1 \
--s3-management-bucket elixxir-management-mainnet \
--s3-bin-bucket elixxir-bins \
--cloudwatch-log-group xxnetwork-logs-mainnet \
--tmp-dir /tmp/xxnetwork/cmix/
LimitNOFILE=infinity
Restart=always
[Install]
WantedBy=multi-user.target
Confirm Username
The output of whoami is the username that must accompany the User
setting.
whoami
Open xxnetwork-chain.service
nano /opt/xxnetwork/xxnetwork-chain.service
Set User
The default user in the service file is ubuntu
. Change this to your username.