Back to articles
Technology Insight

Self-Hosting Alf.io on Docker VPS: A Secure, Open-Source Event Management and QR-Code Ticketing Solution for Organizations

June 4, 2026

Introduction: The Evolution of Modern Event Management

In the contemporary corporate landscape, organizing events, conferences, and seminars demands flawless execution. From initial attendee registration to real-time check-ins at the venue doors, every touchpoint reflects an organization's technological maturity and operational efficiency. While commercial SaaS ticketing platforms offer convenience, they frequently introduce substantial overhead costs, per-ticket transaction fees, and complex compliance challenges regarding proprietary customer data privacy.

For enterprises, non-profits, and educational institutions seeking absolute sovereignty over their data alongside a robust, enterprise-grade feature set, Alf.io emerges as the premier open-source event management system. Developed with security and performance in mind, Alf.io provides a comprehensive suite for dynamic ticket reservation, automated invoicing, customized badge generation, and seamless offline-capable QR-code validation via dedicated mobile applications. In this technical guide, we will explore the architecture of Alf.io and deliver a definitive blueprint to deploy, configure, and secure your own self-hosted Alf.io instance utilizing Docker on a Virtual Private Server (VPS).

Why Choose Alf.io Over Commercial Alternatives?

Before diving into the technical deployment, it is vital to understand the strategic and financial advantages of migrating to a self-hosted Alf.io environment:

  • Total Data Ownership: Attendee profiles, payment data, and corporate contacts remain strictly within your sovereign database, ensuring strict adherence to global data protection laws such as GDPR and local privacy mandates.
  • Zero Commission Fees: Eliminate ticketing middleman transaction costs. Whether you process one hundred or ten thousand ticket sales, your infrastructure costs remain predictable and flat.
  • Advanced QR-Code Check-In: Alf.io features an official, high-performance companion app for Android and iOS, transforming standard smartphones into rapid laser-accurate gate-control scanners capable of operating even during intermittent network connectivity.
  • Extensive Payment Integration: Out-of-the-box support for leading payment processors including Stripe, PayPal, and offline bank transfers gives your organization global billing agility.

Infrastructure Prerequisites and Architecture Overview

To ensure high availability and responsiveness under heavy traffic spikes—such as the exact moment registration opens—we recommend provisioning a VPS with the following minimum specifications:

  • CPU: 2 vCPUs (Intel Xeon or AMD EPYC optimized instances preferred)
  • RAM: 4 GB Minimum (To comfortably run the Java-based Alf.io application engine and PostgreSQL concurrently)
  • Storage: 40 GB SSD or NVMe storage
  • OS: Ubuntu 22.04 LTS or Ubuntu 24.04 LTS
  • Network: A static public IPv4 address with a fully qualified domain name (FQDN) pointed to it via DNS A Records (e.g., events.yourorganization.com).

Architecturally, our deployment isolates the core services within an internal Docker network, exposing web traffic securely through a reverse proxy. The primary components include:

  1. Alf.io Core Container: The Java/Spring-based application backend responsible for executing business logic, rendering user interfaces, and dispatching automated confirmation emails.
  2. PostgreSQL Database Container: The relational storage engine holding transactional records, attendee data, and event configurations.
  3. Nginx Proxy Manager / Traefik: Serving as the SSL-termination proxy to route public HTTPS requests into the internal Docker network securely.

Step-by-Step Deployment Guide via Docker Compose

Step 1: System Preparation and Docker Installation

First, establish an SSH connection to your VPS and update the system core packages to their latest versions to patch potential security vulnerabilities:

sudo apt update && sudo apt upgrade -y

Next, install the Docker engine along with the Docker Compose plugin if they are not already active on your server instance:

sudo apt install docker.io docker-compose-plugin -y
sudo systemctl enable --now docker

Step 2: Structuring the Project Directory

Organize your server workspace by creating a dedicated directory structure for Alf.io. This guarantees that application configurations and database storage persist independently of the lifecycle of the individual Docker containers:

mkdir -p ~/alfio/postgres_data
cd ~/alfio

Step 3: Crafting the Docker Compose Configuration

Create a file named docker-compose.yml inside the directory using a text editor such as Nano:

nano docker-compose.yml

Populate the configuration file with the production-ready structure defined below. Ensure you modify placeholder values (such as database passwords and secret keys) to meet corporate security guidelines:

Security Warning: Never deploy applications to production using default administrative credentials or weak alpha-numeric strings for database passwords. Use high-entropy keys generated via cryptographic tools.
version: '3.8'

services:
  alfio-db:
    image: postgres:15-alpine
    container_name: alfio-postgres
    restart: always
    environment:
      POSTGRES_DB: alfio
      POSTGRES_USER: alfio_admin
      POSTGRES_PASSWORD: SuperSecurePassword123!
    volumes:
      - ./postgres_data:/var/lib/postgresql/data
    networks:
      - alfio-network

  alfio-app:
    image: alfio/alfio:latest
    container_name: alfio-core
    restart: always
    depends_on:
      - alfio-db
    ports:
      - "8080:8080"
    environment:
      - SPRING_DATASOURCE_URL=jdbc:postgresql://alfio-db:5432/alfio
      - SPRING_DATASOURCE_USERNAME=alfio_admin
      - SPRING_DATASOURCE_PASSWORD=SuperSecurePassword123!
      - ALFIO_DATA_DIR=/var/alfio
      - SPRING_PROFILES_ACTIVE=prod
      - SERVER_PORT=8080
    volumes:
      - ./alfio_file_storage:/var/alfio
    networks:
      - alfio-network

networks:
  alfio-network:
    driver: bridge

Save the file and exit the editor. Execute the following command to pull the specified application images and run the environment in detached background mode:

docker compose up -d

Verify that both internal containers are successfully initialized and running smoothly without throwing internal errors by tracking the live initialization logs:

docker compose logs -f

Configuring the Reverse Proxy and SSL Certificates

At this juncture, Alf.io is operating natively on port 8080 inside the host loopback. Running an enterprise service via unencrypted HTTP traffic over non-standard ports is highly insecure. To encrypt communication using automated Let's Encrypt TLS/SSL certificates, we recommend deploying an Nginx reverse proxy instance.

Create an Nginx server block configuration pointing securely to your public subdomain:

server {
    listen 80;
    server_name events.yourorganization.com;

    location / {
        proxy_pass [http://127.0.0.1:8080](http://127.0.0.1:8080);
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Execute the Certbot automated utility tool to secure your endpoint with zero-downtime, auto-renewing SSL certificates:

sudo certbot --nginx -d events.yourorganization.com

Initial Initialization and First Event Setup

Open a web browser and navigate directly to your configured production domain (e.g., [https://events.yourorganization.com](https://events.yourorganization.com)). You will be greeted by the initialization setup wizard wizard, guiding you through establishing the initial administrative account credentials.

Essential Initial Configurations

  • SMTP Email Gateway: Input your corporate mail delivery configuration (such as SendGrid, AWS SES, or internal corporate Exchange servers) to allow Alf.io to seamlessly dispatch confirmation notifications, digital PDF invoices, and high-resolution unique QR-code assets.
  • Payment Gateways: Input your API key strings for payment processing engines. Always run a minimum of one end-to-end test checkout using "Sandbox / Test Mode" before pushing your registration pages live to public buyers.
  • Ticket Design Templates: Customize the visual aesthetics of the generated PDF badges, adjusting layouts to embed corporate partner sponsorships, branding guidelines, venue maps, and scheduling alerts.

On-Site Operations: Scanning and QR Code Validation

Once attendee registration reaches capacity and event launch day arrives, operational focus shifts from digital sales to logistical queue control. Alf.io simplifies this phase through its structured hardware integration. Staff members download the native Alf.io application onto their respective smartphones and securely link the app to the central database utilizing a restricted API token QR code located within the admin console.

This method maintains strict permission separation: gate agents can rapidly validate incoming tickets without requiring global administrative visibility into revenue, financial reporting, or system-wide settings. Because the application maintains local cryptographic caches of attendee logs, ticket authentication occurs near-instantaneously, mitigating entry bottlenecks and guaranteeing steady lines even during fluctuating cellular network coverage.

Conclusion: Embracing Infrastructure Autonomy

Self-hosting Alf.io utilizing Docker on a VPS successfully bridges the gap between administrative capability, budget optimization, and uncompromised security compliance. By shifting event coordination workflows away from standard commercial ticketing brokers, organizations claim complete digital autonomy, build tailored experiences for corporate attendees, and maximize profitability profiles across every ticket sold.