Last active
September 30, 2023 20:53
-
-
Save boldsuck/468036b5123320608c4f4f5fc70e90f5 to your computer and use it in GitHub Desktop.
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
[Unit] | |
Description=Monero Full Node (Mainnet) | |
After=network.target | |
[Service] | |
# Process management | |
#################### | |
Type=simple | |
PIDFile=/run/monero/monerod.pid | |
ExecStart=/usr/local/bin/monerod --config-file=/etc/monero/monerod.conf --detach --pidfile=/run/monero/monerod.pid | |
StandardOutput=null | |
StandardError=null | |
Restart=on-failure | |
RestartSec=30 | |
# Directory creation and permissions | |
#################################### | |
# Run as monero:monero | |
User=monero | |
Group=monero | |
# /run/monero | |
RuntimeDirectory=monero | |
RuntimeDirectoryMode=0710 | |
# /var/lib/monero | |
StateDirectory=monero | |
StateDirectoryMode=0710 | |
# /var/log/monero | |
LogsDirectory=monero | |
LogsDirectoryMode=0710 | |
# /etc/monero | |
ConfigurationDirectory=monero | |
ConfigurationDirectoryMode=0710 | |
# Hardening measures | |
#################### | |
# Provide a private /tmp and /var/tmp. | |
PrivateTmp=true | |
# Mount /usr, /boot/ and /etc read-only for the process. | |
ProtectSystem=full | |
# Deny access to /home, /root and /run/user | |
ProtectHome=true | |
# Disallow the process and all of its children to gain | |
# new privileges through execve(). | |
NoNewPrivileges=true | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment