docs: add sections for popular deployment methods

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-28 12:56:16 +01:00
parent 8b31e4cfba
commit a39796a829
8 changed files with 2244 additions and 4 deletions

View File

@@ -0,0 +1,222 @@
---
title: Deploy with Coolify
description: Deploy OpenPanel using Coolify's one-click service
---
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Callout } from 'fumadocs-ui/components/callout';
[Coolify](https://coolify.io) is an open-source, self-hosted platform that simplifies deploying applications. OpenPanel is available as a one-click service in Coolify, making deployment quick and easy.
## Prerequisites
- A Coolify instance installed and running
- A server with at least 2GB RAM (4GB+ recommended)
- Domain name configured in Coolify (optional but recommended)
## Quick Start
<Steps>
<Step>
### Create a New Resource
1. Log in to your Coolify dashboard
2. Navigate to your project
3. Click **"New Resource"** or **"Add Service"**
4. Select **"One-Click Services"** or **"Docker Compose"**
</Step>
<Step>
### Select OpenPanel
1. Search for **"OpenPanel"** in the services list
2. Click on **OpenPanel** to select it
3. The service template will be automatically filled in with the required configuration
</Step>
<Step>
### Configure Your Deployment
Coolify will automatically configure most settings, but you may want to customize:
- **Domain**: Set your domain name for the dashboard
- **Environment Variables**: Configure optional settings like:
- `ALLOW_REGISTRATION`: Set to `false` to disable public registration
- `ALLOW_INVITATION`: Set to `true` to allow user invitations
- `RESEND_API_KEY`: Your Resend API key for email features
- `EMAIL_SENDER`: Email sender address
- `OPENAI_API_KEY`: OpenAI API key for AI features (optional)
- `AI_MODEL`: AI model to use (`gpt-4o-mini`, `gpt-4o`, or `claude-3-5`)
<Callout>
Coolify automatically handles:
- Database setup (PostgreSQL)
- Redis configuration
- ClickHouse setup
- SSL certificates
- Service health checks
- Automatic restarts
</Callout>
</Step>
<Step>
### Deploy
1. Review your configuration
2. Click **"Deploy"** or **"Save"**
3. Coolify will automatically:
- Pull the required Docker images
- Start all services
- Run database migrations
- Set up SSL certificates (if domain is configured)
Wait for all services to become healthy. You can monitor the deployment progress in the Coolify dashboard.
</Step>
<Step>
### Access Your Dashboard
Once deployment is complete, you can access OpenPanel at your configured domain. The first user to register will become the admin account.
<Callout type="warn">
By default, registration is disabled after the first user is created. Make sure to register your admin account first!
</Callout>
</Step>
</Steps>
## Service Structure
Coolify deploys OpenPanel with the following services:
- **opapi**: OpenPanel API server (handles `/api` routes)
- **opdashboard**: OpenPanel dashboard (frontend)
- **opworker**: Background worker for processing events
- **opdb**: PostgreSQL database
- **opkv**: Redis cache
- **opch**: ClickHouse analytics database
## Configuration
### Environment Variables
You can configure OpenPanel through environment variables in Coolify. Coolify automatically sets the required database and connection variables.
For a complete reference of all available environment variables, see the [Environment Variables documentation](/docs/self-hosting/environment-variables).
#### Coolify-Specific Notes
Coolify automatically handles these variables:
- `DATABASE_URL`: PostgreSQL connection string
- `REDIS_URL`: Redis connection string
- `CLICKHOUSE_URL`: ClickHouse connection string
- `NEXT_PUBLIC_API_URL`: API endpoint URL (set via `SERVICE_FQDN_OPAPI`)
- `NEXT_PUBLIC_DASHBOARD_URL`: Dashboard URL (set via `SERVICE_FQDN_OPDASHBOARD`)
- `COOKIE_SECRET`: Automatically generated secret
You can configure optional variables like `ALLOW_REGISTRATION`, `RESEND_API_KEY`, `OPENAI_API_KEY`, etc. through Coolify's environment variable interface.
### Updating OpenPanel
To update OpenPanel in Coolify:
1. Navigate to your OpenPanel service
2. Click **"Redeploy"** or **"Update"**
3. Coolify will pull the latest images and restart services
<Callout>
Database migrations run automatically when the API service starts, so updates are seamless.
</Callout>
### Scaling
You can scale the worker service in Coolify:
1. Navigate to your OpenPanel service
2. Edit the `opworker` service configuration
3. Adjust the replica count
4. Save and redeploy
## Troubleshooting
### Services Not Starting
1. Check service logs in Coolify dashboard
2. Verify all environment variables are set correctly
3. Ensure your server has enough resources (RAM, disk space)
### Database Connection Issues
1. Verify the database service (`opdb`) is running
2. Check that `DATABASE_URL` is correctly formatted
3. Review database logs in Coolify
### SSL Certificate Issues
If SSL certificates aren't being issued:
1. Verify your domain DNS is pointing to Coolify
2. Check Coolify's SSL/TLS settings
3. Review Coolify logs for Let's Encrypt errors
### Health Check Failures
If health checks are failing:
1. Check service logs for errors
2. Verify all dependencies are running
3. Increase health check timeout if needed
## Using Your Own Database
If you want to use an external PostgreSQL database:
1. Create a new PostgreSQL database in Coolify or use an external service
2. Update the `DATABASE_URL` environment variable in your OpenPanel service
3. Update `DATABASE_URL_DIRECT` to match
4. Redeploy the service
The same applies to Redis and ClickHouse if you want to use external services.
## Backup and Restore
### Backup
Coolify provides built-in backup functionality:
1. Navigate to your database service (`opdb`)
2. Configure backup settings
3. Set up backup schedule
4. Backups will be stored according to your Coolify configuration
### Manual Backup
You can also create manual backups:
1. Use Coolify's terminal access
2. Export the database:
```bash
docker exec opdb pg_dump -U postgres openpanel-db > backup.sql
```
### Restore
To restore from a backup:
1. Use Coolify's terminal access
2. Restore the database:
```bash
docker exec -i opdb psql -U postgres openpanel-db < backup.sql
```
## Next Steps
- [Configure email settings](/docs/self-hosting/self-hosting#e-mail) for password resets and invitations
- [Set up AI integration](/docs/self-hosting/self-hosting#ai-integration) for the analytics assistant
- [Configure SDK](/docs/self-hosting/self-hosting#always-use-correct-api-url) to track events from your applications
## Additional Resources
- [Coolify Documentation](https://coolify.io/docs)
- [Coolify Services Directory](https://coolify.io/docs/services)
- [OpenPanel on Coolify](https://coolify.io/docs/services/openpanel)

View File

@@ -0,0 +1,364 @@
---
title: Deploy with Docker Compose
description: Deploy OpenPanel using Docker Compose on your own server
---
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Callout } from 'fumadocs-ui/components/callout';
This guide will help you deploy OpenPanel using Docker Compose. This method gives you full control over your deployment and is perfect for self-hosting on a VPS or dedicated server.
## Prerequisites
- A VPS or server (Docker and Node will be installed automatically if needed)
- At least 2GB RAM (4GB+ recommended)
- Domain name pointing to your server (optional but recommended)
- Basic knowledge of command line
<Callout>
🙋‍♂️ This should work on any system. The setup script will install Docker and Node if they're not already installed.
</Callout>
## Quick Start
<Steps>
<Step>
### Clone the Repository
Clone the OpenPanel repository and navigate to the self-hosting directory:
```bash
git clone -b self-hosting https://github.com/Openpanel-dev/openpanel.git
cd openpanel/self-hosting
```
</Step>
<Step>
### Run the Setup Script
The setup script will guide you through the configuration process. It will:
1. Install Node.js (if you accept and it's not already installed)
2. Install Docker (if you accept and it's not already installed)
3. Run an interactive quiz/wizard that asks questions about your setup
> Setup takes 30s to 2 minutes depending on your VPS
```bash
./setup
```
The wizard will ask you questions about:
- Your domain name
- Database configuration
- Email settings (optional)
- AI integration (optional)
- Registration settings
<Callout>
⚠️ If the `./setup` script fails to run, you can do it manually:
1. Install Docker
2. Install Node.js
3. Install npm
4. Run `npm run quiz` inside the self-hosting folder
</Callout>
</Step>
<Step>
### Start the Services
After the setup is complete, start all OpenPanel services:
```bash
./start
```
This will start all required services:
- **op-db**: PostgreSQL database
- **op-kv**: Redis cache
- **op-ch**: ClickHouse analytics database
- **op-api**: OpenPanel API server
- **op-dashboard**: OpenPanel dashboard (frontend)
- **op-worker**: Background worker for processing events
</Step>
<Step>
### Verify Installation
Check that all containers are running:
```bash
docker compose ps
```
All services should show as "healthy" or "running". You can also check the logs:
```bash
docker compose logs -f
```
Or use the provided logs script:
```bash
./logs
```
Once all services are healthy, you can access OpenPanel at your configured domain (or `http://your-server-ip` if you haven't configured a domain).
</Step>
</Steps>
## Configuration
### Environment Variables
The setup wizard will configure most environment variables automatically. You can manually edit the `.env` file in the `self-hosting` directory if needed.
For a complete reference of all available environment variables, see the [Environment Variables documentation](/docs/self-hosting/environment-variables).
<Callout>
If you change the `.env` file, you need to restart the services for the changes to take effect. Use `./stop` and `./start` or `docker compose restart`.
</Callout>
### Using Custom Docker Images
If you want to use specific image versions, edit the `docker-compose.yml` file and update the image tags:
```yaml
op-api:
image: lindesvard/openpanel-api:v1.0.0 # Specify version
```
### Scaling Workers
To scale the worker service, set the `OP_WORKER_REPLICAS` environment variable:
```bash
OP_WORKER_REPLICAS=3 docker compose up -d
```
Or edit the `docker-compose.yml` file:
```yaml
op-worker:
deploy:
replicas: 3
```
## Managing Your Deployment
OpenPanel comes with several utility scripts to help manage your deployment. All scripts should be run from within the `self-hosting` directory.
### Basic Operations
```bash
./start # Start all OpenPanel services
./stop # Stop all OpenPanel services
./logs # View real-time logs from all services
```
### View Logs
View logs from all services:
```bash
./logs
```
Or using Docker Compose directly:
```bash
docker compose logs -f
```
View logs from a specific service:
```bash
docker compose logs -f op-api
```
### Stop Services
Stop all services:
```bash
./stop
```
Or using Docker Compose:
```bash
docker compose down
```
Stop services but keep volumes (data persists):
```bash
docker compose stop
```
### Restart Services
Restart all services:
```bash
./stop && ./start
```
Or using Docker Compose:
```bash
docker compose restart
```
Restart a specific service:
```bash
docker compose restart op-api
```
### Rebuild Services
Rebuild and restart a specific service:
```bash
./rebuild op-dashboard
```
### Update OpenPanel
To update to the latest version, use the update script:
```bash
./update
```
This script will:
1. Pull the latest changes from the repository
2. Pull the latest Docker images
3. Restart all services
<Callout>
If you don't have the `./update` script, you can manually update:
```bash
git pull
docker compose pull
docker compose up -d
```
</Callout>
<Callout type="warn">
Always backup your data before updating. The database migrations will run automatically when the API container starts. Also read any changes in the [changelog](/docs/self-hosting/changelog) and apply them to your instance.
</Callout>
### Backup and Restore
#### Backup
Backup your PostgreSQL database:
```bash
docker compose exec op-db pg_dump -U postgres postgres > backup.sql
```
Backup volumes:
```bash
docker run --rm -v openpanel_op-db-data:/data -v $(pwd):/backup alpine tar czf /backup/db-backup.tar.gz /data
```
#### Restore
Restore PostgreSQL database:
```bash
docker compose exec -T op-db psql -U postgres postgres < backup.sql
```
## Troubleshooting
### Services Won't Start
1. Check Docker and Docker Compose versions:
```bash
docker --version
docker compose version
```
2. Check available disk space:
```bash
df -h
```
3. Check logs for errors:
```bash
docker compose logs
```
### Database Connection Issues
If services can't connect to the database:
1. Verify the database is healthy:
```bash
docker compose ps op-db
```
2. Check database logs:
```bash
docker compose logs op-db
```
3. Verify `DATABASE_URL` in your `.env` file matches the service name `op-db`
### Port Conflicts
If ports 80 or 443 are already in use, you can:
1. Change the ports in `docker-compose.yml`:
```yaml
ports:
- "8080:80"
- "8443:443"
```
2. Or stop the conflicting service
### Health Check Failures
If health checks are failing:
1. Check if services are actually running:
```bash
docker compose ps
```
2. Increase health check timeout in `docker-compose.yml`:
```yaml
healthcheck:
interval: 30s
timeout: 10s
retries: 10
```
## Using Your Own Reverse Proxy
If you're using your own reverse proxy (like Nginx or Traefik), you can disable the included Caddy proxy by commenting it out in `docker-compose.yml`:
```yaml
# op-proxy:
# image: caddy:2-alpine
# ...
```
Then configure your reverse proxy to forward requests:
- `/api/*` → `op-api:3000`
- `/*` → `op-dashboard:3000`
## Next Steps
- [Configure email settings](/docs/self-hosting/self-hosting#e-mail) for password resets and invitations
- [Set up AI integration](/docs/self-hosting/self-hosting#ai-integration) for the analytics assistant
- [Configure SDK](/docs/self-hosting/self-hosting#always-use-correct-api-url) to track events from your applications

View File

@@ -0,0 +1,279 @@
---
title: Deploy with Dokploy
description: Deploy OpenPanel using Dokploy's Docker Compose template
---
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Callout } from 'fumadocs-ui/components/callout';
[Dokploy](https://dokploy.com) is an open-source, self-hosted platform for deploying applications. OpenPanel can be deployed on Dokploy using the Docker Compose template, with some specific configuration requirements.
<Callout type="warn">
⚠️ **Important**: The Dokploy template requires specific configuration that differs from Coolify. Make sure to follow all steps carefully, especially the environment variables and domain configuration.
</Callout>
<Callout type="warn">
⚠️ **Important**: We have an open issue on dokploy https://github.com/Dokploy/templates/issues/292 and hoping it will be resolved.
</Callout>
## Prerequisites
- A Dokploy instance installed and running
- A server with at least 2GB RAM (4GB+ recommended)
- Domain name configured in Dokploy
## Quick Start
<Steps>
<Step>
### Deploy OpenPanel Template
1. Log in to your Dokploy dashboard
2. Navigate to your project
3. Click **"New Application"** or **"Deploy"**
4. Select **"Docker Compose"** or search for **"OpenPanel"** template
5. Select the OpenPanel template
</Step>
<Step>
### Configure Domain Names
Configure your domain names in Dokploy:
1. Set up the main domain for the dashboard (e.g., `analytics.yourdomain.com`)
2. Configure the API domain - this should be the **same domain** as the dashboard, with the API path forwarded to `/api`
<Callout>
The API and dashboard use the same domain. The API service has a forward path to `/api`, so make sure to configure this correctly.
</Callout>
</Step>
<Step>
### Configure Environment Variables
Edit the `.env` file or environment variables in Dokploy. You **must** set these environment variables:
```bash
# Required: Set these to your actual domain
NEXT_PUBLIC_API_URL=https://yourdomain.com/api
NEXT_PUBLIC_DASHBOARD_URL=https://yourdomain.com
# Database Configuration (automatically set by Dokploy)
OPENPANEL_POSTGRES_DB=openpanel-db
SERVICE_USER_POSTGRES=postgres
SERVICE_PASSWORD_POSTGRES=<auto-generated>
SERVICE_PASSWORD_REDIS=<auto-generated>
# Optional Configuration
OPENPANEL_ALLOW_REGISTRATION=false
OPENPANEL_ALLOW_INVITATION=true
RESEND_API_KEY=your-resend-api-key
OPENPANEL_EMAIL_SENDER=noreply@yourdomain.com
```
<Callout type="warn">
⚠️ **Critical**: Unlike Coolify, Dokploy does not support `SERVICE_FQDN_*` variables. You **must** hardcode `NEXT_PUBLIC_API_URL` and `NEXT_PUBLIC_DASHBOARD_URL` with your actual domain values.
</Callout>
</Step>
<Step>
### Configure API Service Domain Settings
In Dokploy, configure the API service domain:
1. Go to the `op-api` service configuration
2. Set up the domain configuration:
```toml
[[config.domains]]
serviceName = "op-api"
port = 3000
host = "${api_domain}"
```
3. **Important**: Check the **"Strip external path"** checkbox for the API service
<Callout>
The "Strip external path" option is crucial! Without it, the API will receive incorrect paths when requests are forwarded from `/api`.
</Callout>
</Step>
<Step>
### Deploy
1. Review all configuration
2. Click **"Deploy"** or **"Save"**
3. Wait for all services to start and become healthy
Monitor the deployment logs to ensure all services start correctly.
</Step>
<Step>
### Verify Installation
Once deployment is complete:
1. Check that all services are running:
- `op-api` - API server
- `op-dashboard` - Dashboard (frontend)
- `op-worker` - Background worker
- `op-db` - PostgreSQL database
- `op-kv` - Redis cache
- `op-ch` - ClickHouse database
2. Access your dashboard at your configured domain
3. Try creating an account to verify the API is working correctly
<Callout type="warn">
If you're using Cloudflare in front of Dokploy, remember to purge the Cloudflare cache after making changes to ensure updated resources are served.
</Callout>
</Step>
</Steps>
## Configuration Details
### Required Environment Variables
For Dokploy, you **must** hardcode these variables (unlike Coolify, Dokploy doesn't support `SERVICE_FQDN_*` variables):
- `NEXT_PUBLIC_API_URL` - Full API URL (e.g., `https://analytics.example.com/api`)
- `NEXT_PUBLIC_DASHBOARD_URL` - Full Dashboard URL (e.g., `https://analytics.example.com`)
Dokploy automatically sets:
- `OPENPANEL_POSTGRES_DB` - PostgreSQL database name
- `SERVICE_USER_POSTGRES` - PostgreSQL username
- `SERVICE_PASSWORD_POSTGRES` - PostgreSQL password (auto-generated)
- `SERVICE_PASSWORD_REDIS` - Redis password (auto-generated)
For a complete reference of all available environment variables, see the [Environment Variables documentation](/docs/self-hosting/environment-variables).
### Domain Configuration
The API and dashboard services share the same domain:
- **Dashboard**: Serves the frontend at the root path (`/`)
- **API**: Serves the API at `/api` path
**Important settings for the API service:**
- Domain: Same as dashboard domain
- Path: `/api`
- **Strip external path**: ✅ **Must be checked**
This ensures that when requests come to `/api/*`, the path is correctly forwarded to the API service without the `/api` prefix.
## Troubleshooting
### API Requests Not Working
If API requests fail after deployment:
1. **Verify environment variables**:
```bash
# Check that NEXT_PUBLIC_API_URL is set correctly
docker exec <op-api-container> env | grep NEXT_PUBLIC_API_URL
docker exec <op-dashboard-container> env | grep NEXT_PUBLIC_API_URL
```
2. **Check "Strip external path" setting**:
- Go to API service configuration in Dokploy
- Ensure "Strip external path" is **checked**
3. **Verify domain configuration**:
- API service should have path `/api`
- Dashboard service should be at root `/`
### Account Creation Not Working
If account creation fails:
1. Check API logs:
```bash
# In Dokploy, view logs for op-api service
```
2. Verify `NEXT_PUBLIC_API_URL` matches your domain:
- Should be `https://yourdomain.com/api`
- Not `http://localhost:3000` or similar
3. Check that the API service is accessible:
```bash
curl https://yourdomain.com/api/healthcheck
```
### Cloudflare Cache Issues
If you're using Cloudflare in front of Dokploy:
1. After deploying or updating, purge Cloudflare cache
2. This ensures updated resources are served immediately
3. You can do this from Cloudflare dashboard or API
### Database Connection Issues
If services can't connect to databases:
1. Verify database services are running:
- `op-db` (PostgreSQL)
- `op-kv` (Redis)
- `op-ch` (ClickHouse)
2. Check environment variables are set:
```bash
docker exec <op-api-container> env | grep DATABASE_URL
```
3. Verify service names match in docker-compose:
- Database service names: `op-db`, `op-kv`, `op-ch`
- These should match the hostnames in connection strings
## Docker Compose Structure
The OpenPanel template includes these services:
- **op-api**: OpenPanel API server
- **op-dashboard**: OpenPanel dashboard (frontend)
- **op-worker**: Background worker for processing events
- **op-db**: PostgreSQL database
- **op-kv**: Redis cache
- **op-ch**: ClickHouse analytics database
## Differences from Coolify
The Dokploy template differs from Coolify in these ways:
1. **Environment Variables**:
- Dokploy does not support `SERVICE_FQDN_*` variables
- Must hardcode `NEXT_PUBLIC_API_URL` and `NEXT_PUBLIC_DASHBOARD_URL`
2. **Domain Configuration**:
- Must manually configure domain paths
- Must enable "Strip external path" for API service
3. **Service Discovery**:
- Uses standard Docker Compose service names
- No automatic FQDN resolution
## Updating OpenPanel
To update OpenPanel in Dokploy:
1. Pull the latest images:
```bash
docker compose pull
```
2. Restart services:
```bash
docker compose up -d
```
Or use Dokploy's UI to restart services.
## Next Steps
- [Configure email settings](/docs/self-hosting/self-hosting#e-mail) for password resets and invitations
- [Set up AI integration](/docs/self-hosting/self-hosting#ai-integration) for the analytics assistant
- [Configure SDK](/docs/self-hosting/self-hosting#always-use-correct-api-url) to track events from your applications
## Additional Resources
- [Dokploy Documentation](https://dokploy.com/docs)
- [OpenPanel GitHub Issue #292](https://github.com/Dokploy/templates/issues/292) - Discussion about Dokploy deployment

View File

@@ -0,0 +1,562 @@
---
title: Deploy on Kubernetes
description: Deploy OpenPanel on Kubernetes using Helm
---
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Callout } from 'fumadocs-ui/components/callout';
OpenPanel can be deployed on Kubernetes using the community-maintained Helm chart. This allows you to run OpenPanel in a scalable, production-ready Kubernetes environment.
<Callout>
The Helm chart is maintained by the community and available on [Artifact Hub](https://artifacthub.io/packages/helm/openpanel/openpanel).
</Callout>
## Prerequisites
- Kubernetes 1.19+
- Helm 3.0+
- `kubectl` configured to access your cluster
- At least 2GB RAM per node (4GB+ recommended)
- Persistent volume support (if using self-hosted databases)
## Quick Start
<Steps>
<Step>
### Add the Helm Repository
Add the OpenPanel Helm repository:
```bash
helm repo add openpanel https://yashGoyal40.github.io/openpanel
helm repo update
```
</Step>
<Step>
### Download Default Values
Download the default values file to customize your configuration:
```bash
helm show values openpanel/openpanel > my-values.yaml
```
<Callout type="warn">
⚠️ **IMPORTANT**: Before installing, you **MUST** configure the required values in `values.yaml`. The chart includes placeholder values (marked with `<>`) that will cause the installation to fail if not properly configured.
</Callout>
</Step>
<Step>
### Configure Required Values
Edit `my-values.yaml` and configure the following **required** values:
1. **Ingress Configuration**:
```yaml
ingress:
enabled: true
type: standard # or "httpproxy" for Contour
fqdn: your-domain.com # Replace with your actual domain
standard:
tlsSecretName: openpanel-tls
```
2. **Application URLs**:
```yaml
config:
apiUrl: "https://your-domain.com/api"
dashboardUrl: "https://your-domain.com"
googleRedirectUri: "https://your-domain.com/api/oauth/google/callback"
```
3. **Cookie Secret** (generate with `openssl rand -base64 32`):
```yaml
secrets:
cookieSecret: "YOUR_GENERATED_SECRET_HERE"
```
4. **PostgreSQL Configuration** (choose one):
- **Option A**: External PostgreSQL (recommended for production)
```yaml
postgresql:
enabled: false
externalPostgresql:
host: "postgres.example.com"
port: 5432
user: "openpanel"
password: "your-secure-password"
database: "openpanel"
schema: public
```
- **Option B**: Self-hosted PostgreSQL
```yaml
postgresql:
enabled: true
user: postgres
password: "your-secure-password"
database: postgres
persistence:
size: 20Gi
```
</Step>
<Step>
### Install OpenPanel
Install OpenPanel with your configured values:
```bash
helm install my-openpanel openpanel/openpanel \
--version 0.1.0 \
--namespace openpanel \
--create-namespace \
-f my-values.yaml
```
Or override specific values directly:
```bash
helm install my-openpanel openpanel/openpanel \
--version 0.1.0 \
--namespace openpanel \
--create-namespace \
--set ingress.fqdn=your-domain.com \
--set config.apiUrl=https://your-domain.com/api \
--set secrets.cookieSecret=$(openssl rand -base64 32)
```
</Step>
<Step>
### Verify Installation
Check that all pods are running:
```bash
kubectl get pods -n openpanel
```
You should see pods for:
- API server (`op-api`)
- Dashboard (`op-dashboard`)
- Worker (`op-worker`)
- PostgreSQL (if using self-hosted)
- Redis (if using self-hosted)
- ClickHouse (if using self-hosted)
Check the status:
```bash
kubectl get all -n openpanel
```
</Step>
<Step>
### Access Your Dashboard
Once all pods are running, access OpenPanel at your configured domain. The ingress will route traffic to the dashboard service.
If you need to test locally, you can port-forward:
```bash
kubectl port-forward svc/op-dashboard 3000:80 -n openpanel
```
Then access OpenPanel at `http://localhost:3000`.
</Step>
</Steps>
## Configuration
### Required Configuration
The following values **MUST** be configured before installation:
| Configuration | Required | Placeholder | Description |
|--------------|----------|-------------|-------------|
| `ingress.fqdn` | ✅ Yes | `<fqdn>` | Your domain name |
| `ingress.*.tlsSecretName` | ✅ Yes | `<tls_secret_name>` | TLS certificate secret name |
| `config.apiUrl` | ✅ Yes | `<fqdn>` | Full API URL |
| `config.dashboardUrl` | ✅ Yes | `<fqdn>` | Full Dashboard URL |
| `config.googleRedirectUri` | ✅ Yes | `<fqdn>` | OAuth callback URL |
| `secrets.cookieSecret` | ✅ Yes | `CHANGE_ME_...` | Session encryption key |
| `externalPostgresql.*` | ⚠️ If external | `<postgres_*>` | PostgreSQL connection details |
### Complete Example Configuration
Here's a minimal example configuration file (`my-values.yaml`) with all required values:
```yaml title="my-values.yaml"
# Ingress Configuration
ingress:
enabled: true
type: standard # or "httpproxy" for Contour
fqdn: analytics.example.com
standard:
tlsSecretName: openpanel-tls
# Application URLs
config:
apiUrl: "https://analytics.example.com/api"
dashboardUrl: "https://analytics.example.com"
googleRedirectUri: "https://analytics.example.com/api/oauth/google/callback"
# Cookie Secret (generate with: openssl rand -base64 32)
secrets:
cookieSecret: "YOUR_GENERATED_SECRET_HERE"
# PostgreSQL - Using External Database
postgresql:
enabled: false
externalPostgresql:
host: "postgres.example.com"
port: 5432
user: "openpanel"
password: "your-secure-password"
database: "openpanel"
schema: public
```
### Optional Configuration
The Helm chart maps environment variables to Helm values. For a complete reference of all available environment variables and their descriptions, see the [Environment Variables documentation](/docs/self-hosting/environment-variables).
#### Email Configuration
Enable email functionality (password resets, invitations, etc.):
```yaml
secrets:
resendApiKey: "re_xxxxxxxxxxxxx" # Your Resend API key
emailSender: "noreply@your-domain.com" # Verified sender email
```
<Callout>
Get your Resend API key from [resend.com](https://resend.com). Make sure to verify your sender email domain.
</Callout>
#### AI Features
Enable AI-powered features:
```yaml
config:
aiModel: "gpt-4o-mini" # Options: gpt-4o, gpt-4o-mini, claude-3-5
secrets:
openaiApiKey: "sk-xxxxxxxxxxxxx" # For OpenAI models
anthropicApiKey: "" # For Claude models (leave empty if not using)
geminiApiKey: "" # For Gemini models (leave empty if not using)
```
<Callout>
You only need to configure the API key for the model you choose. Leave other API keys as empty strings (`""`) if not using them.
</Callout>
#### Google OAuth
Enable Google OAuth login:
```yaml
secrets:
googleClientId: "xxxxx.apps.googleusercontent.com"
googleClientSecret: "GOCSPX-xxxxxxxxxxxxx"
```
<Callout>
Set up Google OAuth in [Google Cloud Console](https://console.cloud.google.com). Add authorized redirect URI: `https://your-domain.com/api/oauth/google/callback`
</Callout>
#### Redis Configuration
Redis is enabled by default and deployed within Kubernetes. To use an external Redis instance:
```yaml
redis:
enabled: false
externalRedis:
host: "redis.example.com"
port: 6379
```
#### ClickHouse Configuration
ClickHouse is enabled by default and deployed within Kubernetes. To use an external ClickHouse instance:
```yaml
clickhouse:
enabled: false
externalClickhouse:
host: "clickhouse.example.com"
port: 8123
database: openpanel
```
#### Application Components
Enable/disable individual components:
```yaml
api:
enabled: true
replicas: 1
dashboard:
enabled: true
replicas: 1
worker:
enabled: true
replicas: 1
```
#### Resource Limits
Adjust resource requests and limits:
```yaml
api:
resources:
requests:
memory: "512Mi"
cpu: "250m"
limits:
memory: "2Gi"
cpu: "2000m"
```
## Updating OpenPanel
To upgrade to a newer version:
```bash
helm repo update
helm upgrade my-openpanel openpanel/openpanel \
--version <new-version> \
--namespace openpanel \
-f my-values.yaml
```
Replace `<new-version>` with the desired version number (e.g., `0.1.1`).
## Managing Your Deployment
### View Logs
View logs from specific deployments:
```bash
# API logs
kubectl logs -f deployment/op-api -n openpanel
# Dashboard logs
kubectl logs -f deployment/op-dashboard -n openpanel
# Worker logs
kubectl logs -f deployment/op-worker -n openpanel
```
### Restart Services
Restart a specific deployment:
```bash
kubectl rollout restart deployment/op-api -n openpanel
kubectl rollout restart deployment/op-dashboard -n openpanel
kubectl rollout restart deployment/op-worker -n openpanel
```
### Scale Services
Scale services on the fly:
```bash
kubectl scale deployment/op-worker --replicas=3 -n openpanel
```
Or update your values file and upgrade:
```yaml
worker:
replicas: 3
```
```bash
helm upgrade my-openpanel openpanel/openpanel -f my-values.yaml -n openpanel
```
### Check Services
View all services:
```bash
kubectl get svc -n openpanel
```
### Check ConfigMap and Secrets
Verify configuration:
```bash
kubectl get configmap openpanel-config -n openpanel -o yaml
kubectl get secret openpanel-secrets -n openpanel -o yaml
```
## Ingress Configuration
### Standard Ingress (NGINX/Traefik)
```yaml
ingress:
enabled: true
type: standard
fqdn: openpanel.your-domain.com
standard:
tlsSecretName: openpanel-tls
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
```
### HTTPProxy (Contour)
```yaml
ingress:
enabled: true
type: httpproxy
fqdn: openpanel.your-domain.com
httpproxy:
tlsSecretName: openpanel-tls
```
## Troubleshooting
### Pods Not Starting
1. Check pod status:
```bash
kubectl describe pod <pod-name> -n openpanel
```
2. Check events:
```bash
kubectl get events --sort-by='.lastTimestamp' -n openpanel
```
3. Check logs:
```bash
kubectl logs <pod-name> -n openpanel
```
### Database Connection Issues
1. Verify database pods are running (if using self-hosted):
```bash
kubectl get pods -n openpanel | grep postgres
```
2. Check database service:
```bash
kubectl get svc -n openpanel | grep postgres
```
3. Test database connection:
```bash
kubectl exec -it deployment/op-api -n openpanel -- env | grep DATABASE_URL
```
### Configuration Issues
If pods are failing due to configuration:
1. Verify all required values are set:
```bash
helm get values my-openpanel -n openpanel
```
2. Check for placeholder values:
```bash
helm get values my-openpanel -n openpanel | grep "<"
```
3. Ensure secrets are properly set:
```bash
kubectl get secret openpanel-secrets -n openpanel -o yaml
```
### Ingress Not Working
1. Check ingress status:
```bash
kubectl get ingress -n openpanel
kubectl describe ingress -n openpanel
```
2. Verify ingress controller is running:
```bash
kubectl get pods -n ingress-nginx # For NGINX
# or
kubectl get pods -n projectcontour # For Contour
```
3. Check DNS configuration
## Backup and Restore
### Backup PostgreSQL
If using self-hosted PostgreSQL:
```bash
kubectl exec -it <postgresql-pod-name> -n openpanel -- \
pg_dump -U postgres openpanel > backup.sql
```
Or use a Kubernetes CronJob for automated backups.
### Restore PostgreSQL
Restore from backup:
```bash
kubectl exec -i <postgresql-pod-name> -n openpanel -- \
psql -U postgres openpanel < backup.sql
```
## Uninstalling
To uninstall OpenPanel:
```bash
helm uninstall my-openpanel --namespace openpanel
```
<Callout type="warn">
⚠️ **Warning**: This will delete all resources including persistent volumes. Make sure to backup your data before uninstalling!
</Callout>
To keep persistent volumes:
```bash
# Delete the release but keep PVCs
helm uninstall my-openpanel --namespace openpanel
# Manually delete PVCs if needed
kubectl delete pvc -l app.kubernetes.io/name=openpanel -n openpanel
```
## Next Steps
- [Configure email settings](/docs/self-hosting/self-hosting#e-mail) for password resets and invitations
- [Set up AI integration](/docs/self-hosting/self-hosting#ai-integration) for the analytics assistant
- [Configure SDK](/docs/self-hosting/self-hosting#always-use-correct-api-url) to track events from your applications
## Additional Resources
- [Helm Chart on Artifact Hub](https://artifacthub.io/packages/helm/openpanel/openpanel)
- [Kubernetes Documentation](https://kubernetes.io/docs/)
- [Helm Documentation](https://helm.sh/docs/)

View File

@@ -0,0 +1,804 @@
---
title: Environment Variables
description: Complete reference for all OpenPanel environment variables
---
import { Callout } from 'fumadocs-ui/components/callout';
This page documents all environment variables used by OpenPanel. Variables are organized by category. Most variables are optional and have sensible defaults.
<Callout>
For deployment-specific configuration, see the [deployment guides](/docs/self-hosting/deploy-docker-compose).
</Callout>
## Database & Storage
### DATABASE_URL
**Type**: `string`
**Required**: Yes
**Default**: None
PostgreSQL connection string for the main database.
**Example**:
```bash
DATABASE_URL=postgres://user:password@localhost:5432/openpanel?schema=public
```
### DATABASE_URL_DIRECT
**Type**: `string`
**Required**: No
**Default**: Same as `DATABASE_URL`
Direct PostgreSQL connection string (bypasses connection pooling). Used for migrations and administrative operations.
**Example**:
```bash
DATABASE_URL_DIRECT=postgres://user:password@localhost:5432/openpanel?schema=public
```
### DATABASE_URL_REPLICA
**Type**: `string`
**Required**: No
**Default**: Same as `DATABASE_URL`
Read replica connection string for read-heavy operations. If not set, uses the main database.
**Example**:
```bash
DATABASE_URL_REPLICA=postgres://user:password@replica-host:5432/openpanel?schema=public
```
### REDIS_URL
**Type**: `string`
**Required**: Yes
**Default**: `redis://localhost:6379`
Redis connection string for caching and queue management.
**Example**:
```bash
REDIS_URL=redis://localhost:6379
# With password
REDIS_URL=redis://:password@localhost:6379
```
### CLICKHOUSE_URL
**Type**: `string`
**Required**: Yes
**Default**: `http://localhost:8123/openpanel`
ClickHouse HTTP connection URL for analytics data storage.
**Example**:
```bash
CLICKHOUSE_URL=http://localhost:8123/openpanel
```
### CLICKHOUSE_CLUSTER
**Type**: `boolean`
**Required**: No
**Default**: `false`
Enable ClickHouse cluster mode. Set to `true` or `1` if using a ClickHouse cluster.
**Example**:
```bash
CLICKHOUSE_CLUSTER=true
```
### CLICKHOUSE_SETTINGS
**Type**: `string` (JSON)
**Required**: No
**Default**: `{}`
Additional ClickHouse settings as a JSON object.
**Example**:
```bash
CLICKHOUSE_SETTINGS='{"max_execution_time": 300}'
```
### CLICKHOUSE_SETTINGS_REMOVE_CONVERT_ANY_JOIN
**Type**: `boolean`
**Required**: No
**Default**: `false`
Remove `convert_any_join` from ClickHouse settings. Used for compatibility with certain ClickHouse versions. This needs to be set if you use any clickhouse version below 25!
## Application URLs
### NEXT_PUBLIC_API_URL
**Type**: `string`
**Required**: Yes
**Default**: None
Public API URL exposed to the browser. Used by the dashboard frontend and API service.
**Example**:
```bash
NEXT_PUBLIC_API_URL=https://analytics.example.com/api
```
### NEXT_PUBLIC_DASHBOARD_URL
**Type**: `string`
**Required**: Yes
**Default**: None
Public dashboard URL exposed to the browser. Used by the dashboard frontend and API service.
**Example**:
```bash
NEXT_PUBLIC_DASHBOARD_URL=https://analytics.example.com
```
### API_CORS_ORIGINS
**Type**: `string` (comma-separated)
**Required**: No
**Default**: None
Additional CORS origins allowed for API requests. Comma-separated list of origins.
**Example**:
```bash
API_CORS_ORIGINS=https://app.example.com,https://another-app.com
```
## Authentication & Security
### COOKIE_SECRET
**Type**: `string`
**Required**: Yes
**Default**: None
Secret key for encrypting session cookies. Generate a secure random string (32+ characters).
**Example**:
```bash
# Generate with: openssl rand -base64 32
COOKIE_SECRET=your-random-secret-here
```
<Callout type="warn">
Never use the default value in production! Always generate a unique secret.
</Callout>
### DEMO_USER_ID
**Type**: `string`
**Required**: No
**Default**: None
User ID for demo mode. When set, creates a demo session for testing.
**Example**:
```bash
DEMO_USER_ID=user_1234567890
```
### ALLOW_REGISTRATION
**Type**: `boolean`
**Required**: No
**Default**: `false` (after first user is created)
Allow new user registrations. Set to `true` to enable public registration.
**Example**:
```bash
ALLOW_REGISTRATION=true
```
<Callout>
Registration is automatically disabled after the first user is created. Set this to `true` to re-enable it.
</Callout>
### ALLOW_INVITATION
**Type**: `boolean`
**Required**: No
**Default**: `true`
Allow user invitations. Set to `false` to disable invitation functionality.
**Example**:
```bash
ALLOW_INVITATION=false
```
## AI Features
### AI_MODEL
**Type**: `string`
**Required**: No
**Default**: `gpt-4.1-mini`
AI model to use for the analytics assistant. Options: `gpt-4o`, `gpt-4o-mini`, `claude-3-5`.
**Example**:
```bash
AI_MODEL=gpt-4o-mini
```
### OPENAI_API_KEY
**Type**: `string`
**Required**: No (required if using OpenAI models)
**Default**: None
OpenAI API key for AI features. Required if `AI_MODEL` is set to `gpt-4o` or `gpt-4o-mini`.
**Example**:
```bash
OPENAI_API_KEY=sk-your-openai-api-key-here
```
### ANTHROPIC_API_KEY
**Type**: `string`
**Required**: No (required if using Claude models)
**Default**: None
Anthropic API key for Claude AI models. Required if `AI_MODEL` is set to `claude-3-5`.
**Example**:
```bash
ANTHROPIC_API_KEY=your-anthropic-api-key-here
```
### GEMINI_API_KEY
**Type**: `string`
**Required**: No
**Default**: None
Google Gemini API key for Gemini AI models. Currently not used but reserved for future support.
**Example**:
```bash
GEMINI_API_KEY=your-gemini-api-key-here
```
<Callout type="info">
The AI assistant is optional. Without an API key configured, the AI chat feature will not be available, but all other OpenPanel features will continue to work normally.
</Callout>
## Email
### RESEND_API_KEY
**Type**: `string`
**Required**: No
**Default**: None
Resend API key for sending transactional emails (password resets, invitations, etc.).
**Example**:
```bash
RESEND_API_KEY=re_xxxxxxxxxxxxx
```
<Callout>
Get your API key from [resend.com](https://resend.com). Make sure to verify your sender email domain.
</Callout>
### EMAIL_SENDER
**Type**: `string`
**Required**: No
**Default**: `hello@openpanel.dev`
Email address used as the sender for transactional emails.
**Example**:
```bash
EMAIL_SENDER=noreply@yourdomain.com
```
<Callout>
The sender email must be verified in your Resend account.
</Callout>
## OAuth & Integrations
### SLACK_CLIENT_ID
**Type**: `string`
**Required**: No
**Default**: None
Slack OAuth client ID for Slack integration.
**Example**:
```bash
SLACK_CLIENT_ID=1234567890.1234567890
```
### SLACK_CLIENT_SECRET
**Type**: `string`
**Required**: No
**Default**: None
Slack OAuth client secret for Slack integration.
**Example**:
```bash
SLACK_CLIENT_SECRET=your-slack-client-secret
```
### SLACK_OAUTH_REDIRECT_URL
**Type**: `string`
**Required**: No
**Default**: None
Slack OAuth redirect URL. Must match the redirect URI configured in your Slack app.
**Example**:
```bash
SLACK_OAUTH_REDIRECT_URL=https://analytics.example.com/api/integrations/slack/callback
```
### SLACK_STATE_SECRET
**Type**: `string`
**Required**: No
**Default**: None
Secret for signing Slack OAuth state parameter.
**Example**:
```bash
SLACK_STATE_SECRET=your-state-secret
```
## Self-hosting
### NEXT_PUBLIC_SELF_HOSTED
**Type**: `boolean`
**Required**: No
**Default**: `false`
Enable self-hosted mode. Set to `true` or `1` to enable self-hosting features. Used by both the dashboard frontend and API service.
**Example**:
```bash
NEXT_PUBLIC_SELF_HOSTED=true
```
## Worker & Queue
### WORKER_PORT
**Type**: `number`
**Required**: No
**Default**: `3000`
Port for the worker service to listen on.
**Example**:
```bash
WORKER_PORT=3000
```
### DISABLE_BULLBOARD
**Type**: `boolean`
**Required**: No
**Default**: `false`
Disable BullMQ board UI. Set to `true` or `1` to disable the queue monitoring dashboard.
**Example**:
```bash
DISABLE_BULLBOARD=true
```
### DISABLE_WORKERS
**Type**: `boolean`
**Required**: No
**Default**: `false`
Disable all worker processes. Set to `true` or `1` to disable background job processing.
**Example**:
```bash
DISABLE_WORKERS=true
```
### ENABLED_QUEUES
**Type**: `string` (comma-separated)
**Required**: No
**Default**: All queues enabled
Comma-separated list of queue names to enable. Available queues: `events`, `sessions`, `cron`, `notification`, `misc`, `import`.
**Example**:
```bash
ENABLED_QUEUES=events,sessions,cron
```
### EVENT_JOB_CONCURRENCY
**Type**: `number`
**Required**: No
**Default**: `10`
Number of concurrent event processing jobs per worker.
**Example**:
```bash
EVENT_JOB_CONCURRENCY=20
```
### EVENT_BLOCKING_TIMEOUT_SEC
**Type**: `number`
**Required**: No
**Default**: `1`
Blocking timeout in seconds for event queue workers.
**Example**:
```bash
EVENT_BLOCKING_TIMEOUT_SEC=2
```
### EVENTS_GROUP_QUEUES_SHARDS
**Type**: `number`
**Required**: No
**Default**: `1`
Number of shards for the events group queue. Increase for better performance with high event volume.
**Example**:
```bash
EVENTS_GROUP_QUEUES_SHARDS=4
```
### QUEUE_CLUSTER
**Type**: `boolean`
**Required**: No
**Default**: `false`
Enable Redis cluster mode for queues. When enabled, queue names are wrapped with `{}` for Redis cluster sharding.
**Example**:
```bash
QUEUE_CLUSTER=true
```
### ORDERING_DELAY_MS
**Type**: `number`
**Required**: No
**Default**: `100`
Delay in milliseconds to hold events for correct ordering when events arrive out of order.
**Example**:
```bash
ORDERING_DELAY_MS=200
```
<Callout type="warn">
Should not exceed 500ms. Higher values may cause delays in event processing.
</Callout>
### AUTO_BATCH_MAX_WAIT_MS
**Type**: `number`
**Required**: No
**Default**: `0` (disabled)
Maximum wait time in milliseconds for auto-batching events. Experimental feature.
**Example**:
```bash
AUTO_BATCH_MAX_WAIT_MS=100
```
<Callout type="warn">
⚠️ **Experimental**: This feature is experimental and not used in production. Do not use unless you have a good understanding of the implications and specific performance requirements.
</Callout>
### AUTO_BATCH_SIZE
**Type**: `number`
**Required**: No
**Default**: `0` (disabled)
Batch size for auto-batching events. Experimental feature.
**Example**:
```bash
AUTO_BATCH_SIZE=100
```
<Callout type="warn">
⚠️ **Experimental**: This feature is experimental and not used in production. Do not use unless you have a good understanding of the implications and specific performance requirements.
</Callout>
## Buffers
### SESSION_BUFFER_BATCH_SIZE
**Type**: `number`
**Required**: No
**Default**: Buffer-specific default
Batch size for session buffer operations.
**Example**:
```bash
SESSION_BUFFER_BATCH_SIZE=5000
```
### SESSION_BUFFER_CHUNK_SIZE
**Type**: `number`
**Required**: No
**Default**: Buffer-specific default
Chunk size for session buffer operations.
**Example**:
```bash
SESSION_BUFFER_CHUNK_SIZE=1000
```
### EVENT_BUFFER_BATCH_SIZE
**Type**: `number`
**Required**: No
**Default**: `4000`
Batch size for event buffer operations.
**Example**:
```bash
EVENT_BUFFER_BATCH_SIZE=5000
```
### EVENT_BUFFER_CHUNK_SIZE
**Type**: `number`
**Required**: No
**Default**: `1000`
Chunk size for event buffer operations.
**Example**:
```bash
EVENT_BUFFER_CHUNK_SIZE=2000
```
### PROFILE_BUFFER_BATCH_SIZE
**Type**: `number`
**Required**: No
**Default**: Buffer-specific default
Batch size for profile buffer operations.
**Example**:
```bash
PROFILE_BUFFER_BATCH_SIZE=5000
```
### PROFILE_BUFFER_CHUNK_SIZE
**Type**: `number`
**Required**: No
**Default**: Buffer-specific default
Chunk size for profile buffer operations.
**Example**:
```bash
PROFILE_BUFFER_CHUNK_SIZE=1000
```
### PROFILE_BUFFER_TTL_IN_SECONDS
**Type**: `number`
**Required**: No
**Default**: Buffer-specific default
Time-to-live in seconds for profile buffer entries.
**Example**:
```bash
PROFILE_BUFFER_TTL_IN_SECONDS=3600
```
### BOT_BUFFER_BATCH_SIZE
**Type**: `number`
**Required**: No
**Default**: Buffer-specific default
Batch size for bot detection buffer operations.
**Example**:
```bash
BOT_BUFFER_BATCH_SIZE=1000
```
## Performance & Tuning
### IMPORT_BATCH_SIZE
**Type**: `number`
**Required**: No
**Default**: `5000`
Batch size for data import operations.
**Example**:
```bash
IMPORT_BATCH_SIZE=10000
```
### IP_HEADER_ORDER
**Type**: `string` (comma-separated)
**Required**: No
**Default**: See [default order](https://github.com/Openpanel-dev/openpanel/blob/main/packages/common/server/get-client-ip.ts)
Custom order of HTTP headers to check for client IP address. Useful when behind specific proxies or CDNs.
**Example**:
```bash
IP_HEADER_ORDER=cf-connecting-ip,x-real-ip,x-forwarded-for
```
<Callout>
The default order includes: `openpanel-client-ip`, `cf-connecting-ip`, `true-client-ip`, `x-client-ip`, `x-forwarded-for`, `x-real-ip`, and others. See the [source code](https://github.com/Openpanel-dev/openpanel/blob/main/packages/common/server/get-client-ip.ts) for the complete default list.
</Callout>
### SHUTDOWN_GRACE_PERIOD_MS
**Type**: `number`
**Required**: No
**Default**: `5000`
Grace period in milliseconds for graceful shutdown of services.
**Example**:
```bash
SHUTDOWN_GRACE_PERIOD_MS=10000
```
### API_PORT
**Type**: `number`
**Required**: No
**Default**: `3000`
Port for the API service to listen on.
**Example**:
```bash
API_PORT=3000
```
## Logging
### LOG_LEVEL
**Type**: `string`
**Required**: No
**Default**: `info`
Logging level. Options: `error`, `warn`, `info`, `debug`.
**Example**:
```bash
LOG_LEVEL=debug
```
### LOG_SILENT
**Type**: `boolean`
**Required**: No
**Default**: `false`
Disable all logging output. Set to `true` to silence logs.
**Example**:
```bash
LOG_SILENT=true
```
### LOG_PREFIX
**Type**: `string`
**Required**: No
**Default**: None
Prefix for log messages. Useful for identifying logs from different services.
**Example**:
```bash
LOG_PREFIX=api
```
### HYPERDX_API_KEY
**Type**: `string`
**Required**: No
**Default**: None
HyperDX API key for sending logs to HyperDX for monitoring and analysis.
**Example**:
```bash
HYPERDX_API_KEY=your-hyperdx-api-key
```
## Geo
### MAXMIND_LICENSE_KEY
**Type**: `string`
**Required**: No
**Default**: None
MaxMind GeoLite2 license key for downloading GeoIP databases.
**Example**:
```bash
MAXMIND_LICENSE_KEY=your-maxmind-license-key
```
<Callout>
Get your license key from [MaxMind](https://www.maxmind.com/en/accounts/current/license-key). Required for downloading GeoIP databases.
</Callout>
## Quick Reference
### Required Variables
For a basic self-hosted installation, these variables are required:
- `DATABASE_URL` - PostgreSQL connection
- `REDIS_URL` - Redis connection
- `CLICKHOUSE_URL` - ClickHouse connection
- `NEXT_PUBLIC_API_URL` - API endpoint URL
- `NEXT_PUBLIC_DASHBOARD_URL` - Dashboard URL
- `COOKIE_SECRET` - Session encryption secret
### Optional but Recommended
- `RESEND_API_KEY` - For email features
- `EMAIL_SENDER` - Email sender address
- `OPENAI_API_KEY` or `ANTHROPIC_API_KEY` - For AI features
- `AI_MODEL` - AI model selection
### See Also
- [Deploy with Docker Compose](/docs/self-hosting/deploy-docker-compose)
- [Deploy with Coolify](/docs/self-hosting/deploy-coolify)
- [Deploy with Dokploy](/docs/self-hosting/deploy-dokploy)
- [Deploy on Kubernetes](/docs/self-hosting/deploy-kubernetes)

View File

@@ -3,7 +3,12 @@
"defaultOpen": true,
"pages": [
"[Get started](/docs/self-hosting/self-hosting)",
"[Deploy with Docker Compose](/docs/self-hosting/deploy-docker-compose)",
"[Deploy with Coolify](/docs/self-hosting/deploy-coolify)",
"[Deploy with Dokploy](/docs/self-hosting/deploy-dokploy)",
"[Deploy on Kubernetes](/docs/self-hosting/deploy-kubernetes)",
"[Environment Variables](/docs/self-hosting/environment-variables)",
"supporter-access-latest-docker-images",
"changelog"
]
}
}

View File

@@ -102,7 +102,7 @@ const op = new OpenPanel({
### E-mail
Some of OpenPanel's features require e-mail. We use Resend as our transactional e-mail provider. So to get this working you'll need to create an account on Resend and set the `RESEND_API_KEY` environment variable.
Some of OpenPanel's features require e-mail. We use Resend as our transactional e-mail provider. To enable email features, create an account on Resend and set the `RESEND_API_KEY` environment variable.
<Callout>This is nothing that is required for the basic setup, but it is required for some features.</Callout>
@@ -112,6 +112,8 @@ Features that require e-mail:
- Invitations
- more will be added over time
For email configuration details, see the [Environment Variables documentation](/docs/self-hosting/environment-variables#email).
### AI integration
OpenPanel includes an AI-powered analytics assistant that can help you analyze data, create reports, and answer questions about your analytics. To enable this feature, you need to configure an API key for either OpenAI or Anthropic.
@@ -155,7 +157,7 @@ The AI assistant is optional. Without an API key configured, the AI chat feature
AI features will incur costs based on your usage and the model you choose. Monitor your API usage through your provider's dashboard to avoid unexpected charges.
</Callout>
For complete AI configuration details, see the [Environment Variables documentation](/docs/self-hosting/environment-variables#ai-features).
### Managed Redis
@@ -181,6 +183,8 @@ Invitations are enabled by default. You can also disable invitations by setting
ALLOW_INVITATION=false
```
For a complete reference of all environment variables, see the [Environment Variables documentation](/docs/self-hosting/environment-variables).
## Helpful scripts
OpenPanel comes with several utility scripts to help manage your self-hosted instance:

View File

@@ -1,5 +1,5 @@
---
title: Supporter Access - Latest Docker Images
title: Latest Docker Images
description: Get access to OpenPanel's latest private Docker images with bleeding-edge features built on every commit.
---