Перейти к содержимому

Compose without rexctl

Until late 2026, each part of Squad ran in its own container. Now one container runs them all, and fluxerd inside it starts, watches and restarts each part. Most of what the older layout let you do in compose.yaml still works there. You can keep every setting in the compose file, turn off parts you don’t use, run your own PostgreSQL or S3 store next to Squad, and restart or follow one part at a time.

This page needs only Docker and the files from the Docker guide. rexctl is optional.

rexctl migrate --to compose moves an instance on the older layout to one container with a compose.yaml and fluxer.env that you run yourself. Your settings, users, messages and uploads stay.

  1. See what the move would do, without changing anything.

    Окно терминала
    sudo rexctl migrate --to compose --dry-run
  2. Move.

    Окно терминала
    sudo rexctl migrate --to compose
  3. Once your messages and uploads are there, remove the old containers.

    Окно терминала
    sudo rexctl migrate --clean-up

From then on, rexctl manages nothing in the new folder, and you can remove rexctl. Move and run it yourself with docker compose has the full steps, and Moved here with rexctl has what is different in that folder.

rexctl also moves compose files of your own that use extends or include. To move without rexctl, or with compose files that rexctl refuses, such as files outside the instance folder, follow Move by hand with docker compose. fluxerd import in the new container copies the old data, and fluxerd restore loads it.

Settings can go under environment: in compose.yaml instead of in fluxer.env. Remove the env_file line once every setting is there.

Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.

Run docker compose up -d after each change.

  • With both env_file and environment:, a setting under environment: wins over the same setting in fluxer.env.
  • Inside the container, Squad also loads /etc/fluxer/fluxer.env when it is there. The release compose.yaml mounts nothing there, and Squad starts fine without it. When you mount one, a setting from compose.yaml wins over the same setting in that file.
  • An empty value never replaces a value from /etc/fluxer/fluxer.env. FLUXER_SEARCH_ENGINE: "" in compose.yaml keeps what that file sets. To turn something off, give it its off value, such as none or false.
  • Compose treats $ in compose.yaml as the start of a variable. Write $$ for each $ in a value, or keep the value in a file.

To check the settings without restarting anything, run docker compose exec fluxer fluxerd check-config. Settings reference lists every setting.

docker compose exec fluxer fluxerd ps lists the parts that run. These ones can be turned off or replaced.

PartSettingWhat changes
Search, meilisearchFLUXER_SEARCH_ENGINE=noneSearch is off and Meilisearch doesn’t start.
Your own MeilisearchFLUXER_MEILISEARCH_BUNDLED=false with FLUXER_SEARCH_URL and FLUXER_SEARCH_API_KEYSquad uses the Meilisearch at that address with that key, and doesn’t start its own.
Voice and video, livekitFLUXER_LIVEKIT_ENABLED=falseCalls are off and LiveKit doesn’t start. Leave out ports 7881 and 7882.
Calls on other machinesFLUXER_LIVEKIT_BUNDLED=falseSquad doesn’t start its own LiveKit and keeps calls on the other machines you add.
Link previews, unfurl, inside rust on a new instanceFLUXER_UNFURL_ENABLED=falseLinks in messages show no preview.

The unfurl service also checks the domains and the Bluesky accounts that people link to their profile, and it holds the key for the instance’s ActivityPub actor. With it off, people can’t link those either, and the instance has no ActivityPub actor.

With your own Meilisearch, FLUXER_SEARCH_URL needs an address the container can connect to, such as http://meilisearch:7700 for a service in the same compose.yaml. 127.0.0.1 and localhost are the container itself. The key is the Meilisearch master key, or an API key with access to every action and index. Search starts empty, so open “Search Index” in the admin panel and choose “Reindex everything”.

These parts always run.

  • fluxerd, with the edge (Caddy) and the message queue (NATS) inside it
  • api, the HTTP API and the background worker
  • gateway, the WebSocket connections for live updates
  • media-proxy, which resizes and serves images and other media
  • The other Rust services: snowflakes, users, messages, gifs, push, app-proxy and admin
  • postgres, unless you use your own PostgreSQL

An instance moved from the older layout can also run valkey and seaweedfs. What runs says when they don’t.

Your own PostgreSQL or S3-compatible store can run as another service in the same compose.yaml. Squad then connects to it by its service name, and doesn’t start its own.

To useSettings
Your own PostgreSQL 14 or laterFLUXER_POSTGRES_URL, such as postgres://fluxer:password@postgres:5432/fluxer
Your own S3-compatible storeFLUXER_S3_ENDPOINT, such as http://s3:9000, with FLUXER_S3_ACCESS_KEY, FLUXER_S3_SECRET_KEY and FLUXER_S3_REGION

The store needs the four buckets before Squad starts: fluxer, fluxer-uploads, fluxer-reports and fluxer-harvests, or the ones you set in the FLUXER_S3_BUCKET_* settings. To let browsers upload to the store themselves, set FLUXER_S3_PUBLIC_ENDPOINT to an address they can connect to.

This compose.yaml runs a new instance on PostgreSQL in its own container. Pick a long password of letters and digits, because it also goes in the URL.

Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.

Squad’s backups then leave out the database, and with your own store they leave out the uploads too. Back those up with their own tools, as What a backup leaves out says.

To move uploads that an instance already has to your own store, use rexctl migrate --migrate s3. It works on one container that rexctl runs, so run rexctl adopt first, and rexctl detach afterwards to run it yourself again.

To move the database, load it from a backup into your own PostgreSQL 17 or later, because the backup comes from PostgreSQL 17 in the image. fluxerd restore refuses while FLUXER_POSTGRES_URL is set, so load the dump with pg_restore.

  1. Take a backup and stop Squad. Anything posted between the two commands is not in the backup, so do this when the instance is quiet.

    Окно терминала
    docker compose exec -T fluxer fluxerd backup --out - > fluxer-backup.tar.zst
    docker compose stop fluxer
  2. Add the postgres service from above to compose.yaml, without FLUXER_POSTGRES_URL yet, and start only that service.

    Окно терминала
    docker compose up -d postgres
  3. Take the dump out of the backup and load it.

    Окно терминала
    tar --zstd -xf fluxer-backup.tar.zst postgres/fluxer.dump
    docker compose exec -T postgres pg_restore --no-owner --no-acl -U fluxer -d fluxer < postgres/fluxer.dump
  4. Add FLUXER_POSTGRES_URL and start Squad.

    Окно терминала
    docker compose up -d

Squad’s own copy of the database stays in its volume, and Squad no longer uses it.

Окно терминала
docker compose exec fluxer fluxerd ctl restart api

Squad restarts only that part, and the rest keeps running. fluxerd ps shows each part’s name.

The Rust services run as one part called rust on a new instance. To restart or follow them one by one, such as unfurl or users, run each in its own process. This uses more memory.

compose.yaml
services:
fluxer:
environment:
FLUXER_RUST_PROCESS: per-service
Окно терминала
docker compose logs fluxer
docker compose exec fluxer fluxerd logs api
docker compose exec fluxer fluxerd logs api -f

The first command shows every part, the second only api, and the third keeps printing new lines. Logs lists the parts.

An upgrade replaces every part at once, because they all come from one image tag. You can’t upgrade one part on its own. Change the image: line, then run docker compose pull && docker compose up -d. Upgrade has the steps.

Edit compose.yaml or fluxer.env, then run docker compose up -d. Compose creates the container again with the new settings, which restarts every part. The volume keeps your data.

To change settings without a new container, mount fluxer.env at /etc/fluxer/fluxer.env instead of loading it with env_file. Squad can then load it again while it runs.

Move fluxer.env into a folder called config, then mount the folder in place of the env_file line. Docker shows the folder’s current files in the container. With only the file mounted, an editor that saves by writing a new file leaves the container with the old one.

compose.yaml
services:
fluxer:
volumes:
- fluxer-data:/var/lib/fluxer
- ./config:/etc/fluxer:ro
Окно терминала
mkdir config && mv fluxer.env config/
docker compose up -d

Squad runs as user ID 65532 in the container, so that user ID needs to be able to open config/fluxer.env.

After a change to config/fluxer.env, check it and then reload Squad.

Окно терминала
docker compose exec fluxer fluxerd check-config
docker compose kill -s HUP fluxer

Squad loads the file again and restarts only the parts whose settings changed. docker compose logs fluxer shows which ones, on a line that starts with reload restarted.

  • Settings under environment: in compose.yaml keep the value they had when the container started, and still win over the file. Change those with docker compose up -d.
  • A few changes need every part to start again, such as one that turns a part like search on or off, or a change to the message queue. Squad then logs that the change needs a full restart and keeps running as before. Run docker compose restart.