Advanced
This guide covers advanced configuration options for self-hosting Rybbit.
Setup Script Options
The setup script supports several options:
./setup.sh <domain_name> [options]
Available options:
--no-webserver
: Disable the built-in Caddy webserver--backend-port <port>
: Set custom host port for backend (default: 3001)--client-port <port>
: Set custom host port for client (default: 3002)--help
: Show help message
Examples:
# Custom ports with built-in webserver
./setup.sh tracking.example.com --backend-port 8080 --client-port 8081
# Custom ports with your own webserver
./setup.sh tracking.example.com --no-webserver --backend-port 8080 --client-port 8081
When you specify custom ports, only the host port mapping changes. Inside the Docker containers, the services still use ports 3001 and 3002.
Using Your Own Web Server
If you prefer to use your own web server instead of the built-in Caddy server, you can use the --no-webserver
flag:
./setup.sh your.domain.name --no-webserver
This will:
- Not start the Caddy container
- Expose the backend service on host port 3001 (or your custom port)
- Expose the client service on host port 3002 (or your custom port)
For detailed configuration examples with Nginx, Traefik, NPM, and other reverse proxies, see our Manual Docker Compose Setup guide.
Environment Variables
The setup script creates a minimal .env
file with only the essential variables:
DOMAIN_NAME=your.domain.com
BASE_URL=https://your.domain.com
BETTER_AUTH_SECRET=generated_secret
DISABLE_SIGNUP=false
Optional variables that can be added:
# Database configuration (uses defaults if not specified)
CLICKHOUSE_PASSWORD=frog
POSTGRES_USER=frog
POSTGRES_PASSWORD=frog
POSTGRES_DB=analytics
CLICKHOUSE_DB=analytics
# Custom image tags
IMAGE_TAG=latest
# Port mapping (only needed for custom ports or --no-webserver)
HOST_BACKEND_PORT="3001:3001"
HOST_CLIENT_PORT="3002:3002"
Last updated on