Skip to content

Instantly share code, notes, and snippets.

@Wondertan
Created June 11, 2021 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Wondertan/1cd37514598b36154fc90763c47859f5 to your computer and use it in GitHub Desktop.
Save Wondertan/1cd37514598b36154fc90763c47859f5 to your computer and use it in GitHub Desktop.
Lotus C2 Worker `systemd` service.
# /etc/systemd/system/lotus-worker-c2.service
[Unit]
Description=Lotus C2 Worker Service
After=network.target
[Service]
User=lotus # or any other user
ExecStart=/usr/local/bin/lotus-worker run --no-local-storage --addpiece=false --precommit1=false --unseal=false --precommit2=false --commit=true --parallel-fetch-limit 10 --listen 192.168.88.105:3458
Restart=always
RestartSec=10
LimitNOFILE=1048576:1048576
# Required Paths
Environment=LOTUS_WORKER_PATH=/lotus/worker-repo
Environment=FIL_PROOFS_PARAMETER_CACHE=/lotus/params
Environment=FIL_PROOFS_PARENT_CACHE=/lotus/parents
Environment=TMPDIR=/lotus/tmp3
# C2 related env vars
Environment=BELLMAN_CUSTOM_GPU="GeForce RTX 3090:10496" # Set your GPU here
Environment=BELLMAN_CPU_UTILIZATION=0 # Zero means no CPU utilization. Keep it zero if you want you GPU to be fully utilized.
Environment=FIL_PROOFS_MAXIMIZE_CACHING=1
Environment=FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1
Environment=FIL_PROOFS_USE_GPU_TREE_BUILDER=1
# Logging
Environment=GOLOG_OUTPUT=file
Environment=GOLOG_FILE=/lotus/logs/worker3.log
#Environment=GOLOG_LOG_FMT=json
Environment=RUST_LOG=info
Environment=RUST_BACKTRACE=full
StandardOutput=append:/lotus/logs/worker3_rust.log
# Access to Miner/Daemon
Environment=FULLNODE_API_INFO= # sensetive info, should be gathered from lotus auth api-info --perm admin
Environment=MINER_API_INFO= # sensetive info, should be gathered from lotus-miner auth api-info --perm admin
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment