Upgrading
Releases are tagged vX.Y.Z and listed, with what changed, in
CHANGELOG.md.
Each comes as a container image for amd64 and arm64
(ghcr.io/moe-studios/moekura:X.Y.Z, also tagged X.Y, X from 1.0 on,
and latest) and as Linux binaries on the release page.
From 1.0 on, versions follow semantic versioning: a patch release (1.0.0 → 1.0.1) only fixes things, a minor release (1.0 → 1.1) adds things without breaking existing sites, and only a major release (2.0) may remove or change what Stability lists. Before 1.0, a minor release (0.4 → 0.5) could change configuration or behaviour, and its changelog says what to do.
Steps
- Read the changelog for every release between yours and the new one.
- Back up the database.
- Replace the program: pull the new image, or put the new binary in place.
- Start it. Database migrations run on start unless
database.auto_migrate = false; with several servers, runmoekura migrateonce first, then restart them all.
Migrations only move forward. To go back to an older version, restore the backup you took.
Within 1.x
Upgrading from any 1.x release to any later 1.x release never needs more than the steps above, whichever releases are skipped: configuration, scripts and apps that worked keep working, as Stability describes. A minor release may deprecate something; the old name keeps working, and the log says what to change, so that the next major release needs no work. Anything that needs more is saved for 2.0, whose changelog will list what to do.
Overridden templates and translations (paths.templates_override,
paths.locales_override) aren’t covered: compare them with the new
release’s before upgrading.
Supported releases
After 1.0, the latest minor release gets bug and security fixes as patch releases. Bug fixes aren’t backported to older minor releases; security fixes are, for a while, as SECURITY.md says. Every upgrade test in CI starts from the previous release, so upgrading one release at a time is the best-tested path, but skipping releases works too.
Requirements
Moekura is tested with the versions in the container image and the compose files. The oldest versions supported:
| Oldest supported | Tested in CI | |
|---|---|---|
| PostgreSQL | 16 | 18 |
| Valkey (optional) | Valkey 7.2, or Redis 6.2 | Valkey 8 |
| libvips | 8.15 | 8.16 (Debian 13) and 8.18 (the image) |
| ffmpeg | 7.0 | 7.1 (Debian 13) and 9.0 (the image) |
| glibc, for the release binaries | 2.39 | Ubuntu 24.04 |
| Rust, to build from source | 1.94 | 1.94 and the latest stable |
Raising one of these happens only in a minor release, never in a patch release, and is announced in the changelog of the minor release before. A PostgreSQL version stays supported at least until its maintainers stop supporting it. The container image always ships what it needs, so this matters only for sites run without containers or with their own database.
With Docker Compose
Point the app service at a release instead of building it:
services:
app:
image: ghcr.io/moe-studios/moekura:0.8
docker compose -f deploy/compose.tiny.yml pull
docker compose -f deploy/compose.tiny.yml up -d
Binaries
The Linux binaries are built on Ubuntu 24.04 and need glibc 2.39 or newer (Debian 13, Ubuntu 24.04, Fedora 40 and later), plus the media tools.
Changed defaults
Defaults that changed after 0.5. Sites that set these themselves keep what they set; sites that relied on the old default behave differently after upgrading.
Metadata is removed from originals
media.strip_metadata is now "strip" (it was
"off"). EXIF (with GPS positions and camera serial numbers), XMP, IPTC
and comments are taken out of new JPEG, PNG and WebP originals before
they’re stored, so Download original no longer hands them to
everyone, and the post’s SHA-256 and MD5 are those of the cleaned file.
Files of other types (GIF, AVIF, JPEG XL, videos, ugoira) still keep
their metadata, and posts uploaded before the upgrade keep their
originals as they are. To keep originals exactly as uploaded, set
strip_metadata = "off". See File metadata.
Connections are limited
The server serves at most 512 connections at once
(server.connections.max); more
wait their turn. A connection that goes 10 seconds without sending a
request’s headers (idle_timeout_secs) is closed, which includes
keep-alive connections left idle; clients open a new one. Once closing,
it’s cut off if the client takes none of its response for 60 seconds
(send_timeout_secs), so a download paused for longer than that stops.
A busy site served without a reverse proxy may need a higher max, and
an open file limit (ulimit -n) to match.
The compose file publishes the app on this machine only
deploy/compose.tiny.yml publishes port 8080 on 127.0.0.1 instead of
on every network the machine is on. A reverse proxy on the same machine
keeps working. If people reached the app at http://<server>:8080
directly, put a reverse proxy in front, or
publish it on every network again with "8080:8080" in your copy,
knowing that Docker’s published ports get past host firewalls such as
ufw.