PlexichatGuides

Deployment

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:

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:

Environment setup

Versioning and updates

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_KEY for 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 CONNECT permission.

Valkey connection failures

  • Verify that Valkey 9.1.1 is running.
  • Check VALKEY_PASSWORD if authentication is enabled.
  • Review connection pool settings.

WebSocket connection issues

  • Verify that port 8000 is accessible or proxied through the client Nginx container at 443.
  • Check firewall rules and gateway configuration.
  • Ensure /gateway upgrades are allowed through your reverse proxy.

For more help, see: