DocsGuidesSelf-Hosting

Self-Hosting

Deploy your own ServerMe server.

One-command install

On a fresh Ubuntu 22.04+ VPS:

bash
curl -fsSL https://raw.githubusercontent.com/jams24/serverme/main/deploy/install.sh | bash -s -- \
  --domain tunnel.yourdomain.com \
  --email you@example.com

This installs PostgreSQL, Caddy (for TLS), and ServerMe. Takes about 2 minutes.

DNS setup

Before or after install, add these DNS records:

TypeNameTarget
Atunnel.yourdomain.com<your-server-ip>
CNAME*.tunnel.yourdomain.comtunnel.yourdomain.com
CNAMEapi.tunnel.yourdomain.comtunnel.yourdomain.com

Docker Compose

yaml
services:
  serverme:
    image: ghcr.io/jams24/servermesrv:latest
    ports:
      - "8443:8443"
      - "9080:9080"
      - "9081:9081"
    environment:
      SM_DOMAIN: tunnel.yourdomain.com
      SM_DATABASE_URL: postgres://serverme:pass@postgres:5432/serverme
      SM_JWT_SECRET: your-secret-here
    depends_on:

postgres: image: postgres:16-alpine environment: POSTGRES_DB: serverme POSTGRES_USER: serverme POSTGRES_PASSWORD: pass volumes: - pgdata:/var/lib/postgresql/data

volumes: pgdata: ```

Connect clients

Point clients to your server:

bash
serverme http 3000 --server tunnel.yourdomain.com:8443

Options

FlagDescription
--domainBase domain (required)
--emailFor Let's Encrypt certs (required)
--google-idGoogle OAuth Client ID
--google-secretGoogle OAuth Client Secret
--skip-caddySkip Caddy install
--skip-dbSkip PostgreSQL install