Self Hosting

Deploy Nuvix on your own infrastructure using Docker.

Nuvix allows you to own your infrastructure completely. This guide covers deploying the full stack—Database, Auth, Storage, and Console—using Docker.

Prerequisites

  • Docker Engine (v20.10+)
  • Docker Compose (v2.0+)
  • Git

Setup

Clone the main repository.

git clone https://github.com/Nuvix-tech/nuvix.git
cd nuvix

Environment Configuration

Copy the example configuration to a production .env file.

cp .env.example .env

Critical Variables

You must change these values in .env for a secure deployment:

# Security Keys (Generate strong random strings)
NUVIX_JWT_SECRET="<generate-random-string>"
NUVIX_ENCRYPTION_KEY="<generate-random-string>"
NUVIX_DATABASE_ENCRYPTION_KEY="<must-be-exactly-16-chars>" # e.g. "a1b2c3d4e5f6g7h8"

# Database Credentials
NUVIX_DATABASE_ADMIN_PASSWORD="<strong-db-password>"
NUVIX_DATABASE_PASSWORD="<strong-db-password>"

# Initial Admin User (Created on first run)
NUVIX_ADMIN_EMAIL="admin@yourdomain.com"
NUVIX_ADMIN_PASSWORD="<strong-admin-password>"

# Domain Configuration
NUVIX_DOMAIN="yourdomain.com"
NUVIX_CONSOLE_URL="https://console.yourdomain.com"

Deploy

Start the stack in detached mode.

docker compose up -d

Stack Components

  • server: Core API (Port 4000)
  • platform: Console UI (Port 4100)
  • postgres: Main Database (Port 5432)
  • redis: Cache & PubSub (Port 6379)
  • pgcat: Connection Pooler (Optional/Commented out by default)

Verify

Check container status:

docker compose ps

Access the console at: http://<your-server-ip>:4100 (or your configured domain).

Production Tips

Reverse Proxy

We recommend running Nuvix behind a reverse proxy like Caddy or Nginx for HTTPS.

Example Caddyfile:

console.yourdomain.com {
    reverse_proxy localhost:4100
}

api.yourdomain.com {
    reverse_proxy localhost:4000
}

Storage

By default, Nuvix uses local disk storage mounted to the server container.

  • Volume: nuvix_storage
  • Host Path: /var/lib/docker/volumes/nuvix_storage/_data

Ensure your host has sufficient disk space or mount an external block storage volume to this location.

Updates

To update your instance:

git pull
docker compose pull
docker compose up -d

How is this guide?

Last update: