Skip to main content

Self-Hosting & Configuration Guide (Linux)

This guide walks you through self-hosting Avalex on a Linux server (Ubuntu 22.04/24.04 LTS, Debian 12, or RHEL/CentOS). The Avalex server is distributed as a single, self-contained executable JAR that automatically serves both the high-performance REST API and the complete web administration portal UI. No separate frontend compilation, Node.js runtime, or static file hosting is required. All server behavior is controlled through the application.conf configuration file.

System Requirements

  • Operating System: Linux (Ubuntu 22.04/24.04 or Debian 12 recommended)
  • Runtime: OpenJDK 21 or Eclipse Temurin 21 JRE (java -version)
  • Database: MongoDB 6.0+ (MongoDB Atlas free cloud cluster or local instance)
  • Reverse Proxy: Nginx with Certbot (for custom domain & HTTPS)
  • Hardware: 1 vCPU, 1 GB RAM (handles thousands of validation requests per second)

1. Complete application.conf Configuration Reference

When starting Avalex, the server reads its configuration from application.conf. You can place this file in the same directory as your JAR, or point to it using -Dconfig.file=/path/to/application.conf. Here is the complete configuration file with all available settings:

Configuration Keys Breakdown


2. Step-by-Step Linux Installation

Step 1: Install System Dependencies

Verify that Java 21 is installed:

Step 2: Database Setup

Avalex requires a MongoDB database.
  • MongoDB Atlas (Recommended): Create a free cluster at mongodb.com/atlas, whitelist your server IP, and copy the mongodb+srv://... URI.
  • Local MongoDB: Install mongodb-org via apt and start with sudo systemctl enable --now mongod.

Step 3: Deploy the JAR and Configuration

  1. Create a dedicated application directory and system user:
  2. Copy your avalex.jar and your customized application.conf into /opt/avalex/:
  3. Set ownership and file permissions:

Step 4: Set Up Systemd Service (Auto-Start & 24/7 Uptime)

Create a systemd unit file so Avalex runs continuously in the background and restarts automatically on server reboot or crash:
Paste the following service definition:
Enable and start the service:
Check status and live logs:

Step 5: Connect Custom Domain & HTTPS (Nginx)

Place the production Nginx configuration in /etc/nginx/sites-available/avalex.conf:
Enable the configuration and issue a free SSL certificate:

3. First-Time Login & Initial Setup

  1. Open your browser and navigate to: https://license.yourdomain.com
  2. Log in using your Master Admin credentials:
    • Username: master (or configured master-admin.username)
    • Password: (The password configured in master-admin.password)
  3. Navigate to Staff & Roles > Registration Keys to generate single-use registration keys for your staff members.
  4. Navigate to Products to create your software product catalog and define HWID and IP slot limits.