This repository contains the configuration files to deploy Pretalx, a conference management system, in a highly secure, production-ready environment.
Unlike the community pretalx-docker repository, this setup uses a custom Dockerfile that pulls the official, Pretalx-supported release directly from PyPI, while still utilizing Docker Compose to seamlessly orchestrate the database, Redis cache, and Celery background workers.
- Official Source: Installs Pretalx via
pip, adhering strictly to official release channels. - Secure Secrets: Uses a
.envfile to manage database credentials securely. - High Performance: Configured for an Nginx reverse proxy on the host machine to serve static assets and media files directly from disk, bypassing the Python application for maximum speed.
- Automated SSL: Ready for Let's Encrypt (Certbot) integration.
- IPv4 DNS Priority: Includes a custom
gai.confto ensure reliable SMTP outbound connections on VPS environments lacking IPv6 NAT.
Before deploying, ensure your VPS (Ubuntu/Debian recommended) meets the following requirements:
- Root or Sudo access.
- Domain Name: An
A Recordpointing to your server's public IP (e.g.,cfp.yourdomain.com). - SMTP Credentials: An email provider (Google Workspace, SendGrid, Mailgun, etc.) to send speaker notifications and password resets.
Log into your VPS and install the necessary system dependencies (Docker, Nginx, and Certbot).
# Update system
sudo apt update && sudo apt upgrade -y
# Install Nginx and Certbot
sudo apt install nginx certbot python3-certbot-nginx -y
# Install Docker
curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.sh
sudo sh get-docker.sh
# Add your user to the Docker group
sudo usermod -aG docker $USER
newgrp dockerClone this repository to your server:
git clone [https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git](https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git) ~/pretalx-production
cd ~/pretalx-productionNever commit your actual credentials to Git. Create a .env file based on the provided template (if applicable) or create a new one:
nano .envAdd your sensitive configuration:
# .env
DB_PASSWORD=generate_a_very_strong_password_here
POSTGRES_PASSWORD=generate_a_very_strong_password_here
PRETALX_DATABASE_PASSWORD=generate_a_very_strong_password_hereCreate and edit the configuration file to match your environment, including your SMTP credentials.
nano pretalx.cfgEnsure you update the url and from email address:
[site]
url = [https://cfp.yourdomain.com](https://cfp.yourdomain.com)
[mail]
from = cfp@yourdomain.comWith your configuration in place, build the custom Docker image and start the stack. This will automatically download the latest Pretalx release from PyPI, compile frontend assets, and run database migrations.
docker compose up -d --buildVerify that the containers are running healthy:
docker compose psOnce the application is running, you must create your administrator account and initial organizer profile. Execute the initialization command inside the running web container:
docker compose exec web python -m pretalx initFollow the interactive prompts in your terminal.
To serve files efficiently and secure your site with HTTPS, configure Nginx.
First, locate exactly where Docker is storing your pretalx-data volume on the host machine:
docker volume inspect pretalx-production_pretalx-dataCopy the path listed under "Mountpoint" (e.g., /var/lib/docker/volumes/pretalx-production_pretalx-data/_data).
Create a new Nginx server block:
sudo nano /etc/nginx/sites-available/pretalxPaste your Nginx configuration (refer to the nginx.conf.example in this repo if provided). Crucially: update the /media/ and /static/ alias paths to match the Mountpoint you found in the previous step.
Enable the site and restart Nginx:
sudo ln -s /etc/nginx/sites-available/pretalx /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginxRun Certbot to secure your domain:
sudo certbot --nginx -d cfp.yourdomain.comPretalx requires a periodic trigger to process queued emails, scheduled exports, and other background tasks.
Open the crontab on your host machine:
crontab -eAdd the following line to run the trigger every 15 and 45 minutes past the hour:
15,45 * * * * cd /home/YOUR_USERNAME/pretalx-production && docker compose exec -T web python -m pretalx runperiodic > /dev/null 2>&1Because this setup uses the official PyPI package, updating is incredibly simple. Rebuilding the Docker image without cache will pull the latest version, and the startup command automatically handles database migrations.
cd ~/pretalx-production
docker compose build --no-cache web celery
docker compose up -dEnsure you are regularly backing up the following Docker volumes:
-
Database:
pretalx-production_pretalx-db(Contains all text data, schedules, and user info). -
Media:
pretalx-production_pretalx-data(Contains user-uploaded slides, avatars, and static files).
To take a manual database dump:
docker compose exec -T db pg_dump -U pretalx pretalx > pretalx_backup_$(date +%F).sql