Skip to Content
For DevelopersDeployment

Deployment

This guide covers deploying Auktiva to various environments.

Deployment Options

PlatformDatabaseStorageDifficulty
VPS with PM2SQLite or TursoLocal or S3Easy
DockerSQLite or TursoLocal or S3Easy
VercelTurso onlyS3 onlyEasy

Serverless platforms (Vercel, Netlify) require Turso database and S3 storage. SQLite and local storage won’t work due to ephemeral filesystems.

The easiest way to deploy Auktiva is using Docker with the included docker-compose.yml.

Prerequisites

  • Docker and Docker Compose installed
  • A domain name (optional, for HTTPS)

Quick Start

# Clone the repository git clone https://github.com/thomsa/auktiva.git cd auktiva # Create environment file cp .env.example .env # Generate secrets AUTH_SECRET=$(openssl rand -base64 32) SOKETI_APP_KEY=$(openssl rand -hex 16) SOKETI_APP_SECRET=$(openssl rand -hex 32) # Edit .env with your settings nano .env

Environment Variables

See Environment Variables for a complete reference of all configuration options.

Minimum required for Docker:

# Authentication (REQUIRED) AUTH_SECRET="your-generated-secret" AUTH_URL="https://auctions.yourdomain.com" # Realtime (optional but recommended) NEXT_PUBLIC_REALTIME_DRIVER="soketi" NEXT_PUBLIC_SOKETI_APP_KEY="your-generated-key" SOKETI_APP_SECRET="your-generated-secret" NEXT_PUBLIC_SOKETI_HOST="auctions.yourdomain.com"

Start with Docker Compose

# Build and start all services docker compose up -d # View logs docker compose logs -f # Stop services docker compose down

This starts:

  • auktiva - The main application on port 3000
  • soketi - WebSocket server for realtime features on port 6001

Data Persistence

Docker volumes are used to persist data:

  • auktiva-data - SQLite database
  • auktiva-uploads - Uploaded images
  • auktiva-logs - Application logs

Building Manually

If you prefer to build the image manually:

# Build the image docker build -t auktiva . # Run the container docker run -d \ --name auktiva \ -p 3000:3000 \ -e AUTH_SECRET="your-secret" \ -e AUTH_URL="http://localhost:3000" \ -e DATABASE_URL="file:./data/auktiva.db" \ -v auktiva-data:/app/data \ -v auktiva-uploads:/app/public/uploads \ auktiva

VPS Deployment (PM2)

Deploy directly to a VPS without Docker using PM2 process manager.

Step 1: Install Dependencies

# Install Node.js 20 curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs # Install PM2 globally sudo npm install -g pm2

Step 2: Clone and Setup

git clone https://github.com/thomsa/auktiva.git cd auktiva npm ci npm run setup

Step 3: Build and Start

npm run build pm2 start ecosystem.config.js pm2 save pm2 startup

Nginx Reverse Proxy

For both Docker and PM2 deployments, use Nginx as a reverse proxy.

Main Application

server { listen 80; server_name auctions.yourdomain.com; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; 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; proxy_cache_bypass $http_upgrade; } }

WebSocket Server (Soketi)

Soketi requires a separate subdomain for WebSocket connections:

server { listen 80; server_name ws.auctions.yourdomain.com; location / { proxy_pass http://localhost:6001; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; 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; proxy_read_timeout 86400; } }

Then set NEXT_PUBLIC_SOKETI_HOST="ws.auctions.yourdomain.com" in your .env.

Enable HTTPS

sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d auctions.yourdomain.com -d ws.auctions.yourdomain.com

Vercel Deployment

Vercel requires Turso database and S3 storage due to its serverless nature.

  1. Push your code to GitHub
  2. Import project in Vercel Dashboard
  3. Set environment variables (see Configuration)
  4. Deploy

Rate limiting uses in-memory storage which doesn’t work reliably on Vercel. Consider using Upstash Redis for production rate limiting.

Updates

Docker

cd /path/to/auktiva git pull docker compose build docker compose up -d

PM2

cd /path/to/auktiva git pull npm ci npm run build pm2 restart auktiva

Or use the built-in update system from Settings → Deployment Administration (see Deployment Admin).

Last updated on