Prosody + Keycloak + Postgres.
This repo runs a chat stack with:
prosodyim/prosody:0.12keycloak/keycloak:26.5postgres:18-alpinenginx:1-alpineas the edge proxy
The old top-level compose files are gone.
Compose is split by service:
compose/db/docker-compose.ymlcompose/idp/docker-compose.ymlcompose/xmpp/docker-compose.ymlcompose/proxy/docker-compose.yml
Prosody config is now one file:
prosody/config/prosody.cfg.lua
Behavior is driven by env values (env/*.env), not by seperate prosody configs anymore
- Docker + Docker Compose
opensslpython3hg(needed only if you sync community prosody modules)
Copy examples once:
cp env/stack.env.example env/stack.env
cp env/db.env.example env/db.env
cp env/idp.env.example env/idp.env
cp env/xmpp.env.example env/xmpp.env
cp env/proxy.env.example env/proxy.envThen fill secrets:
bash scripts/secure.shOne command path:
bash scripts/deploy.sh devThis runs setup, validation, compose up, health checks, and Keycloak bootstrap.
Useful checks:
bash scripts/compose-up.sh status
curl -k https://sso.localhost/realms/community/.well-known/openid-configurationIf you changed SSO_SUBDOMAIN, replace sso accordingly.
Subdomains are configurable via env:
SSO_SUBDOMAIN(defaultsso)CHAT_SUBDOMAIN(defaultxmpp) Set them inenv/stack.envandenv/proxy.env.
Create a test user:
python3 scripts/bootstrap-keycloak.py --user testuser --password changemeXMPP client values:
JID/domain: testuser@localhost
Server: localhost
Port: 5222
Use localhost, not 127.0.0.1, for XMPP domain/JID.
bash scripts/deploy.sh prod example.comIf cert issuance fails during deploy, fix DNS/ports and run:
bash scripts/init-certs.shRenewal helper:
bash scripts/renew-certs.shscripts/deploy.shfull deploy flowscripts/compose-up.shup/down/restart/statusscripts/setup.pycreate dirs/env files, set domain, cert setupscripts/validate.shenv/config sanity checksscripts/bootstrap-keycloak.pyrealm/clients/user setupscripts/init-certs.shfirst cert requestscripts/sync-certs.shcopy LE certs into Prosody cert volumescripts/renew-certs.shrenew + reload + sync
host-unknown or server does not serve 127.0.0.1:
- use JID/domain
user@localhostand serverlocalhost
tlsv1 alert unknown ca:
- your client does not trust the cert yet
Keycloak client_not_found:
- run
python3 scripts/bootstrap-keycloak.pyagain
Health checks timeout:
- run
bash scripts/compose-up.sh status - then
docker logs chat-idp/docker logs chat-server