Skip to content

Create Init service file for OpenRC#1650

Merged
binwiederhier merged 7 commits into
binwiederhier:mainfrom
ageru:main
Mar 25, 2026
Merged

Create Init service file for OpenRC#1650
binwiederhier merged 7 commits into
binwiederhier:mainfrom
ageru:main

Conversation

@ageru
Copy link
Copy Markdown
Contributor

@ageru ageru commented Mar 11, 2026

Hi 👋

This in an init file for OpenRC systems.

It should be equivalent in features to the current systemd file, with 2 deliberate changes:

  • removed "no-log-dates", as the logs are fine as-is
  • Lower nofile limit, as it seems largely sufficient for a self-hosted instance. Feel free to increase to 8192 or 10240 if necessary.

Confirmed functional with Gentoo amd64 and ntfy 2.17.0.

Since I had to create it to get ntfy running on my server, I thought I would spare others the trouble...

Kind regards,

ageru

ageru added 2 commits March 11, 2026 21:56
This in an init file for OpenRC systems.

It should be equivalent in features to the current systemd file, with 2 deliberate changes:
- removed "no-log-dates", as the logs are fine as-is
- Lower nofile limit, as it seems largely sufficient for a self-hosted instance. Feel free to increase to 8192 or 10240 if necessary.

Confirmed functional with Gentoo amd64 and ntfy 2.17.0.
@binwiederhier
Copy link
Copy Markdown
Owner

What's the benefit of including this in the main repo? Would we not want to document this in the docs somewhere?

@ageru
Copy link
Copy Markdown
Contributor Author

ageru commented Mar 15, 2026

The systemd unit file for ntfy server being in the main repo, it seemed a good idea to add this OpenRC init script alongside it, since it serves the same purpose, just on a different init.

I commented the code with installation steps, but I can see it would be more appropriate within the docs. How about enriching the section https://docs.ntfy.sh/install/#linux-binaries ? I could develop a bit that section, adding a few steps:

  • create the ntfy user/group
  • install the ntfy server service on systemd/OpenRC
  • launch the service on systemd/OpenRC

That would be helpful to people that happen to be on an systemd/OpenRC distro without an ntfy package.

@binwiederhier
Copy link
Copy Markdown
Owner

The reason the systemd file is there is because we build deb+rpm packages that include it. The openrc file would just be entirely lost/dangling, so referencing it in the docs may be a good idea. The listed section sounds good.

Comment thread server/ntfy.openrc
@ageru ageru requested a review from binwiederhier March 24, 2026 22:39
@binwiederhier binwiederhier merged commit 42b0254 into binwiederhier:main Mar 25, 2026
@binwiederhier
Copy link
Copy Markdown
Owner

Thank you

alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Mar 26, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [binwiederhier/ntfy](https://github.com/binwiederhier/ntfy) | minor | `2.19.2` → `2.20.0` |
| [binwiederhier/ntfy](https://ntfy.sh/) ([source](https://github.com/binwiederhier/ntfy)) | minor | `v2.19.2` → `v2.20.0` |

---

### Release Notes

<details>
<summary>binwiederhier/ntfy (binwiederhier/ntfy)</summary>

### [`v2.20.0`](https://github.com/binwiederhier/ntfy/releases/tag/v2.20.0)

[Compare Source](binwiederhier/ntfy@v2.19.2...v2.20.0)

This release is another step towards making it possible to help scale ntfy up and out 🔥! With this release, you can store attachments in an S3-compatible object store as an alterative to the directory. See [attachment store](https://docs.ntfy.sh/config/#attachments) for details.

> ⚠️ **Important note:**  With this release, ntfy will take full control over the attachment directory or S3 bucket. Files/objects in the configured `attachment-cache-dir` that match the message ID format (12 chars, matching `^[A-Za-z0-9]{12}$`), and have no entries in the message database will be deleted. **Do not use a directory or S3 bucket as `attachment-cache-dir` that is also used for something else.**
>
> This is a small behavioral change that was necessary because the old logic often left attachments behind and would not clean them up. Unless you have re-used the attachment directory for anything else (which is hopefully never done), this should not affect you at all.

**Features:**

- Add S3-compatible object storage as an alternative [attachment store](https://docs.ntfy.sh/config/#attachments) via `attachment-cache-dir` config option ([#&#8203;1656](https://github.com/binwiederhier/ntfy/pull/1656)/[#&#8203;1672](https://github.com/binwiederhier/ntfy/pull/1672))

**Bug fixes + maintenance:**

- Reject invalid e-mail addresses (e.g. multiple comma-separated recipients) with HTTP 400
- Add OpenRC init service file ([#&#8203;1650](binwiederhier/ntfy#1650), thanks to [@&#8203;ageru](https://github.com/ageru) for the contribution)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My45MS4xIiwidXBkYXRlZEluVmVyIjoiNDMuOTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZG9ja2VyIiwiZ2l0aHViLXJlbGVhc2VzIl19-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/5160
Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net>
Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
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