Running Mastodon on FreeBSD?
-
Running Mastodon on FreeBSD? Stop using wrapper scripts that break service status.
I've refactored the init scripts for Sidekiq, Puma, and Streaming to be fully production-grade:
- Clean privilege dropping (no su wrappers)
- Native signal handling for log rotation
- Correct PID tracking & status reporting.I published the scripts and the reasoning behind them in my Codeberg gists:
https://codeberg.org/Larvitz/gists/src/branch/main/2026/20250115-FreeBSD_Mastodon_rc.d.md
I use those to run a Mastodon instance and they're working great so far!
❤️ 🦣 #FreeBSD #Mastodon #SelfHosting #mastoadmin #runbsd #OpenSource
-
Running Mastodon on FreeBSD? Stop using wrapper scripts that break service status.
I've refactored the init scripts for Sidekiq, Puma, and Streaming to be fully production-grade:
- Clean privilege dropping (no su wrappers)
- Native signal handling for log rotation
- Correct PID tracking & status reporting.I published the scripts and the reasoning behind them in my Codeberg gists:
https://codeberg.org/Larvitz/gists/src/branch/main/2026/20250115-FreeBSD_Mastodon_rc.d.md
I use those to run a Mastodon instance and they're working great so far!
❤️ 🦣 #FreeBSD #Mastodon #SelfHosting #mastoadmin #runbsd #OpenSource
@Larvitz Thank you!
-
Running Mastodon on FreeBSD? Stop using wrapper scripts that break service status.
I've refactored the init scripts for Sidekiq, Puma, and Streaming to be fully production-grade:
- Clean privilege dropping (no su wrappers)
- Native signal handling for log rotation
- Correct PID tracking & status reporting.I published the scripts and the reasoning behind them in my Codeberg gists:
https://codeberg.org/Larvitz/gists/src/branch/main/2026/20250115-FreeBSD_Mastodon_rc.d.md
I use those to run a Mastodon instance and they're working great so far!
❤️ 🦣 #FreeBSD #Mastodon #SelfHosting #mastoadmin #runbsd #OpenSource
@Larvitz Oh, that looks very nice, I'll have to copy that for my instance!
-
@Larvitz Oh, that looks very nice, I'll have to copy that for my instance!
@jana Feel free to adapt whatever you need :) I run my instance for several weeks with them and finally newsyslog log-rotation works properly 🙂
-
undefined stefano@mastodon.bsd.cafe shared this topic
-
Running Mastodon on FreeBSD? Stop using wrapper scripts that break service status.
I've refactored the init scripts for Sidekiq, Puma, and Streaming to be fully production-grade:
- Clean privilege dropping (no su wrappers)
- Native signal handling for log rotation
- Correct PID tracking & status reporting.I published the scripts and the reasoning behind them in my Codeberg gists:
https://codeberg.org/Larvitz/gists/src/branch/main/2026/20250115-FreeBSD_Mastodon_rc.d.md
I use those to run a Mastodon instance and they're working great so far!
❤️ 🦣 #FreeBSD #Mastodon #SelfHosting #mastoadmin #runbsd #OpenSource
@Larvitz Excellent work. Those 'bad' scripts are mine, written in 2022 for a blog post about installing Mastodon on FreeBSD (which was deemed 'difficult' or 'impossible' then). I didn't catch these problems because I run Mastodon in a jail and typically restart the whole jail rather than individual services.
-
@Larvitz Excellent work. Those 'bad' scripts are mine, written in 2022 for a blog post about installing Mastodon on FreeBSD (which was deemed 'difficult' or 'impossible' then). I didn't catch these problems because I run Mastodon in a jail and typically restart the whole jail rather than individual services.
@stefano Definitely not meant as critique.
I started with some scripts from the internet (might have been yours, I found them via search-engine) but had issues with log-rotation and signal handling from newsyslog, so I optimized it to suit my needs. Now they handle SIGHUP properly and allow proper log rotation 🙂 Just thought, I share them here, just in case someone else might benefit from it.
-
@stefano Definitely not meant as critique.
I started with some scripts from the internet (might have been yours, I found them via search-engine) but had issues with log-rotation and signal handling from newsyslog, so I optimized it to suit my needs. Now they handle SIGHUP properly and allow proper log rotation 🙂 Just thought, I share them here, just in case someone else might benefit from it.
@Larvitz No, I didn't see it as a criticism at all. I'm glad you shared them, they'll definitely be helpful to a lot of people
-
@Larvitz No, I didn't see it as a criticism at all. I'm glad you shared them, they'll definitely be helpful to a lot of people
@stefano Just checked where I've got the original rc scripts from, and that was actually your blog post 🙂 In my initial post, I attributed you and put a link to your website https://blog.hofstede.it/migrating-burningboardnet-mastodon-instance-to-a-multi-jail-freebsd-setup/
During the weekend, I'll update my post to reflect the current optimizations.