Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update systemd unit file #135

Merged
merged 1 commit into from
Feb 27, 2024
Merged

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Feb 27, 2024

  • Set a nicer unit description.
  • Use network.target instead of network-online.target. As per https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html#network-online.target, mycelium doesn't strictly require a configured network connection (whatever that means). network.target should be sufficient, we probably need the IP stack and a loopback interface, but everything else should be OK to change later on.
  • Use StateDirectory=mycelium and -k %S/mycelium-key.bin. Key material is state, not config, especially if it's autocreated on first startup. Combine with StateDirectoryMode=0700, to ensure the directory can't be accessed by other users.

 - Set a nicer unit description.
 - Use `network.target` instead of `network-online.target`.
   As per https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html#network-online.target,
   mycelium doesn't strictly require a configured network connection
   (whatever that means).
   `network.target` should be sufficient, we probably need the IP stack
   and a loopback interface, but everything else should be OK to change
   later on.
 - Use `StateDirectory=mycelium` and -k `%S/mycelium-key.bin`.
   Key material is state, not config, especially if it's autocreated
   on first startup. Combine with `StateDirectoryMode=0700`, to ensure
   the directory can't be accessed by other users.
@flokli flokli force-pushed the systemd-unit-updates branch from ccef021 to ed959c7 Compare February 27, 2024 20:33
@LeeSmet
Copy link
Contributor

LeeSmet commented Feb 27, 2024

Thanks. From the documentation network.target should indeed be sufficient. I wasn't aware of the StateDirectory, I wonder if service credentials are an option, might look into that later.

@LeeSmet LeeSmet merged commit 04e5207 into threefoldtech:master Feb 27, 2024
3 checks passed
@flokli flokli deleted the systemd-unit-updates branch April 1, 2024 15:54
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.

2 participants