From c8eb6c4a8b70580e564b3f86833c5b553a856101 Mon Sep 17 00:00:00 2001 From: Luis Schwab Date: Sat, 7 Mar 2026 15:21:30 -0300 Subject: [PATCH 1/2] feat(mailroom): add example `systemd` service --- payjoin-mailroom/payjoin-mailroom.example.service | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 payjoin-mailroom/payjoin-mailroom.example.service diff --git a/payjoin-mailroom/payjoin-mailroom.example.service b/payjoin-mailroom/payjoin-mailroom.example.service new file mode 100644 index 000000000..c806713e4 --- /dev/null +++ b/payjoin-mailroom/payjoin-mailroom.example.service @@ -0,0 +1,15 @@ +[Unit] +Description=Payjoin Mailroom +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=root +WorkingDirectory=/root/rust-payjoin/payjoin-mailroom +ExecStart=/root/.cargo/bin/payjoin-mailroom --config /root/rust-payjoin/payjoin-mailroom/config.toml +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target From 2733365f9d6f7b8d546542166cd3063eaef9f8c7 Mon Sep 17 00:00:00 2001 From: spacebear Date: Sat, 7 Mar 2026 13:54:52 -0500 Subject: [PATCH 2/2] Add mailroom systemd README --- payjoin-mailroom/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/payjoin-mailroom/README.md b/payjoin-mailroom/README.md index 19fc60b7a..7955ee7fb 100644 --- a/payjoin-mailroom/README.md +++ b/payjoin-mailroom/README.md @@ -32,6 +32,15 @@ The rust-payjoin flake also provides `payjoin-mailroom` as a package. nix run .#payjoin-mailroom -- --config payjoin-mailroom/config.toml ``` +### systemd + +```sh +# A minimal [payjoin-mailroom.example.service](payjoin-mailroom.example.service) unit file is provided for convenience. Edit paths and User= as your setup requires. +vim /etc/systemd/system/payjoin-mailroom.service +systemctl daemon-reload +systemctl enable --now payjoin-mailroom +``` + ## Telemetry payjoin-mailroom supports **optional** OpenTelemetry-based telemetry (metrics).