Skip to content

monerod: update systemd config#294

Merged
nahuhh merged 1 commit intomonero-project:masterfrom
thomasbuilds:master
Apr 16, 2026
Merged

monerod: update systemd config#294
nahuhh merged 1 commit intomonero-project:masterfrom
thomasbuilds:master

Conversation

@thomasbuilds
Copy link
Copy Markdown
Contributor

@thomasbuilds thomasbuilds commented Mar 31, 2026

This pull request updates the example systemd service configuration for running monerod to simplify the setup and improve reliability. The changes focus on making the service easier to manage and more robust, especially in how it starts and interacts with the system.

Service configuration improvements:

  • Changed the Type from forking to simple and removed the use of --detach and the PIDFile, so systemd manages the process directly without needing to track a separate daemonized process.
  • Added Requires=network-online.target to ensure the service only starts after the network is fully online, improving startup reliability.
  • Updated the ExecStart command to remove unnecessary options and add --non-interactive for better automation and compatibility with systemd.
  • Removed the RuntimeDirectory directive, simplifying the configuration since the service no longer needs to manage a PID file.

@github-actions
Copy link
Copy Markdown

What Link
🕵️‍♂️ Review Files changed
🌐 Deploy Preview #294

Comment thread docs/en/running-node/monerod-systemd.md Outdated
Comment thread docs/en/running-node/monerod-systemd.md Outdated
Copy link
Copy Markdown
Collaborator

@nahuhh nahuhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to squash the commits

cc @plowsof for a second pair of eyes

Comment thread docs/en/running-node/monerod-systemd.md Outdated
Comment thread docs/en/running-node/monerod-systemd.md Outdated
Comment thread docs/en/running-node/monerod-systemd.md
Comment thread docs/en/running-node/monerod-systemd.md Outdated
@thomasbuilds thomasbuilds requested review from nahuhh and plowsof April 1, 2026 18:21
Copy link
Copy Markdown
Collaborator

@nahuhh nahuhh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you squash the commits and rename the commit to something like `monerod: update systemd config"

@thomasbuilds thomasbuilds changed the title Update monerod systemd service configuration monerod: update systemd config Apr 2, 2026
@thomasbuilds
Copy link
Copy Markdown
Contributor Author

Can you squash the commits and rename the commit to something like `monerod: update systemd config"

Done. Out of curiosity, why don't you want to use GitHub's built-in squash and merge?

@thomasbuilds thomasbuilds requested a review from nahuhh April 2, 2026 08:48
@nahuhh
Copy link
Copy Markdown
Collaborator

nahuhh commented Apr 2, 2026

Because it modifies your commits. Maintainers on monero-project merge as-is

@thomasbuilds
Copy link
Copy Markdown
Contributor Author

thomasbuilds commented Apr 2, 2026

Would you be interested in hardening the daemon's systemd service?

I managed to get monerod.service down to a 1.5 OK score with systemd-analyze security
Right now it's rated UNSAFE

Adding the following worked for me without affecting node functionality in any way:

# optional hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectHostname=true
ProtectClock=true
LockPersonality=true
RestrictRealtime=true
ProtectKernelLogs=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
PrivateDevices=true
UMask=0077
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/monero
ReadOnlyPaths=/etc/monero
CapabilityBoundingSet=
RestrictNamespaces=true
ProtectProc=invisible
ProcSubset=pid
RemoveIPC=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
SystemCallFilter=@system-service ~@privileged
SystemCallErrorNumber=EPERM

@nahuhh nahuhh merged commit e9a8778 into monero-project:master Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants