No description
  • Shell 51.9%
  • Python 47.4%
  • Makefile 0.7%
Find a file
2026-03-18 18:59:50 -03:00
conf.d first commit without test on tkldev working on lxc 2026-03-18 15:51:31 -03:00
overlay first commit without test on tkldev working on lxc 2026-03-18 15:51:31 -03:00
plan first commit without test on tkldev working on lxc 2026-03-18 15:51:31 -03:00
changelog first commit without test on tkldev working on lxc 2026-03-18 15:51:31 -03:00
Makefile first commit without test on tkldev working on lxc 2026-03-18 15:51:31 -03:00
README.md Readme .rst to .md 2026-03-18 18:59:50 -03:00

Mastodon - Federated social networking server

Mastodon <https://github.com/mastodon/mastodon>_ is a self-hosted social networking server built around ActivityPub. This TurnKey appliance scaffold is designed for contributing a new appliance repository to turnkeylinux-apps.

This repository follows the usual TurnKey layout:

  • Makefile for product metadata and firewall ports.
  • plan/main for extra Debian packages.
  • conf.d/ for fully automated build-time installation.
  • overlay/ for static files, systemd units, nginx config, inithooks, and backup overrides.

What this scaffold currently does

  • creates a dedicated mastodon system user
  • installs PostgreSQL, Redis, Nginx, Ruby build dependencies, Node toolchain prerequisites, ffmpeg, ImageMagick, and libvips
  • clones Mastodon from upstream into /opt/mastodon/live
  • installs Ruby with rbenv and JavaScript dependencies with corepack/Yarn
  • seeds a production .env.production with placeholder values during build
  • runs db:prepare and assets:precompile during build
  • installs Nginx and systemd service templates
  • includes a firstboot application hook to set domain/email/password and create the owner account

Important notes

This is a serious starter repository, but it is still a first pass. Before opening a PR upstream, I strongly recommend:

  • building it in tkldev and validating a full non-interactive build
  • pinning a specific Mastodon tag that is known-good for the target TurnKey release
  • validating the exact Ruby/Node versions resolved from upstream on Debian 12/TurnKey 18
  • testing firstboot both in ISO and LXC flows
  • deciding whether to keep build-time secret generation or move more of it into firstboot
  • reviewing whether a Confconsole Let's Encrypt plugin should be added, like GitLab does

Repository layout

::

.
├── .art/
├── conf.d/
├── overlay/
│   ├── etc/nginx/sites-available/mastodon
│   ├── etc/systemd/system/mastodon-*.service
│   ├── usr/lib/inithooks/bin/mastodon.py
│   └── usr/lib/inithooks/firstboot.d/40mastodon
├── Makefile
├── README.rst
├── changelog
└── plan/main

Suggested development flow

::

git clone https://github.com/turnkeylinux-apps/core.git mastodon
# replace with this repository contents

make CHROOT_ONLY=y
fab-chroot build/root.sandbox

# manually validate build assumptions inside the chroot
# then iterate on conf.d and overlay

deck -D build/root.sandbox
make clean
make

Potential next improvements

  • add a Confconsole plugin for domain/Let's Encrypt integration
  • add a tklweb-cp welcome page with Mastodon service status
  • add logrotate overrides if required
  • add a safer admin-password set path if tootctl behavior changes upstream
  • add optional object storage/S3 firstboot questions later