Podman and Quadlet
Short version
Заголовок раздела «Short version»Podman 4.6 or later, a user with lingering turned on, one sysctl on the machine, fluxer.env and a fluxer.container file. It takes about 15 minutes.
What this changes
Заголовок раздела «What this changes»- One container called
fluxerand one Podman volume calledfluxer-data, both owned by the user that runs Podman. net.ipv4.ip_unprivileged_port_startset to 80 on the machine, so a rootless container can publish ports 80 and 443.- A Quadlet file,
~/.config/containers/systemd/fluxer.container, which systemd turns into the user servicefluxer.service. - Lingering for that user, so the service starts at boot without a login.
Before you start
Заголовок раздела «Before you start»Check the requirements. On Debian and Ubuntu, install Podman with the tools that rootless containers need, which minimal images leave out.
sudo apt-get install -y podman uidmap passtOn Fedora and RHEL, sudo dnf install -y podman is enough. rexctl on Podman needs Podman 5.4 or later, which Debian 13 has and Ubuntu 24.04 doesn’t.
Without rexctl, Squad runs on the Podman that Debian 13 and Ubuntu 24.04 ship.
Pick the account that will run Squad. The steps below use a normal account called chat. Run steps 1 and 2 as an admin with sudo. From step 3 on, sign in as chat over SSH, such as ssh chat@203.0.113.10. su and sudo -u don’t work here, because they don’t start the user session that systemctl --user needs.
Install
Заголовок раздела «Install»-
Allow rootless containers to publish ports 80 and 443, as root.
Окно терминала echo 'net.ipv4.ip_unprivileged_port_start=80' | sudo tee /etc/sysctl.d/90-fluxer.confsudo sysctl --systemsudo sysctl --systemprintsnet.ipv4.ip_unprivileged_port_start = 80. In proxy mode, Squad publishes no port below 1024, and you can skip this step. -
Turn on lingering for the account.
Окно терминала sudo loginctl enable-linger chatThe output of
loginctl show-user chatincludesLinger=yes. -
Get the settings file and set your domain.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Change
FLUXER_DOMAIN=chat.example.cominfluxer.envto your domain. -
Make the Quadlet folder and write the Quadlet file there.
Окно терминала mkdir -p ~/.config/containers/systemdДля Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
Network=pastakeeps each visitor’s address for rate limits and bans, as Podman 5 does by default.Sysctllets Squad listen on ports 80 and 443 inside the container, and--stop-timeoutgives PostgreSQL time to shut down cleanly. -
Start Squad.
Окно терминала systemctl --user daemon-reloadsystemctl --user start fluxerThe first start pulls the image and takes a few minutes.
systemctl --user is-active fluxerprintsactive, andpodman psshowshealthyafter another minute.journalctl --user -u fluxershows its logs from the journal.If systemd says
Unit fluxer.service not found, Quadlet refused the file./usr/libexec/podman/quadlet -dryrun -userprints the reason. -
Print the setup token.
Окно терминала podman exec fluxer fluxerd setup-tokenOpen your domain and paste the token to create the first admin account.
Quadlet units have no enable step.
The [Install] section starts the service at boot, and systemctl --user daemon-reload picks up any change to the file.
Rootful Podman
Заголовок раздела «Rootful Podman»As root, skip steps 1 and 2, make the folder with mkdir -p /etc/containers/systemd, put the file in /etc/containers/systemd/fluxer.container, give EnvironmentFile a full path such as /etc/fluxer/fluxer.env, and use systemctl without --user. Leave out the Network=pasta line but keep the Sysctl=net.ipv4.ip_unprivileged_port_start=0 line. Pasta runs only rootless, and rootful Podman keeps each visitor’s address on its own.
podman run
Заголовок раздела «podman run»podman run without Quadlet works too. It doesn’t start at boot by itself. So that the admin panel shows the podman commands for an upgrade, add this line to fluxer.env.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
After those commands, run your podman run line again with the new tag.
With podman compose and the published file, add network_mode: pasta and sysctls with net.ipv4.ip_unprivileged_port_start=0 to the settings of the fluxer service.
SELinux
Заголовок раздела «SELinux»A Podman volume such as fluxer-data needs nothing extra with SELinux enforcing. For a folder on the machine, add :Z to the volume, as in Volume=/srv/fluxer:/var/lib/fluxer:Z, and make user ID 65532 the folder’s owner.
Firewall
Заголовок раздела «Firewall»ufw and firewalld block the ports that rootless Podman publishes until you open them.
With ufw, on Debian and Ubuntu, run these.
sudo ufw allow 80/tcpsudo ufw allow 443/tcpsudo ufw allow 443/udpsudo ufw allow 7881/tcpsudo ufw allow 7882/udpWith firewalld, on Fedora and RHEL, run these.
sudo firewall-cmd --permanent --add-port={80/tcp,443/tcp,443/udp,7881/tcp,7882/udp}sudo firewall-cmd --reloadThe output of sudo firewall-cmd --list-ports lists all five ports.
Upgrade
Заголовок раздела «Upgrade»Change the tag on the Image line to the new version and run systemctl --user daemon-reload and systemctl --user restart fluxer. Squad backs up first.
So that the admin panel shows the command for Quadlet, add this line to fluxer.env. Squad puts the newest version in place of {version}.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
As root, use /etc/containers/systemd/fluxer.container and leave out --user.
We don’t recommend AutoUpdate=registry and podman auto-update. Going back to the older release after one of those upgrades needs the restore command by hand.
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.
As root, run them with sudo.
podman exec fluxer fluxerd users reset-link alexpodman exec fluxer fluxerd users create alex --adminOn an email sign-in instance, add --email alex@example.com to users create.
Remove Squad
Заголовок раздела «Remove Squad»The volume fluxer-data is the instance, with every message, upload, password and key. Before you delete it, take a backup if you may want it back, and keep that file safe outside ~/fluxer, because it has every key too.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
podman image rm removes every Squad image of the account, older releases included. If other containers of that account need the sysctl file or lingering, keep them.
As root, the file is in /etc/containers/systemd, systemctl runs without --user, the settings folder to delete is the one on the EnvironmentFile line, and you leave out the two sudo lines at the end of the block.