-
Notifications
You must be signed in to change notification settings - Fork 28
/
mintlayer-node-testnet.service
41 lines (32 loc) · 1.32 KB
/
mintlayer-node-testnet.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# For mainnet, change every testnet instance to mainnet
[Unit]
Description=Mintlayer Testnet Daemon
After=syslog.target network-online.target
# RULES for picking a user:
# 1. DO NOT use root
# 2. DO NOT use a user that has root access through sudo, doas, or similar
[Service]
User=mintlayeruser
# Type is simple because the node-daemon is blocking
Type=simple
# Path of the source code OR executable
WorkingDirectory=/home/mintlayeruser/mintlayer-core
# Use this if you want the node to be built from source
ExecStart=cargo run -j 1 --release --bin node-daemon -- testnet
# If you're using an executable and didn't clone the source, comment the line above, and uncomment below
#ExecStart=/path/to/node-daemon testnet
Environment="RUST_BACKTRACE=full"
# Change `info` to `debug` for deeper logs
Environment="RUST_LOG=info"
# Only if compiling from source: Add debug info when building
Environment="RUSTFLAGS=-g"
# Always restart when the server is killed for any reason, and wait 60 seconds before retrying
Restart=always
RestartSec=60s
# Make the timeout too long if you're using cargo run above, to give the service time to build
TimeoutSec=900
# Log files stored in /var/log/
StandardOutput=append:/var/log/mintlayer-node-testnet-stdout.log
StandardError=append:/var/log/mintlayer-node-testnet-stderr.log
[Install]
WantedBy=multi-user.target