OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
docs: improve self-hosting docs
Carl-Gerhard Lindesvärd437111cfeced
diff --git a/apps/public/content/docs/self-hosting/changelog.mdx b/apps/public/content/docs/self-hosting/changelog.mdxindex d83aad2ff..857d23da1 100644--- a/apps/public/content/docs/self-hosting/changelog.mdx+++ b/apps/public/content/docs/self-hosting/changelog.mdx@@ -54,4 +54,4 @@ volumes:## 0.0.6-Removed Clerk.com and added self-hosted authentication.\ No newline at end of file+Removed Clerk.com and added self-hosted authentication. For more info read our [migrating from clerk](/docs/self-hosting/migrating-from-clerk)\ No newline at end of filediff --git a/apps/public/content/docs/self-hosting/meta.json b/apps/public/content/docs/self-hosting/meta.jsonindex 9c830d124..15c04f186 100644--- a/apps/public/content/docs/self-hosting/meta.json+++ b/apps/public/content/docs/self-hosting/meta.json@@ -3,7 +3,7 @@"defaultOpen": true,"pages": ["[Get started](/docs/self-hosting/self-hosting)",- "changelog",- "migrating-from-clerk"+ "supporter-access-latest-docker-images",+ "changelog"]}diff --git a/apps/public/content/docs/self-hosting/self-hosting.mdx b/apps/public/content/docs/self-hosting/self-hosting.mdxindex eee2a7858..578c0b5fc 100644--- a/apps/public/content/docs/self-hosting/self-hosting.mdx+++ b/apps/public/content/docs/self-hosting/self-hosting.mdx@@ -112,6 +112,51 @@ Features that require e-mail:- Invitations- more will be added over time+### 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.++#### Supported Models++- **OpenAI** (default)+ - `gpt-4o` - More powerful but higher cost+ - `gpt-4o-mini` - Default model, good balance of performance and cost+- **Anthropic**+ - `claude-3-5-haiku-latest` - Fast and cost-effective++#### Configuration++Add the following environment variables to your `.env` file in the `self-hosting` directory:++**For OpenAI (default):**++```bash title=".env"+OPENAI_API_KEY=sk-your-openai-api-key-here+AI_MODEL=gpt-4o-mini # Optional: defaults to gpt-4o-mini+```++**For Anthropic:**++```bash title=".env"+ANTHROPIC_API_KEY=your-anthropic-api-key-here+AI_MODEL=claude-3-5+```++#### Getting API Keys++- **OpenAI**: Get your API key from [platform.openai.com/api-keys](https://platform.openai.com/api-keys)+- **Anthropic**: Get your API key from [console.anthropic.com](https://console.anthropic.com)++<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>++<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>+++### Managed RedisIf you use a managed Redis service, you may need to set the `notify-keyspace-events` manually.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 4bd841cd6..d362c03fe 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,33 +3,33 @@ title: Supporter Access - Latest Docker Imagesdescription: Get access to OpenPanel's latest private Docker images with bleeding-edge features built on every commit.----## Thank You for Your Support! 🙏+## 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.As a supporter, you get exclusive access to our private Docker images that are built with every commit, giving you the absolute latest features and fixes before they're publicly released.-## Why Latest Images Matter+## Why latest images matter-### Bleeding-Edge Features+### Bleeding-edge features- **Instant access**: Get new features the moment they're merged- **Early bug fixes**: Patches and fixes deployed immediately- **Continuous improvements**: Performance enhancements and optimizations in real-time- **Stay ahead**: Run the most advanced version of OpenPanel available-### Built on Every Commit+### Built on every commitWe maintain a continuous integration pipeline that builds new Docker images with every single commit to our repository. This means:- Zero delay between development and deployment- Production-ready images tested and validated automatically- Access to features weeks or months before stable releases-## How It Works+## How it worksOur private Docker images are hosted on GitHub's container registry and protected from public access. As a supporter, you get an API key that grants you access to our private Docker proxy at `docker.openpanel.dev`, which seamlessly pulls these images for you.-## Getting Started+## Getting started-### Step 1: Become a Supporter+### Step 1: Become a supporterSupport starts at just **$20/month** and includes:- Access to all private Docker images@@ -37,11 +37,11 @@ Support starts at just **$20/month** and includes:- Direct impact on OpenPanel's development- Our eternal gratitude ❤️-### Step 2: Get Your API Key+### Step 2: Get your API keyOnce you become a supporter, you'll receive a unique API key that grants access to our Docker proxy.-### Step 3: Login to Docker Registry+### Step 3: Login to docker registryOn your server, authenticate with our Docker proxy using your API key:@@ -55,7 +55,7 @@ Replace `your_api_key` with the actual API key provided to you.Make sure to keep your API key secure and never commit it to version control!</Callout>-### Step 4: Update to Latest Images+### Step 4: Update to latest imagesWe've created a convenient script to make updating your images effortless. Navigate to your self-hosting folder and run:@@ -79,7 +79,7 @@ You can also check what tags are available without applying them:./get_latest_images --list # List all available tags```-### Step 5: Restart Your Services+### Step 5: Restart your servicesAfter pulling the latest images, simply restart your services:@@ -89,7 +89,7 @@ After pulling the latest images, simply restart your services:That's it! Your OpenPanel instance is now running the latest and greatest version.-## Quick Update Workflow+## Quick update workflowOnce you're set up, updating to the latest version is as simple as:@@ -107,13 +107,13 @@ The `get_latest_images` script will:3. Update your `docker-compose.yml` with images pointing to the latest commit SHAs4. Create a backup of your docker-compose file before making changes-## Important Notes+## Important notes- **Stability**: While these images are tested, they may occasionally contain bugs that haven't been discovered yet. We recommend having a backup strategy.- **Breaking changes**: We strive to maintain backwards compatibility, but occasionally breaking changes may occur. Always check the [changelog](/docs/self-hosting/changelog) before updating.- **Support**: As a supporter, you have priority access to support. If you encounter any issues, reach out to us on Discord or via email.-## Need Help?+## Need help?If you have any questions or run into issues:- Join our [Discord community](https://go.openpanel.dev/discord) (supporters get a special role!)@@ -122,7 +122,7 @@ If you have any questions or run into issues:----## Your Impact+## Your impactEvery contribution helps us:- Dedicate more time to development