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

Add systemd service unit example #475

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Add systemd service unit example #475

merged 1 commit into from
Sep 27, 2022

Conversation

mk-fg
Copy link
Contributor

@mk-fg mk-fg commented Sep 22, 2022

Haven't found systemd unit next to Dockerfile and thought that maybe one will be useful in the repository.

Not sure if maybe this is deliberately left up to distros, but given that releases supply simple binaries, maybe useful to have for people who use those in some systemd-enabled env (most linux distros, incl. in VMs or nspawn/lxc containers).

This unit sets up everything-readonly-but-one-homedir container (DynamicUser=yes implies most of it).
With static Go binary, it might also be possible to configure something simplier like TemporaryFileSystem=/ + BindReadOnlyPaths='/proc /usr/bin/matterircd:/matterircd' to basically get same thing as Docker container in fs namespace, but dunno if daemon might still need libc and its stuff in /etc with some builds.

Since extremely verbose and potentially sensitive slack logging is always set at "debug" level, example includes an ExecStart= which would dump it to logfiles instead of sharing it into system logs (bad idea for such noisy/sensitive stuff).

@42wim
Copy link
Owner

42wim commented Sep 27, 2022

Looks good as a starting point that people can modify, thanks!

@42wim 42wim merged commit 1010e18 into 42wim:master Sep 27, 2022
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