Skip to main content
Docs Apps Rybbit Analytics: Traefik & Backend Setup

Rybbit Analytics: Traefik & Backend Setup

Rybbit is a self-hosted analytics platform. Out of the box on Coolify, the frontend will silently fail to connect to its own backend.


NEXT_PUBLIC_BACKEND_URL is baked in at build time

This is a NEXT_PUBLIC_* Next.js variable, meaning it’s embedded into the JS bundle at image build time. You cannot change it at runtime via Coolify env vars or .env edits — the pre-built image already has a value baked in.

Consequence: The frontend client has no valid backend URL, so all API calls silently fail.


Signup page is blank / form invisible

The signup form renders but has opacity: 0 because the client fails to load session/config from the backend before revealing the form. This is not a blank page — the form is there but hidden.

Workaround to create an account: Open browser devtools, find the form container, set opacity: 1, fill and submit.


Fix — expose backend via Traefik at /api

The backend container (port 3001) is not exposed externally by default. Add Traefik labels to route Host(domain) && PathPrefix(/api) → port 3001, without strip prefix:

labels:
  - traefik.enable=true
  - 'traefik.http.routers.https-rybbit-backend.rule=Host(`rybbit.yourdomain.com`) && PathPrefix(`/api`)'
  - traefik.http.routers.https-rybbit-backend.entryPoints=https
  - traefik.http.routers.https-rybbit-backend.tls=true
  - traefik.http.routers.https-rybbit-backend.tls.certresolver=letsencrypt
  - traefik.http.services.rybbit-backend.loadbalancer.server.port=3001
  # NO strip-prefix middleware — /api must be passed through as-is

Also fix the SERVICE_URL_RYBBIT env var to HTTPS:

sed -i 's|SERVICE_URL_RYBBIT=http://.*|SERVICE_URL_RYBBIT=https://rybbit.yourdomain.com|' .env

Then disable signups once your account is created:

DISABLE_SIGNUP=true

Architecture overview

ContainerRolePort
rybbitNext.js frontend3002
rybbit_backendHono API server3001
rybbit_postgresPostgreSQL5432
rybbit_clickhouseClickHouse (event storage)

Zenith Stack

Want us to set up your self-hosted analytics stack?

Learn more