Docker
On Docker or Podman, Squad runs as one container, started from a small compose file or one docker run line, and loads its settings from an env file.
rexctl is optional. The compose.yaml and fluxer.env that each release publishes are a supported way to run Squad without it, and this page needs only Docker. An instance on the older layout with one container per service gets here once with rexctl migrate --to compose, or with rexctl detach after a move to one container. Moving from the older install has the steps.
To keep every setting in compose.yaml, turn off parts you don’t use, run your own PostgreSQL next to Squad or restart one part at a time, see Compose without rexctl.
Short version
Заголовок раздела «Short version»You need a 64-bit Linux machine with 2 CPU cores, 2 GB of memory at least, 4 GB for a busy instance, and Docker 24 or later with Compose. People open Squad at a domain that points at the machine, or at its IP address. Installing takes about 5 minutes.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Set FLUXER_DOMAIN in fluxer.env, then run docker compose up -d and docker compose exec fluxer fluxerd setup-token. On a machine with IPv6, leave out the AAAA record for now, or put a reverse proxy in front.
What this changes
Заголовок раздела «What this changes»- One container from the image
squad-local:build. Docker calls it after the folder, such asfluxer-fluxer-1in a folder calledfluxer, anddocker composecommands in that folder find it asfluxer. - One Docker volume called
fluxer-data, which has the database, uploads, search index, certificates, passwords and keys. - Ports 80 and 443 on TCP, 443 on UDP, 7881 on TCP and 7882 on UDP, published on every one of the machine’s addresses.
- Two files in a folder you choose,
compose.yamlandfluxer.env, both yours to edit.compose.yamlruns the release it came with and setsFLUXER_INSTALL_METHODtocompose, so the admin panel shows the compose upgrade command.
Squad runs as user ID 65532 inside the container.
Before you start
Заголовок раздела «Before you start»Check the requirements.
You need Docker Engine 24 or later and the Compose plugin. If the machine doesn’t have them yet, install them, and on a VPS open the ports in your provider’s firewall. Squad needs ports 80 and 443 open from the internet to get its certificate. If another web server already uses ports 80 and 443, put Squad behind it as you go.
To use the machine’s IP address in place of a domain, skip the DNS steps and set FLUXER_DOMAIN in step 2 to the address, such as 203.0.113.10. Without a domain of your own, a free name such as 203-0-113-10.sslip.io works like a domain and keeps passkeys working. A public address gets a Let’s Encrypt certificate. On a private address, browsers show a certificate warning until each device trusts Squad’s own authority. Passkeys don’t work on an IP address, whatever certificate it has. For an IPv6 address, also turn on IPv6 on the Docker network first.
With a domain, point it at the machine before the first start. At your DNS provider, add an A record for the name you want, such as chat, with the machine’s public IPv4 address.
Then check that it resolves.
dig +short chat.example.comThe answer is the machine’s address. If it isn’t, wait a few minutes. Leave out the AAAA record unless a reverse proxy or Docker’s IPv6 network keeps IPv6 visitors’ addresses.
Install
Заголовок раздела «Install»-
Make a folder for Squad and download the two files from the latest release.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
lsin that folder now listscompose.yamlandfluxer.env. -
Open
fluxer.envin an editor and setFLUXER_DOMAINto your domain, such aschat.example.com, withouthttps://.fluxer.env FLUXER_DOMAIN=chat.example.comWrite values without quotes. A password with a
$in it goes in a file. Squad refuses to start with the example domainchat.example.com. -
Start Squad.
Окно терминала docker compose up -dThe first start takes a minute or two while Squad creates its database, passwords and keys.
docker compose psshould then showhealthyin its status column. The certificate can take another minute or two. -
Print the setup token.
Окно терминала docker compose exec fluxer fluxerd setup-tokenOpen
https://chat.example.comwith your domain. The setup wizard opens and asks for the token. Paste it and create the first admin account. With a domain, a certificate warning means Squad hasn’t got its certificate yet, so wait a minute and reload. On a private IP address the warning stays until the device trusts Squad’s own authority.docker compose logs fluxer | grep -iE 'acme|certificate'shows what Let’s Encrypt reported. Let’s Encrypt gives out at most 5 certificates a week for the same domain, and every reinstall with a new volume uses one of them.The wizard asks whether people sign in with a username or an email address, and this can’t change later. Without an email account set up, pick usernames. People then keep a recovery kit in place of password reset emails. Under “Who can create an account?” the wizard starts on “Only people you invite”.
-
Invite people with an invite link.
Without Compose
Заголовок раздела «Without Compose»The same container runs from one docker run line, with only fluxer.env in the folder.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
The first start takes a minute or two.
Once docker ps shows healthy in the status of fluxer, print the setup token.
docker exec fluxer fluxerd setup-tokenThe container is called fluxer, and docker logs fluxer shows its log.
Keep --stop-timeout 130, because Docker’s default of 10 seconds stops PostgreSQL before it has shut down. The compose file and this line use the same volume, and you can switch between them without losing data.
Moved here with rexctl
Заголовок раздела «Moved here with rexctl»A folder that rexctl migrate --to compose or rexctl detach wrote works the same as the one above, with a few differences.
compose.yamlstarts with aname:line, which keeps the compose project and the volume the same when you rename the folder. It can also have other ports, extra hosts or Podman lines than the release file.- To upgrade, keep this file and change only its
image:line. Don’t download the release’scompose.yamlover it. custom.compose.ymlfrom the older layout no longer applies. Make network changes, such as other ports, incompose.yaml.- rexctl’s backups from before the move stay in the
backupsfolder. Squad keeps newer ones in its volume, under/var/lib/fluxer/backups, and those go when the volume goes. Copy them out first.
docker compose cp fluxer:/var/lib/fluxer/backups ./fluxer-backupsA custom certificate, CA or GeoIP database that rexctl copied into the volume stays there, under /var/lib/fluxer/host. rexctl no longer copies it from the instance folder. To replace one, copy the new file over it, give it to the user Squad runs as and restart Squad.
docker compose cp fullchain.pem fluxer:/var/lib/fluxer/host/certs/fullchain.pemdocker compose exec -u 0 fluxer chown 65532:65532 /var/lib/fluxer/host/certs/fullchain.pemdocker compose restartThe CA files go in /var/lib/fluxer/host/ca and the GeoIP database in /var/lib/fluxer/host/geoip, with the same file name as before.
Let rexctl run it
Заголовок раздела «Let rexctl run it»To have rexctl run Squad again, run rexctl adopt in the folder. It works with the release files too.
rexctl adopt --dry-runrexctl adoptrexctl backs Squad up, stops it, starts the same release in its own container on the same volume and checks it. If that doesn’t work, it starts Squad again with docker compose. compose.yaml and fluxer.env move to .rexctl/adopted, and rexctl detach hands Squad back. rexctl refuses lines in compose.yaml that no rexctl setting gives, such as data in a folder, and lists each one.
Behind your own proxy or tunnel
Заголовок раздела «Behind your own proxy or tunnel»When something else handles HTTPS, such as nginx, Caddy, Traefik or Cloudflare Tunnel, Squad serves plain HTTP on port 8080.
Set this in fluxer.env, or FLUXER_EDGE_MODE=tunnel behind a tunnel.
FLUXER_EDGE_MODE=proxyPublish port 8080 on 127.0.0.1 in place of ports 80 and 443. The ports list becomes this.
services: fluxer: ports: - "127.0.0.1:8080:8080" - "7881:7881" - "7882:7882/udp"With docker run, the port flags become these.
-p 127.0.0.1:8080:8080 -p 7881:7881 -p 7882:7882/udpKeep the port on 127.0.0.1 unless your proxy runs on another machine. Squad trusts the visitor address that anything on a private network sends it, so anything that can connect to port 8080 could pretend to be any visitor.
Set up your proxy with one of the proxy configs.
Voice and video
Заголовок раздела «Voice and video»Calls use TCP port 7881 and UDP port 7882 on the machine, also behind a proxy or tunnel. Open both in any firewall in front of the machine.
When FLUXER_DOMAIN is an IP address, calls use that address. With a domain, Squad finds its public address over STUN. On a home network, or when STUN finds the wrong address, set it yourself. Use your public IPv4 address, the one a site such as ifconfig.me shows, not the 192.168 address of the machine on your own network.
FLUXER_LIVEKIT_NODE_IP=203.0.113.10To run without voice, set FLUXER_LIVEKIT_ENABLED=false and leave out the two voice ports. To run calls on other machines instead, add voice servers.
On Docker’s default network, a visitor who connects over IPv6 shows up inside the container with the network’s own address. Rate limits and bans then treat every IPv6 visitor as one person. IPv4 visitors keep their own address.
The simplest choice is to leave out the AAAA record, so everyone connects over IPv4. To serve IPv6 visitors as well, put a reverse proxy on the machine in front of Squad in proxy mode, as above. The proxy sees the real address and passes it on.
IPv6 on the Docker network also keeps addresses.
Podman runs the same image with the same files. In podman run, --sysctl net.ipv4.ip_unprivileged_port_start=0 allows Squad to listen on ports 80 and 443.
--network pasta keeps each visitor’s address for rate limits and bans, which Podman 5 also does by default without the flag. When you run Podman as root, leave this flag out, because pasta runs only in rootless mode.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Rootless Podman can publish ports 80 and 443 only when the machine’s own net.ipv4.ip_unprivileged_port_start is 80 or lower. Set it with sudo sysctl -w net.ipv4.ip_unprivileged_port_start=80. To keep it after a reboot, put the same line in a new file in /etc/sysctl.d/ as well.
In proxy mode, Squad uses no port below 1024 and needs neither sysctl setting.
With podman compose and the release files, put the sysctl line in a compose.override.yaml next to compose.yaml. Compose reads it with compose.yaml, and upgrades still change only the image line of compose.yaml.
services: fluxer: sysctls: net.ipv4.ip_unprivileged_port_start: 0Upgrade with podman compose pull && podman compose up -d. The Updates page in the admin panel shows the same command.
Podman has no daemon, so after a reboot podman-restart.service starts the containers that run with --restart always. As root, turn it on for the whole machine.
sudo systemctl enable podman-restartWith rootless Podman, turn it on for your account, with lingering for boot.
systemctl --user enable podman-restartsudo loginctl enable-linger $USERThe Podman guide runs Squad from a Quadlet file as a systemd service instead.
Day to day
Заголовок раздела «Day to day»These show the status, the logs, one part’s logs, a backup and how to stop Squad.
docker compose exec fluxer fluxerd psdocker compose logs fluxerdocker compose exec fluxer fluxerd logs apidocker compose exec -T fluxer fluxerd backup --out - > fluxer-backup.tar.zstdocker compose stopdocker exec fluxer fluxerd psdocker logs fluxerdocker exec fluxer fluxerd logs apidocker exec fluxer fluxerd backup --out - > fluxer-backup.tar.zstdocker stop fluxerUpgrade with one command that changes only the image line of the compose file. You can also restore a backup, restart one part, invite people or move to a new machine.
Admin accounts
Заголовок раздела «Admin accounts»When nobody can sign in as an admin, make a reset link for an account or create a new admin. Each command prints a link that sets a password, and the link works once for an hour. On an email instance that sends email, users reset-link refuses, and the admin resets their password by email from the sign-in page.
docker compose exec fluxer fluxerd users reset-link alexdocker compose exec fluxer fluxerd users create alex --admindocker exec fluxer fluxerd users reset-link alexdocker exec fluxer fluxerd users create alex --adminOn an instance with email sign-in, add --email alex@example.com to users create.
Remove Squad
Заголовок раздела «Remove Squad»To keep the instance for later, take a backup first with the fluxerd backup line under Day to day, and copy fluxer-backup.tar.zst out of the Squad folder. Keep it somewhere safe, because it has every password and key.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
The last line removes every Squad image on the machine, older releases included.
Then delete the folder with fluxer.env.