Skip to main content

Domain & HTTPS Setup (Linux / Nginx)

When deploying your self-hosted Avalex instance on a Linux server, you can connect your custom domain name (e.g. license.yourdomain.com or crm.yourdomain.com) and secure all API and Admin Portal traffic with HTTPS. This guide walks you through setting up an Nginx reverse proxy on Linux with automated, free SSL certificates via Let’s Encrypt / Certbot.

1. Point Your Domain Name to Your Server

Before configuring Nginx, point your domain or subdomain to your Linux server’s public IP address:
  1. Log into your DNS provider (Cloudflare, Namecheap, GoDaddy, Porkbun, AWS Route 53, etc.).
  2. Add an A Record:
    • Name / Host: license (for license.yourdomain.com) or @ (for root domain yourdomain.com)
    • Target / Value: Your Linux server’s public IPv4 address
    • TTL: Auto or 300 seconds

2. Install Nginx and Certbot

Connect to your Linux server via SSH and install Nginx and Certbot:

Ubuntu / Debian:

RHEL / Rocky Linux / AlmaLinux / CentOS:


3. Configure the Nginx Site

  1. Create a new site configuration file in /etc/nginx/sites-available/avalex.conf:
  2. Paste the following production configuration, replacing license.yourdomain.com with your actual domain name:
  1. Enable the site and test Nginx syntax:

4. Obtain Free SSL Certificate via Certbot

Run Certbot to automatically issue and install your Let’s Encrypt certificate:
Follow the on-screen prompts. Certbot will verify your domain, install the certificates, and automatically configure renewal via a background systemd timer.

5. Verify Your Setup

Once configured:
  • Admin Portal UI: Access your web dashboard securely at https://license.yourdomain.com.
  • License Validation API: In your software applications, call POST https://license.yourdomain.com/licenses/validate.
  • BuiltByBit Webhook: Set your BuiltByBit resource webhook URL to https://license.yourdomain.com/builtbybit.
All HTTP traffic will automatically upgrade to HTTPS, and client IP addresses will be passed transparently to Avalex for rate limiting and IP slot enforcement.