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:
# Update packagesapt update && apt upgrade -y
# Install Dockercurl -fsSL https://get.docker.com | sh
# Add your user to the docker groupusermod -aG docker $USER
# Install Docker Composeapt install docker-compose-plugin -y
# Verify installationdocker --versiondocker compose version3. Set Up a Non-Root User (Recommended)
# Create a useradduser exposeusermod -aG docker exposeusermod -aG sudo expose
# Switch to the new usersu - exposeDomain 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_IPVerify DNS
Wait for DNS propagation (usually 5-30 minutes), then verify:
dig +short api.yourdomain.com# Should return your VPS IPTraefik 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
mkdir -p /opt/traefikcd /opt/traefikCreate 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: webCreate Docker Network
docker network create webCreate 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: trueStart Traefik
docker compose up -dNext Steps
Once you have:
- ✅ VPS with Docker installed
- ✅ DNS records configured
- ✅ Traefik running
Continue to DNS Configuration for detailed DNS setup.