Skip to content

Instantly share code, notes, and snippets.

@magicstone1412
Created May 2, 2025 12:22
Show Gist options
  • Save magicstone1412/a8b25a81ef50b85fb2c3ab3a7529b420 to your computer and use it in GitHub Desktop.
Save magicstone1412/a8b25a81ef50b85fb2c3ab3a7529b420 to your computer and use it in GitHub Desktop.
[Unit]
Description=Aztec Node Service
After=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/root/.aztec/bin/aztec start --node --archiver --sequencer \
--network alpha-testnet \
--l1-rpc-urls your_rpc_url \
--l1-consensus-host-urls your_beacon_url \
--sequencer.validatorPrivateKey 0xYourPrivateKey \
--sequencer.coinbase 0xYourAddress \
--p2p.p2pIp your_IP
Restart=always
RestartSec=10
User=root
Group=root
WorkingDirectory=/root/.aztec/alpha-testnet
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
@magicstone1412
Copy link
Author

Steps to Set Up the Aztec Service

1. Create the Systemd Service File

Save the content to /etc/systemd/system/aztec.service:

sudo nano /etc/systemd/system/aztec.service

Replace the following placeholders with actual values:

  • your_rpc_url: The L1 RPC URL.
  • your_beacon_url: The L1 consensus host URL.
  • 0xYourPrivateKey: The sequencer validator private key.
  • 0xYourAddress: The sequencer coinbase address.
  • your_IP: Your IP address.

2. Reload Systemd and Enable the Service

sudo systemctl daemon-reload
sudo systemctl enable aztec.service
sudo systemctl start aztec.service

3. Check the Service Status

Verify the service is running:

sudo systemctl status aztec.service

View logs for debugging:

journalctl -u aztec.service -f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment