Deploys postbot (Mattermost broadcast bot) and webui (Django admin) as rootless Podman containers managed by podman compose.
- Podman and podman-compose installed on the server
- The container images published to Docker Hub (
./publish.shfrom the main repo)
Run the bootstrap script — it clones the repo, sets up the systemd service, and prepares all directories:
curl -fsSL https://raw.githubusercontent.com/CollegiumAcademicum/mattermost_bots_deployment/main/setup.sh | bashThen fill in the required values in ~/postbot/.env:
nano ~/postbot/.env # fill in all CHANGE_ME valuesOptionally place your LDAP CA certificate:
cp /path/to/ca.pem ~/postbot/data/certs/ca.pemFinally, pull images and start:
cd ~/postbot && ./start.shAfter this the stack starts automatically at every boot.
git clone https://github.com/CollegiumAcademicum/mattermost_bots_deployment.git ~/postbot
cd ~/postbotcp .env.example .env
nano .env # fill in all CHANGE_ME valuesmkdir -p ~/.config/systemd/user
cp postbot.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable postbot.service
loginctl enable-linger $USER # start at boot without login./start.shPull the latest images and restart:
./start.sh~/postbot/
├── .env # secrets — never commit this
├── docker-compose.yaml
├── postbot.service # systemd unit (installed by setup.sh)
├── setup.sh # bootstrap script for fresh servers
├── start.sh # pull latest images and restart
├── stop.sh # stop all containers
└── data/
├── postbot/ → mounted into postbot at /app/data
│ ├── channels.toml # channel group configuration
│ ├── broadcast_log.db
│ ├── tasks/ # custom task plugins (.py files)
│ └── logs/
├── webui/ → mounted into webui at /app/data
└── certs/ → mounted into webui at /app/certs (read-only)
└── ca.pem # LDAP CA certificate — required if using LDAP over TLS
podman compose restart postbot # restart postbot
podman compose restart webui # restart webui
podman compose stop webui # stop a service
podman compose logs postbot # container logs
podman compose down # stop everythingwebui can't reach postbot
Check both containers are on the internal network:
podman network inspect postbot_internalPort 8080 not reachable
# Fedora/RHEL
sudo firewall-cmd --add-port=8080/tcp --permanent && sudo firewall-cmd --reload
# Debian/Ubuntu
sudo ufw allow 8080/tcppodman compose pull fails with auth error
podman login docker.ioService not starting at boot
Make sure linger is enabled — without it the user service only starts on login:
loginctl enable-linger $USER
loginctl show-user $USER | grep Linger # should show Linger=yes