Skip to content

Instantly share code, notes, and snippets.

@anvie
Last active December 21, 2022 05:51
Show Gist options
  • Save anvie/9637e1d4172c9dcaf54639732ac40cec to your computer and use it in GitHub Desktop.
Save anvie/9637e1d4172c9dcaf54639732ac40cec to your computer and use it in GitHub Desktop.
Nuchain Systemd Service Configuration
# Systemd service configuration for Nuchain docker container.
# edit as you wish.
[Unit]
Description=Nuchain Node Container
After=docker.service
Requires=docker.service
[Service]
Type=simple
Restart=always
RestartSec=5
StartLimitBurst=5
LimitNOFILE=10000
ExecStartPre=-/usr/bin/docker stop nuchain
ExecStartPre=-/usr/bin/docker rm nuchain
ExecStart=/usr/bin/docker run --rm --user 999:1001 -v '/var/data/nuchain:/data' -p '9933:9933' -p '9944:9944' -p '30333:30333' --name nuchain anvie/nuchain:latest-alpine nuchain --validator --base-path=/data --ws-external --rpc-external --rpc-methods=Unsafe
[Install]
WantedBy=multi-user.target
[Unit]
Description=Nuchain Node
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=5
StartLimitBurst=5
User=nuchain
LimitNOFILE=10000
ExecStart=/usr/local/bin/nuchain --base-path /var/data/nuchain --port 30333 --ws-port 9944 --rpc-port 9933 --name {{NODE_NAME}} --validator --rpc-cors "*" --bootnodes {{ BOOTNODES }}
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment