Skip to main content
Configure your Arc node’s Execution Layer and Consensus Layer as systemd services so they auto-restart on failure and survive reboots.

Prerequisites

  • You have installed Arc and completed the Run an Arc Node tutorial with both layers syncing
  • You have a Linux machine with systemd
  • You have root or sudo access

Step 1: Create the Execution Layer unit file

Write the systemd unit file to /etc/systemd/system/arc-execution.service:
sudo tee /etc/systemd/system/arc-execution.service > /dev/null <<EOF
[Unit]
Description=Arc Node - Execution Layer
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=$USER
Group=$USER
RuntimeDirectory=arc
Environment=RUST_LOG=info
WorkingDirectory=$HOME/.arc
ExecStart=/usr/local/bin/arc-node-execution node \
  --chain arc-testnet \
  --datadir $HOME/.arc/execution \
  --disable-discovery \
  --ipcpath /run/arc/reth.ipc \
  --auth-ipc \
  --auth-ipc.path /run/arc/auth.ipc \
  --http \
  --http.addr 127.0.0.1 \
  --http.port 8545 \
  --http.api eth,net,web3,txpool,trace,debug \
  --metrics 127.0.0.1:9001 \
  --enable-arc-rpc \
  --rpc.forwarder https://rpc.quicknode.testnet.arc.network/

Restart=always
RestartSec=10
KillSignal=SIGTERM
TimeoutStopSec=300
StandardOutput=journal
StandardError=journal
SyslogIdentifier=arc-execution
LimitNOFILE=1048576

[Install]
WantedBy=multi-user.target
EOF
The service files assume binaries are installed at /usr/local/bin/. If you built from source with cargo install, run the following from the repo root to reinstall to that path: cargo install --path crates/node --root /usr/local. Alternatively, update the ExecStart paths in both service files to match your installation directory.The RuntimeDirectory=arc directive automatically creates /run/arc owned by the User= account specified in the service file when the service starts. The --metrics flag enables the Prometheus endpoint on port 9001.

Step 2: Create the Consensus Layer unit file

Write the systemd unit file to /etc/systemd/system/arc-consensus.service. The After and Requires directives ensure this service starts only after the Execution Layer is running.
sudo tee /etc/systemd/system/arc-consensus.service > /dev/null <<EOF
[Unit]
Description=Arc Node - Consensus Layer
After=arc-execution.service
Requires=arc-execution.service

[Service]
Type=simple
User=$USER
Group=$USER
Environment=RUST_LOG=info
WorkingDirectory=$HOME/.arc
ExecStart=/usr/local/bin/arc-node-consensus start \
  --home $HOME/.arc/consensus \
  --eth-socket /run/arc/reth.ipc \
  --execution-socket /run/arc/auth.ipc \
  --rpc.addr 127.0.0.1:31000 \
  --follow \
  --follow.endpoint https://rpc.drpc.testnet.arc.network,wss=rpc.drpc.testnet.arc.network \
  --follow.endpoint https://rpc.quicknode.testnet.arc.network,wss=rpc.quicknode.testnet.arc.network \
  --follow.endpoint https://rpc.blockdaemon.testnet.arc.network,wss=rpc.blockdaemon.testnet.arc.network \
  --metrics 127.0.0.1:29000

Restart=always
RestartSec=10
KillSignal=SIGTERM
TimeoutStopSec=300
StandardOutput=journal
StandardError=journal
SyslogIdentifier=arc-consensus
LimitNOFILE=1048576

[Install]
WantedBy=multi-user.target
EOF

Step 3: Enable and start the services

Reload systemd, enable both services to start on boot, and start them:
sudo systemctl daemon-reload
sudo systemctl enable arc-execution arc-consensus
sudo systemctl start arc-execution arc-consensus
The enable command outputs:
Created symlink /etc/systemd/system/multi-user.target.wants/arc-execution.service -> /etc/systemd/system/arc-execution.service.
Created symlink /etc/systemd/system/multi-user.target.wants/arc-consensus.service -> /etc/systemd/system/arc-consensus.service.

Step 4: Verify the services are running

Check the status of both services:
sudo systemctl status arc-execution
sudo systemctl status arc-consensus
Each command prints output similar to:
● arc-execution.service - Arc Node - Execution Layer
     Loaded: loaded (/etc/systemd/system/arc-execution.service; enabled)
     Active: active (running) since ...
Both services display Active: active (running) in their output. If a service shows failed or activating, check its logs:
sudo journalctl -u arc-execution --no-pager -n 50
sudo journalctl -u arc-consensus --no-pager -n 50
Common issues:
  • Incorrect file paths in ExecStart: Verify that the binary paths in the unit files match your installation directory.
  • Permission errors on data directories: Confirm that the User specified in the unit file owns $HOME/.arc/.
  • Consensus Layer connection error: The Execution Layer may not be ready yet. Wait for it to reach active (running), then run sudo systemctl restart arc-consensus.
To confirm sync progress and verify Prometheus metrics are being scraped on ports 9001 (Execution Layer) and 29000 (Consensus Layer), see Monitoring a Node.