Last active
January 1, 2022 01:18
-
-
Save Wondertan/9e016f819d0a0c7b4744deec595bae33 to your computer and use it in GitHub Desktop.
Lotus Daemon `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-daemin.service | |
[Unit] | |
Description=Lotus Daemon Service | |
After=network-online.target | |
Requires=network-online.target | |
[Service] | |
User=lotus # or any other user | |
ExecStart=/usr/local/bin/lotus daemon | |
ExecStop=/usr/local/bin/lotus daemon stop | |
Restart=always | |
RestartSec=10 | |
# Most paths below relies on /lotus path, but you can use any path, though I generally recommend using my package structure | |
Environment=LOTUS_PATH=/lotus/daemon-repo | |
Environment=FIL_PROOFS_PARAMETER_CACHE=/lotus/params | |
Environment=GOLOG_OUTPUT=file | |
Environment=GOLOG_FILE=/lotus/logs/daemon.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/daemon_rust.log | |
MemoryAccounting=true | |
MemoryHigh=8G | |
MemoryMax=64G # Thi can be lower, about 10G is enough, however if you do chain snapshotting, that may take more than 10G | |
LimitNOFILE=8192:10240 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment