Deployment
Deployment
Deploy PE Community on a server using the production Compose configuration and a hostname that resolves to the server.
Installation
Prepare the server and required deployment files.
Environment variables
Configure the hostname, origin, secrets, and optional services.
Docker Compose
Use the authoritative container, volume, and lifecycle reference.
Backup and restore
Protect the installation before and after going live.
Troubleshooting
Diagnose startup, HTTPS, and application failures.
Before deployment
- Prepare a supported server with Docker Engine and the Docker Compose plugin.
- Complete `.env`, obtain the production `compose.yml`, and place the Caddy configuration beside it when distributed separately.
- Choose the public hostname, prepare its DNS records, and confirm that ports 80 and 443 can reach the server.
- Review Docker Compose for image placeholders, project identity, persistent volumes, and standard lifecycle commands.
- Understand the backup and recovery plan before the installation receives production data.
Configure the hostname
Use the hostname that members will open. APP_DOMAIN gives Caddy its public hostname, while WEB_ORIGIN must use the same HTTPS origin so browser sessions and application requests remain aligned.
APP_DOMAIN=community.example.com
WEB_ORIGIN=https://community.example.comDNS
- Create an A record that points the hostname to the server’s public IPv4 address.
- Create an AAAA record only when IPv6 is configured and reachable on the server.
- Allow DNS changes to propagate before diagnosing certificate issuance.
- When using a CDN or proxy, keep its DNS, TLS, and firewall behavior compatible with Caddy serving the configured hostname.
Firewall and public ports
Secure administrative access separately using the operator’s chosen SSH policy. PostgreSQL, Redis, and internal application services do not need public ports in the standard deployment.
| Port | Purpose |
|---|---|
| 80/tcp | HTTP access, HTTPS redirects, and certificate validation. |
| 443/tcp | HTTPS application traffic. |
| 443/udp | HTTP/3 traffic where the network and host support it. |
Start the deployment
From the reviewed source release, build and start the production Compose deployment. The canonical workflow does not depend on unpublished container images.
docker compose -f docker-compose.prod.yml up -d --buildVerify the deployment
- Confirm that the expected services are running and that reported health checks complete successfully.
- Open the HTTPS hostname and confirm that the first-run or sign-in screen appears as appropriate.
- Test sign-in and a normal authenticated page.
- Confirm that realtime-dependent features connect and that an uploaded file remains available.
- Send a test email when community email delivery is configured.
docker compose psHTTPS
Caddy provides the public entry point and routes application traffic to the appropriate services. For automatic certificate issuance and renewal, the public hostname must resolve to the server and ports 80 and 443 must reach Caddy.
After deployment
- Verify sign-in, configured email delivery, uploads, and realtime features with normal user workflows.
- Create and test a recoverable backup of PostgreSQL, uploads, and required configuration.
- Keep the deployed source, lockfile, Dockerfiles, Compose file, and Caddyfile on the same reviewed release.
- Use Upgrades for release changes and Troubleshooting when verification fails.