OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
docs: say which self-hosting version each page describes
Carl-Gerhard Lindesvärdfb616196cc65
diff --git a/apps/public/content/docs/self-hosting/deploy-coolify.mdx b/apps/public/content/docs/self-hosting/deploy-coolify.mdxindex 8b94420c7..0c343bfc9 100644--- a/apps/public/content/docs/self-hosting/deploy-coolify.mdx+++ b/apps/public/content/docs/self-hosting/deploy-coolify.mdx@@ -5,6 +5,9 @@ description: Deploy OpenPanel using Coolify's one-click serviceimport { Step, Steps } from 'fumadocs-ui/components/steps';import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />[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.diff --git a/apps/public/content/docs/self-hosting/deploy-docker-compose.mdx b/apps/public/content/docs/self-hosting/deploy-docker-compose.mdxindex 6ec9a8a08..76863f85e 100644--- a/apps/public/content/docs/self-hosting/deploy-docker-compose.mdx+++ b/apps/public/content/docs/self-hosting/deploy-docker-compose.mdx@@ -5,6 +5,9 @@ description: Deploy OpenPanel using Docker Compose on your own serverimport { Step, Steps } from 'fumadocs-ui/components/steps';import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />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.diff --git a/apps/public/content/docs/self-hosting/deploy-dokploy.mdx b/apps/public/content/docs/self-hosting/deploy-dokploy.mdxindex a17e9e15e..c892ec99c 100644--- a/apps/public/content/docs/self-hosting/deploy-dokploy.mdx+++ b/apps/public/content/docs/self-hosting/deploy-dokploy.mdx@@ -5,6 +5,9 @@ description: Deploy OpenPanel using Dokploy's Docker Compose templateimport { Step, Steps } from 'fumadocs-ui/components/steps';import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />[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.diff --git a/apps/public/content/docs/self-hosting/deploy-kubernetes.mdx b/apps/public/content/docs/self-hosting/deploy-kubernetes.mdxindex 9eda522b5..a998a0170 100644--- a/apps/public/content/docs/self-hosting/deploy-kubernetes.mdx+++ b/apps/public/content/docs/self-hosting/deploy-kubernetes.mdx@@ -5,6 +5,9 @@ description: Deploy OpenPanel on Kubernetes using Helmimport { Step, Steps } from 'fumadocs-ui/components/steps';import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />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.diff --git a/apps/public/content/docs/self-hosting/environment-variables.mdx b/apps/public/content/docs/self-hosting/environment-variables.mdxindex b8a98cbed..c9174b503 100644--- a/apps/public/content/docs/self-hosting/environment-variables.mdx+++ b/apps/public/content/docs/self-hosting/environment-variables.mdx@@ -4,6 +4,9 @@ description: Complete reference for all OpenPanel environment variables---import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />This page documents all environment variables used by OpenPanel. Variables are organized by category. Most variables are optional and have sensible defaults.diff --git a/apps/public/content/docs/self-hosting/google-search-console.mdx b/apps/public/content/docs/self-hosting/google-search-console.mdxindex f53ab5849..f83380a15 100644--- a/apps/public/content/docs/self-hosting/google-search-console.mdx+++ b/apps/public/content/docs/self-hosting/google-search-console.mdx@@ -5,6 +5,9 @@ description: Enable the Google Search Console integration on your self-hosted Opimport { Step, Steps } from 'fumadocs-ui/components/steps';import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />The Google Search Console (GSC) integration imports search performance data into OpenPanel: clicks, impressions, CTR and average position per page and per query. Once enabled it powers the SEO page in each project (`/<organization>/<project>/seo`), Search Console insights on page reports, and the `gsc_*` tools in the [MCP server](/docs/mcp#google-search-console) and the AI assistant.diff --git a/apps/public/content/docs/self-hosting/high-volume.mdx b/apps/public/content/docs/self-hosting/high-volume.mdxindex fdce9ca16..e162cf31d 100644--- a/apps/public/content/docs/self-hosting/high-volume.mdx+++ b/apps/public/content/docs/self-hosting/high-volume.mdx@@ -4,6 +4,9 @@ description: Tuning OpenPanel for high event throughput---import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />The default Docker Compose setup works well for most deployments. When you start seeing high event throughput — thousands of events per second or dozens of worker replicas — a few things need adjusting.diff --git a/apps/public/content/docs/self-hosting/meta.json b/apps/public/content/docs/self-hosting/meta.jsonindex 8bddb6f03..9c6f5ff57 100644--- a/apps/public/content/docs/self-hosting/meta.json+++ b/apps/public/content/docs/self-hosting/meta.json@@ -3,6 +3,7 @@"defaultOpen": true,"pages": ["[Get started](/docs/self-hosting/self-hosting)",+ "v2","[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)",diff --git a/apps/public/content/docs/self-hosting/migrating-from-clerk.mdx b/apps/public/content/docs/self-hosting/migrating-from-clerk.mdxindex 113f1a955..03c8da9a7 100644--- a/apps/public/content/docs/self-hosting/migrating-from-clerk.mdx+++ b/apps/public/content/docs/self-hosting/migrating-from-clerk.mdx@@ -4,6 +4,9 @@ description: This is a simple guide how to migrate from Clerk to OpenPanel.---import { Step, Steps } from 'fumadocs-ui/components/steps';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />As of version 0.0.5, we have removed Clerk.com from OpenPanel. This means that if you are upgrading from a previous version, you will need to export your users from Clerk and import them into OpenPanel. Here is how you can do it.diff --git a/apps/public/content/docs/self-hosting/reverse-proxy.mdx b/apps/public/content/docs/self-hosting/reverse-proxy.mdxindex 3c423a367..fcf92cc66 100644--- a/apps/public/content/docs/self-hosting/reverse-proxy.mdx+++ b/apps/public/content/docs/self-hosting/reverse-proxy.mdx@@ -3,6 +3,10 @@ title: Reverse proxy setupdescription: Run OpenPanel behind your own reverse proxy, or upstream of the bundled Caddy. Covers routing, WebSockets, and the gotchas that bite every time.---+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />+OpenPanel ships with a Caddy container that handles TLS and routing. It's two lines of config and Just Works. If you prefer NGINX, Traefik, HAProxy, or you're putting another TLS terminator in front of Caddy, this page covers how and — more importantly — what will break along the way.## When do you need this?diff --git a/apps/public/content/docs/self-hosting/self-hosting.mdx b/apps/public/content/docs/self-hosting/self-hosting.mdxindex 6f23492bd..1680034ae 100644--- a/apps/public/content/docs/self-hosting/self-hosting.mdx+++ b/apps/public/content/docs/self-hosting/self-hosting.mdx@@ -4,6 +4,9 @@ description: This is a simple guide how to get started with OpenPanel on your ow---import { Step, Steps } from 'fumadocs-ui/components/steps';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />## Instructionsdiff --git a/apps/public/content/docs/self-hosting/social-login.mdx b/apps/public/content/docs/self-hosting/social-login.mdxindex 2c4befebf..5d37ddb27 100644--- a/apps/public/content/docs/self-hosting/social-login.mdx+++ b/apps/public/content/docs/self-hosting/social-login.mdx@@ -5,6 +5,9 @@ description: Let users sign in to your self-hosted OpenPanel with their Google oimport { Step, Steps } from 'fumadocs-ui/components/steps';import { Callout } from 'fumadocs-ui/components/callout';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />OpenPanel supports signing in with Google and GitHub in addition to email and password. Both are optional. Email/password login always works, and the social login buttons only appear when the provider is configured.diff --git a/apps/public/content/docs/self-hosting/supporter-access-latest-docker-images.mdx b/apps/public/content/docs/self-hosting/supporter-access-latest-docker-images.mdxindex 6dbf5f7bd..a76ba1559 100644--- a/apps/public/content/docs/self-hosting/supporter-access-latest-docker-images.mdx+++ b/apps/public/content/docs/self-hosting/supporter-access-latest-docker-images.mdx@@ -3,6 +3,10 @@ title: Latest Docker Imagesdescription: Get access to OpenPanel's latest private Docker images with bleeding-edge features built on every commit.---+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner />+## Thank you for your support! 🙏First and foremost, **thank you** for supporting OpenPanel! Your contribution means the world to us and helps keep this project alive, maintained, and constantly improving. Every dollar you contribute goes directly into development, infrastructure, and making OpenPanel better for everyone.diff --git a/apps/public/content/docs/self-hosting/v2/deploy-docker-compose.mdx b/apps/public/content/docs/self-hosting/v2/deploy-docker-compose.mdxnew file mode 100644index 000000000..d9108b4d6--- /dev/null+++ b/apps/public/content/docs/self-hosting/v2/deploy-docker-compose.mdx@@ -0,0 +1,361 @@+---+title: Deploy with Docker Compose (2.x)+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';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner version="v2" />++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>++The generated `.env` also contains commented-out blocks for optional features. Uncomment and fill them in to enable [social login with Google or GitHub](/docs/self-hosting/social-login) and the [Google Search Console integration](/docs/self-hosting/google-search-console).++### 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:2.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 want to use NGINX, Traefik, or another reverse proxy instead of the bundled Caddy — or put a TLS terminator upstream of Caddy — see the dedicated [Reverse proxy setup](/docs/self-hosting/reverse-proxy) guide. It covers the working NGINX config, the `Connection: upgrade` SSR-break gotcha, and the WebSocket upgrade headers required for the Realtime view.++## Next Steps++- [Configure email settings](/docs/self-hosting/v2/get-started#e-mail) for password resets and invitations+- [Set up AI integration](/docs/self-hosting/v2/get-started#ai-integration) for the analytics assistant+- [Configure SDK](/docs/self-hosting/v2/get-started#always-use-correct-api-url) to track events from your applications+- [Enable social login](/docs/self-hosting/social-login) with Google or GitHub+- [Connect Google Search Console](/docs/self-hosting/google-search-console) for SEO data+diff --git a/apps/public/content/docs/self-hosting/v2/get-started.mdx b/apps/public/content/docs/self-hosting/v2/get-started.mdxnew file mode 100644index 000000000..87fa54df8--- /dev/null+++ b/apps/public/content/docs/self-hosting/v2/get-started.mdx@@ -0,0 +1,243 @@+---+title: Get started with self-hosting (2.x)+description: This is a simple guide how to get started with OpenPanel on your own VPS.+---++import { Step, Steps } from 'fumadocs-ui/components/steps';+import { SelfHostingVersionBanner } from '@/components/self-hosting-version-banner';++<SelfHostingVersionBanner version="v2" />++## Instructions++### Prerequisites++- VPS of any kind (only tested on Ubuntu 24.04)+ - We recommend using [Hetzner (affiliate link)](https://hetzner.cloud/?ref=7Hq0H5mQh7tM). Use the link if you want to support us. 🫶+ - 🙋♂️ This should work on any system if you have pre-installed docker, node and pnpm++### Quickstart++```bash+git clone -b self-hosting https://github.com/Openpanel-dev/openpanel && cd openpanel/self-hosting && ./setup+# After setup is complete run `./start` to start OpenPanel+```++<Steps>++<Step>+### Clone++Clone the repository to your VPS and checkout the self-hosting tag++```bash+git clone -b self-hosting https://github.com/Openpanel-dev/openpanel.git+```+</Step>+<Step>+### Run the setup script++The setup script will do 3 things++1. Install node (if you accept)+2. Install docker (if you accept)+3. Execute a node script that will ask some questions about your setup++> Setup takes 30s to 2 minutes depending on your VPS++```bash+cd openpanel/self-hosting+./setup+```++⚠️ If the `./setup` script fails to run, you can do it manually.++1. Install docker+2. Install node+3. Install npm+4. Run the `npm run quiz` script inside the self-hosting folder++</Step>+<Step>+### Start 🚀++Run the `./start` script located inside the self-hosting folder++```bash+./start+```+</Step>+</Steps>++## Good to know++### Always use correct api url++When self-hosting you'll need to provide your api url when initializing the SDK.++The path should be `/api` and the domain should be your domain.++```html title="index.html"+<script>+ window.op=window.op||function(){var n=[];return new Proxy(function(){arguments.length&&n.push([].slice.call(arguments))},{get:function(t,r){return"q"===r?n:function(){n.push([r].concat([].slice.call(arguments)))}} ,has:function(t,r){return"q"===r}}) }();+ window.op('init', {+ apiUrl: 'https://your-domain.com/api', // [!code highlight]+ clientId: 'YOUR_CLIENT_ID',+ trackScreenViews: true,+ trackOutgoingLinks: true,+ trackAttributes: true,+ });+</script>+<script src="https://openpanel.dev/op1.js" defer async></script>+```++```js title="op.ts"+import { OpenPanel } from '@openpanel/sdk';++const op = new OpenPanel({+ apiUrl: 'https://your-domain.com/api', // [!code highlight]+ clientId: 'YOUR_CLIENT_ID',+ trackScreenViews: true,+ trackOutgoingLinks: true,+ trackAttributes: true,+});+```+++Some of OpenPanel's features require e-mail. We use Resend as our transactional e-mail provider by default, but you can also use your own SMTP server. To enable email features, set the relevant environment variables described below.++<Callout>This is nothing that is required for the basic setup, but it is required for some features.</Callout>++Features that require e-mail:++- Password reset+- Invitations+- more will be added over time++#### Option A — Resend++Create an account on [resend.com](https://resend.com), verify your sender domain, and set the `RESEND_API_KEY` environment variable.++```bash title=".env"+RESEND_API_KEY=re_xxxxxxxxxxxxx+```++#### Option B — SMTP++If you prefer to use your own SMTP server, set `SMTP_HOST` and OpenPanel will use it instead of Resend.++```bash title=".env"+SMTP_HOST=smtp.example.com+SMTP_PORT=587+SMTP_SECURE=false+SMTP_PASS=your-smtp-password+```++<Callout type="info">+`SMTP_HOST` takes priority over `RESEND_API_KEY` if both are set. If neither is configured, emails are logged to the console instead of being sent.+</Callout>++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. It supports both OpenAI and Anthropic — set one or both keys and the model picker in the chat will only show models whose provider has a key configured.++#### Supported Models++- **OpenAI** — `GPT-4.1`, `GPT-4.1 mini`, `GPT-5.4 mini`+- **Anthropic** — `Claude Haiku 4.5`, `Claude Sonnet 4.6`, `Claude Opus 4.6`++#### Configuration++Add one or both of the following to your `.env` file in the `self-hosting` directory, then restart the API service:++```bash title=".env"+# OpenAI — get a key at platform.openai.com/api-keys+OPENAI_API_KEY=sk-your-openai-api-key-here++# Anthropic — get a key at console.anthropic.com+ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key-here+```++<Callout type="info">+The AI assistant is optional. Without either key set, the chat drawer still opens but shows a setup hint — every other OpenPanel feature continues to work normally.+</Callout>++<Callout type="warn">+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++If you use a managed Redis service, you may need to set the `notify-keyspace-events` manually.++Without this setting we won't be able to listen for expired keys which we use for calculating currently active visitors.++> You will see a warning in the logs if this needs to be set manually.++### Registration / Invitations++By default registrations are disabled after the first user is created.++You can change this by setting the `ALLOW_REGISTRATION` environment variable to `true`.++```bash title=".env"+ALLOW_REGISTRATION=true+```++Invitations are enabled by default. You can also disable invitations by setting the `ALLOW_INVITATION` environment variable to `false`.++```bash title=".env"+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:++### Basic Operations++```bash+./start # Start all OpenPanel services+./stop # Stop all OpenPanel services+./logs # View real-time logs from all services+```++### Maintenance++```bash+./rebuild <service-name> # Rebuild and restart a specific service+ # Example: ./rebuild op-dashboard+```++### Troubleshooting++```bash+./danger_wipe_everything # ⚠️ Removes all containers, volumes, and data+ # Only use this if you want to start fresh!+```++<Callout>+The `danger_wipe_everything` script will delete all your OpenPanel data including databases, configurations, and cached files. Use with extreme caution!+</Callout>++All these scripts should be run from within the `self-hosting` directory. Make sure the scripts are executable (`chmod +x script-name` if needed).++## Updating++To grab the latest and greatest from OpenPanel you should just run the `./update` script inside the self-hosting folder.++<Callout>+ If you don't have the `./update` script, you can run `git pull` and then `./update`+</Callout>++Also read any changes in the [changelog](/docs/self-hosting/changelog) and apply them to your instance.\ No newline at end of filediff --git a/apps/public/content/docs/self-hosting/v2/meta.json b/apps/public/content/docs/self-hosting/v2/meta.jsonnew file mode 100644index 000000000..ad835cf5b--- /dev/null+++ b/apps/public/content/docs/self-hosting/v2/meta.json@@ -0,0 +1,4 @@+{+ "title": "2.x (public release)",+ "pages": ["get-started", "deploy-docker-compose"]+}diff --git a/apps/public/src/components/self-hosting-version-banner.tsx b/apps/public/src/components/self-hosting-version-banner.tsxnew file mode 100644index 000000000..3db3b0813--- /dev/null+++ b/apps/public/src/components/self-hosting-version-banner.tsx@@ -0,0 +1,82 @@+import Link from 'next/link';++const V2_GET_STARTED = '/docs/self-hosting/v2/get-started';+const V3_GET_STARTED = '/docs/self-hosting/self-hosting';+const SUPPORTER_DOCS =+ '/docs/self-hosting/supporter-access-latest-docker-images';++interface BannerContent {+ eyebrow: string;+ title: string;+ body: React.ReactNode;+ action: { label: string; href: string };+ tone: string;+}++// OpenPanel 3 reaches supporters first while the public release is still 2.x,+// and the two install differently, so every self-hosting page says which one+// it describes, loudly enough that nobody follows the wrong one.+const CONTENT: Record<'latest' | 'v2', BannerContent> = {+ latest: {+ eyebrow: 'OpenPanel 3 · for supporters',+ title: 'These docs describe OpenPanel 3',+ body: (+ <>+ OpenPanel 3 and the new <code>openpanel</code> CLI are available to{' '}+ <Link className="underline" href={SUPPORTER_DOCS}>+ supporters+ </Link>{' '}+ ahead of the public release. Running the public release (2.x)? Its+ instructions are different.+ </>+ ),+ action: { label: 'Show the 2.x instructions →', href: V2_GET_STARTED },+ tone: 'border-amber-500/50 bg-amber-500/10',+ },+ v2: {+ eyebrow: 'OpenPanel 2.x · public release',+ title: 'You are reading the 2.x instructions',+ body: (+ <>+ These pages describe the current public release, which you install and+ update with the scripts in the <code>self-hosting</code> folder.+ OpenPanel 3 uses the new <code>openpanel</code> CLI instead.+ </>+ ),+ action: {+ label: 'Show the OpenPanel 3 instructions →',+ href: V3_GET_STARTED,+ },+ tone: 'border-sky-500/50 bg-sky-500/10',+ },+};++export function SelfHostingVersionBanner({+ version = 'latest',+}: {+ version?: 'latest' | 'v2';+}) {+ const content = CONTENT[version];+ return (+ <aside+ aria-label={content.title}+ className={`not-prose my-6 rounded-xl border-2 p-5 ${content.tone}`}+ >+ <p className="font-medium text-fd-muted-foreground text-xs uppercase tracking-wide">+ {content.eyebrow}+ </p>+ <p className="mt-1 font-semibold text-fd-foreground text-lg">+ {content.title}+ </p>+ <p className="mt-2 text-fd-foreground text-sm leading-relaxed">+ {content.body}+ </p>+ <Link+ className="mt-4 inline-flex items-center rounded-lg bg-fd-primary px-4 py-2 font-medium text-fd-primary-foreground text-sm hover:opacity-90"+ href={content.action.href}+ >+ {content.action.label}+ </Link>+ </aside>+ );+}