Come hang with us on Discord and chat directly with the team!Discordtop-bar-close-icon

2026-04-08

How to Install Alf.io Open Source Event Management Software on Ubuntu Server

tutorial
img

Alf.io is a powerful open-source event management platform designed to streamline ticket sales, event organization, and attendee registrations. Whether you're hosting conferences, workshops, or community meetups, Alf.io provides a robust and self-hosted solution that gives you complete control over your event data. In this comprehensive tutorial, we'll walk you through every step of installing Alf.io on Ubuntu Server, from setting up dependencies to accessing the application in your browser.

Prerequisites

Before diving into the installation process, ensure that you have the following in place:

  • A fresh Ubuntu Server instance (latest stable version)
  • A user account with sudo privileges
  • A registered domain name pointed to your server's IP address
  • Basic familiarity with the Linux command line

Step 1: Update System Packages and Install Dependencies

The first step is to update your package index and install all the essential software packages that Alf.io requires to function properly. This includes a web server, database server, PHP, and several PHP extensions.

Open your terminal and execute the following command:

sudo apt-get update && sudo apt-get install -y curl git apache2 mysql-server php7.4 php7.4-mysql php7.4-dom php7.4-mbstring php7.4-curl php7.4-zip php7.4-gd libapache2-mod-php7.4

This command refreshes the available package lists and installs Apache, MySQL, PHP 7.4, and all necessary PHP modules in a single operation.

Step 2: Install Composer Dependency Manager

Composer is the standard dependency management tool for PHP projects. It handles the downloading and installation of all the PHP libraries that Alf.io relies on.

Install Composer globally on your server by running:

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Once completed, Composer will be accessible system-wide from the /usr/local/bin directory.

Step 3: Clone the Alf.io Repository

With all dependencies in place, it's time to download the Alf.io source code from the official GitHub repository. Navigate to your server's root directory and clone the project:

sudo git clone https://github.com/alfio-event/alf.io.git

This command pulls the entire Alf.io codebase onto your server, creating an alf.io directory with all the necessary project files.

Step 4: Install Alf.io PHP Dependencies

Next, navigate into the Alf.io project directory and use Composer to install all required PHP dependencies:

cd /alf.io

sudo composer install --no-dev

The --no-dev flag ensures that only production dependencies are installed, keeping the deployment lightweight and optimized.

Step 5: Create an Apache Virtual Host Configuration

To serve Alf.io through Apache, you need to set up a virtual host configuration file. This tells Apache how to handle incoming requests for your domain.

Create a new configuration file using a text editor:

sudo nano /etc/apache2/sites-available/alfio.conf

Add the following virtual host configuration to the file:

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /alf.io/public
<Directory /alf.io/public>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Be sure to replace example.com with your actual domain name. Save the file by pressing Ctrl + X, then Y, and finally Enter.

Step 6: Enable the Virtual Host

Activate the newly created virtual host configuration so Apache recognizes it:

sudo a2ensite alfio.conf

This command creates a symbolic link in the sites-enabled directory, making your Alf.io configuration active.

Step 7: Restart the Apache Web Server

Apply all configuration changes by restarting the Apache service:

sudo service apache2 restart

Apache will now serve your Alf.io application when visitors access your domain.

Step 8: Set Up the MySQL Database

Alf.io requires a MySQL database to store event data, ticket information, and user records. Access the MySQL console with root credentials:

sudo mysql -u root -p

Enter your MySQL root password when prompted. Then execute the following SQL statements to create a dedicated database and user for Alf.io:

CREATE DATABASE alfio;

CREATE USER 'alfio'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON alfio.* TO 'alfio'@'localhost' IDENTIFIED BY 'password';

FLUSH PRIVILEGES;

EXIT;

Make sure to replace password with a strong, secure password. Store this password safely, as you'll need it in the next step.

Step 9: Configure Alf.io Environment Settings

Now you need to connect Alf.io to the database you just created by updating the environment configuration file.

Navigate to the Alf.io directory:

cd /alf.io

Rename the example environment file to create your active configuration:

sudo mv .env.example .env

Open the .env file for editing:

sudo nano .env

Locate and update the database connection parameters with the credentials you configured earlier:

DB_DATABASE=alfio
DB_USERNAME=alfio
DB_PASSWORD=password

Replace password with the actual password you set during the database creation step. Save and close the file.

Step 10: Execute Database Migrations

With the database connection configured, run the migration command to automatically create all the required database tables and schema:

sudo php artisan migrate

This process sets up the complete database structure that Alf.io needs to operate, including tables for events, tickets, transactions, and user accounts.

Step 11: Generate the Application Encryption Key

For security purposes, Alf.io requires a unique application key to encrypt session data and other sensitive information. Generate this key by running:

sudo php artisan key:generate

This command creates a random encryption key and automatically stores it in your .env file.

Step 12: Access Your Alf.io Installation

The installation is now complete. Open your preferred web browser and navigate to your domain name to access the Alf.io event management dashboard. From here, you can begin creating events, configuring ticket categories, setting up payment gateways, and managing attendee registrations.

Conclusion

You have successfully deployed Alf.io on your Ubuntu Server, giving you a fully functional, self-hosted event management platform. This open-source solution provides extensive features for handling ticket sales, check-ins, and event logistics without relying on third-party services. For enhanced security, consider configuring SSL/TLS certificates using Let's Encrypt, setting up regular database backups, and keeping your server packages up to date. With Alf.io running on your own infrastructure, you maintain full ownership of your event data while delivering a seamless experience for your attendees.