Skip to content

Prerequisites

Before deploying the Expose server, ensure you have the following ready.

VPS Setup

1. Provision a VPS

Get a VPS from any provider (Hetzner, DigitalOcean, Vultr, etc.) with:

  • Ubuntu 22.04+ or Debian 12+
  • At least 1 GB RAM
  • Public IPv4 address

2. Install Docker

SSH into your VPS and install Docker:

Terminal window
# Update packages
apt update && apt upgrade -y
# Install Docker
curl -fsSL https://get.docker.com | sh
# Add your user to the docker group
usermod -aG docker $USER
# Install Docker Compose
apt install docker-compose-plugin -y
# Verify installation
docker --version
docker compose version
Terminal window
# Create a user
adduser expose
usermod -aG docker expose
usermod -aG sudo expose
# Switch to the new user
su - expose

Domain Setup

DNS Records

You need three DNS records pointing to your VPS:

api.yourdomain.com → YOUR_VPS_IP
*.expose.yourdomain.com → YOUR_VPS_IP
*.hosted.yourdomain.com → YOUR_VPS_IP

Verify DNS

Wait for DNS propagation (usually 5-30 minutes), then verify:

Terminal window
dig +short api.yourdomain.com
# Should return your VPS IP

Traefik Setup

Expose uses Traefik as a reverse proxy for TLS termination. If you don’t have Traefik set up already, here’s a quick guide:

Create Traefik Directory

Terminal window
mkdir -p /opt/traefik
cd /opt/traefik

Create Configuration

Create traefik.yml:

api:
dashboard: true
entryPoints:
web:
address: ":80"
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: ":443"
certificatesResolvers:
letsencrypt:
acme:
email: your@email.com
storage: /letsencrypt/acme.json
dnsChallenge:
provider: ovh # Change to your DNS provider
providers:
docker:
exposedByDefault: false
network: web

Create Docker Network

Terminal window
docker network create web

Create docker-compose.yml

services:
traefik:
image: traefik:v3.0
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- ./letsencrypt:/letsencrypt
environment:
# Add your DNS provider credentials
- OVH_ENDPOINT=ovh-eu
- OVH_APPLICATION_KEY=xxx
- OVH_APPLICATION_SECRET=xxx
- OVH_CONSUMER_KEY=xxx
networks:
- web
networks:
web:
external: true

Start Traefik

Terminal window
docker compose up -d

Next Steps

Once you have:

  • ✅ VPS with Docker installed
  • ✅ DNS records configured
  • ✅ Traefik running

Continue to DNS Configuration for detailed DNS setup.