Portabase Logo
Portabase DashboardConfiguration

Reverse Proxy

Expose your Dashboard to the internet securely with HTTPS.

By default, the Portabase Dashboard listens on http://localhost:8887. To make it accessible from the outside (e.g. portabase.example.com) and secure it with HTTPS, use a Reverse Proxy.


This setup assumes you already run a Traefik instance on your server and it watches the Docker network (commonly traefik_network or proxy).

Docker Compose changes

Modify your docker-compose.yml to:

  1. Remove direct host port exposure (no 8887:80).
  2. Connect the container to Traefik's network.
  3. Add Traefik labels.
docker-compose.yml
name: portabase-dashboard

services:
  portabase:
    container_name: portabase-app
    image: portabase/portabase:latest
    restart: always
    env_file: .env
    environment:
        - TZ=Europe/Paris
    expose:
      - 80
    volumes:
      - portabase-data:/data
    depends_on:
      db:
        condition: service_healthy
    networks:
      - traefik_network # Network where Traefik lives
      - default # To talk to the local database
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.portabase.entrypoints=web,websecure"
      - "traefik.http.routers.portabase.rule=Host(`portabase.example.com`)"
      - "traefik.http.routers.portabase.tls.certresolver=myresolver"

  db:
    container_name: portabase-pg
    image: postgres:17-alpine
    restart: always
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=${POSTGRES_DB}
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - default

volumes:
  postgres-data:
  portabase-data:

networks:
  traefik_network:
  external: true

Name conflicts

If you host multiple dashboards on the same Traefik server, change the router name in labels to unique values:

  • Instance 1: traefik.http.routers.portabase-prod...
  • Instance 2: traefik.http.routers.portabase-dev...

PROJECT_URL environment variable

Whatever reverse proxy you use, update the .env file so generated links and emails use the correct public URL.

.env
# Before
PROJECT_URL=http://localhost:8887

# After (your public domain)
PROJECT_URL=https://portabase.example.com

Restart the dashboard after changing this:

portabase restart .

Last updated on

On this page