Share
Explore

NGINX systemd service file

OP-GETH
cd /etc/systemd/system
sudo nano op-geth.service
[Unit]
Description=Op-Geth

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/testnet/op-geth
ExecStart=sudo /home/ubuntu/testnet/op-geth/./build/bin/geth \
--datadir ./datadir \
--http \
--http.corsdomain="*" \
--http.vhosts="*" \
--http.addr=0.0.0.0 \
--http.api=web3,debug,eth,txpool,net,engine \
--ws \
--ws.addr=0.0.0.0 \
--ws.port=8546 \
--ws.origins="*" \
--ws.api=debug,eth,txpool,net,engine \
--syncmode=full \
--gcmode=archive \
--nodiscover \
--maxpeers=0 \
--networkid=90001 \
--authrpc.vhosts="*" \
--authrpc.addr=0.0.0.0 \
--authrpc.port=8551 \
--authrpc.jwtsecret=./jwt.txt \
--rollup.disabletxpoolgossip=true \
--password=./datadir/password \
--allow-insecure-unlock \
--mine \
--miner.etherbase=0xE6B2f22B01cE0F5F834e40B09BF5E4c0DEC1046D \
--unlock=0xE6B2f22B01cE0F5F834e40B09BF5E4c0DEC1046D
#Restart=always

[Install]
WantedBy=multi-user.target


OP-NODE
cd /etc/systemd/system
sudo nano op-node.service
[Unit]
Description=Op-Node

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/testnet/optimism/op-node
ExecStart=/home/ubuntu/testnet/optimism/op-node/./bin/op-node \
--l2=http://localhost:8551 \
--l2.jwt-secret=./jwt.txt \
--sequencer.enabled \
--sequencer.l1-confs=3 \
--verifier.l1-confs=3 \
--rollup.config=./rollup.json \
--rpc.addr=0.0.0.0 \
--rpc.port=8547 \
--metrics.enabled \
--metrics.port=7500 \
--p2p.listen.ip=0.0.0.0 \
--p2p.listen.tcp=9003 \
--p2p.listen.udp=9003 \
--rpc.enable-admin \
--p2p.sequencer.key=f8c51abdb2b7d2bdecced82c7f559465e754d680eba8dddee601df8366976831 \
--l1=https://eth-goerli.g.alchemy.com/v2/e0CsbXjGCT0xVVFc9MyaE7-olvSVAh4S \
--l1.rpckind=alchemy
#Description=<description about this service>

[Install]
WantedBy=multi-user.target


OP-BATCHER
cd /etc/systemd/system
sudo nano op-batcher.service
[Unit]
Description=Op-Batcher

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/testnet/optimism/op-batcher
ExecStart=/home/ubuntu/testnet/optimism/op-batcher/./bin/op-batcher \
--l2-eth-rpc=http://0.0.0.0:8545 \
--rollup-rpc=http://0.0.0.0:8547 \
--poll-interval=1s \
--sub-safety-margin=6 \
--num-confirmations=1 \
--safe-abort-nonce-too-low-count=3 \
--resubmission-timeout=30s \
--rpc.addr=0.0.0.0 \
--rpc.port=8548 \
--rpc.enable-admin \
--max-channel-duration=1 \
--l1-eth-rpc=https://eth-goerli.g.alchemy.com/v2/e0CsbXjGCT0xVVFc9MyaE7-olvSVAh4S \
--private-key=fe7cd7d67d1889b273c3f6a75fe7bbda585f3788d14b0ed28ce38b0cf38e910b


#Restart=always

[Install]
WantedBy=multi-user.target


OP-PROPOSER
cd /etc/systemd/system
sudo nano op-proposer.service

[Unit]
Description=Op-Proposer

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/testnet/optimism/op-proposer
ExecStart=/home/ubuntu/testnet/optimism/op-proposer/./bin/op-proposer \
--poll-interval 12s \
--rpc.port 8560 \
--rollup-rpc http://localhost:8547 \
--l2oo-address 0x555E7FB9E8743e28fF0c8b02f1F96503E0F615c3 \
--private-key 0ee48c48de8e43df13bcc01d5e8415ec3b52e28646ec7cdcf820c343783cd9e3 \
--l1-eth-rpc https://eth-goerli.g.alchemy.com/v2/e0CsbXjGCT0xVVFc9MyaE7-olvSVAh4S


#Restart=always

[Install]
WantedBy=multi-user.target


OP-EXPORTER Script file
#!/bin/bash

# Navigate to the appropriate directory where the makefile and op-exporter executable are located
cd /home/ubuntu/testnet/optimism/op-exporter

# Run the build command using 'make'
make build

# Run the op-exporter command with the specified arguments
./op-exporter --rpc.provider=https://racetestnet.io --label.network=RACE



OP-EXPORTER
cd /etc/systemd/system
sudo nano op-exporter.service
[Unit]
Description=op-exporter

[Service]
ExecStart=/home/ubuntu/testnet/op-exporter.sh

[Install]
WantedBy=multi-user.target


After creating all files enable all services by using this command :
sudo systemctl enable op-geth.service && sudo systemctl start op-geth.service
sudo systemctl enable op-node.service && sudo systemctl start op-node.service
sudo systemctl enable op-batcher.service && sudo systemctl start op-batcher.service
sudo systemctl enable op-proposer.service && sudo systemctl start op-proposer.service
sudo systemctl enable op-exporter.service && sudo systemctl start op-exporter.service
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.