Deployment Index
Guides, route-group overviews, and live schema entry points for the Plexichat backend.
Deployment documentation
This section describes how to deploy, configure, and operate a Plexichat server.
Quick start
If you're new to deploying Plexichat, start with these guides:
- Environment generator — Generate a secure
.envfile with cryptographically random values. - Docker deployment — Complete Docker Compose setup for development and production.
- Hardened deployment profile (FI-like) — Concrete overlay + compose/nginx/TLS, strict origins/CORS, admin/ClamAV/least-privilege/audit/secrets, and capacity references.
- Getting started — Step-by-step production deployment guide.
- Requirements — System requirements for production and development.
- Overview — Deployment architecture and components.
Configuration guides
Guides for each subsystem:
- Authentication — Password policies, 2FA, sessions, and security.
- Database — PostgreSQL and SQLite, connection pooling, and migrations.
- Email — SMTP settings for notifications.
- Embeds — URL preview configuration.
- Media — File uploads and S3 or RustFS storage.
- Rate limiting — API and gateway rate limits.
- Valkey — Caching and session storage.
- Search — Search backends and indexing.
- Voice — WebRTC and STUN/TURN servers.
- WebSocket — Gateway settings and compression.
Deployment topics
Docker deployment
Docker Compose is the recommended way to deploy Plexichat:
- Docker index — Overview and system requirements.
- Quick start — Get running in 5 minutes.
- Configuration — Environment variables and profiles.
- Development workflow — Hot reload, testing, and debugging.
- Production setup — Security, TLS, scaling, and Proxmox.
- Connection pooling — Database tuning.
- Health checks — Service monitoring.
- Troubleshooting — Common issues and solutions.
- Architecture — System design and data flows.
Environment setup
- Environment generator — Generate a secure
.envfile online.
Versioning and updates
- Versioning and updates — Version scheme, update procedures, and rollback strategies.
Environment variables
Plexichat supports environment variable interpolation in configuration files:
database:
postgres:
host: "${POSTGRES_HOST:-localhost}"
password: "${POSTGRES_PASSWORD}"
For details, see the Configuration overview.
Security considerations
- Use the hardened deployment profile (FI-like) for a concrete, validated-as-possible production baseline (TLS proxy, strict origins/CORS, admin allowlist, ClamAV, least privilege, audit, secrets).
- Use
PLEXICHAT_SYSTEM_KEYfor encryption at the bootstrap level. - Enable 2FA for operator accounts.
- Configure access token gating for closed deployments.
- Review Security best practices and Admin hardening.
Maintenance
Database migrations
Run pending migrations after updating code or configuration:
# Docker
docker compose exec backend python -m src.core.migrations.cli apply_migrations
# Native — preferred wrapper
python main.py migrate-db
# Native — direct CLI
python -m src.core.migrations.cli apply_migrations
To preview changes without applying them, add --dry-run:
python main.py migrate-db --dry-run
Health monitoring
Plexichat exposes these endpoints under the API prefix (/api/v1 by default). A root-level /health alias is also available.
| Endpoint | Purpose |
|---|---|
GET /api/v1/ready |
Readiness probe. Returns 200 as soon as the server is listening. No database or Valkey checks. Use for container orchestrator health checks. |
GET /api/v1/health |
Health check. Returns status and version, plus advisory events_metrics and cross_worker_listener fields. |
GET /api/v1/status |
Server status. Returns operational state, version, uptime, and maintenance announcements. |
GET /api/v1/version |
Version information. Returns the current server version and minimum supported client version. |
The Docker Compose backend service checks GET http://localhost:8000/api/v1/ready.
For details, see Health checks.
Troubleshooting
Common issues
Cannot connect to database
- Verify that PostgreSQL 18 is running and reachable.
- Check the connection string in your config.
- Ensure the database exists and the user has
CONNECTpermission.
Valkey connection failures
- Verify that Valkey 9.1.1 is running.
- Check
VALKEY_PASSWORDif authentication is enabled. - Review connection pool settings.
WebSocket connection issues
- Verify that port 8000 is accessible or proxied through the
clientNginx container at 443. - Check firewall rules and
gatewayconfiguration. - Ensure
/gatewayupgrades are allowed through your reverse proxy.
For more help, see: