Last active
January 1, 2022 01:17
-
-
Save Wondertan/7fbc6653b9ca022ab5dde22f4b1bf77d to your computer and use it in GitHub Desktop.
Lotus PC1 Worker `systemd` service.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/lotus-worker-pc1.service | |
[Unit] | |
Description=Lotus PC1 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=true --unseal=true --precommit2=false --commit=false --parallel-fetch-limit 10 --listen 192.168.88.106:3456 | |
Restart=always | |
RestartSec=10 | |
LimitNOFILE=1048576:1048576 | |
LimitMEMLOCK=1000000000 # Set this acording to amount of RAM you have for a worker. | |
# Required Paths | |
# Most paths below relies on /lotus path, but you can use any path, though I generally recommend using my package structure | |
Environment=LOTUS_WORKER_PATH=/lotus/worker-repo | |
Environment=FIL_PROOFS_PARAMETER_CACHE=/lotus/params | |
Environment=FIL_PROOFS_PARENT_CACHE=/lotus/parents | |
Environment=TMPDIR=/lotus/tmp | |
# PC1 related env vars | |
# Fill here vars like SDR related that suits your hardware | |
# For 7F52 I use that's the only param needed. | |
Environment=FIL_PROOFS_MAXIMIZE_CACHING=1 | |
# Logging | |
Environment=GOLOG_OUTPUT=file | |
Environment=GOLOG_FILE=/lotus/logs/worker.log | |
#Environment=GOLOG_LOG_FMT=json # Uncomment this in case you want machine readable logs in JSON | |
Environment=RUST_LOG=info | |
Environment=RUST_BACKTRACE=full | |
StandardOutput=append:/lotus/logs/worker_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