improve(self-hosting): remove goose, custom migration, docs, remove zookeeper

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-17 20:54:54 +01:00
parent 16b6786165
commit 329c0885d4
47 changed files with 2181 additions and 1825 deletions

View File

@@ -1,14 +1,75 @@
---
title: Introduction to OpenPanel
description: The OpenPanel SDKs provide a set of core methods that allow you to track events, identify users, and more. Here's an overview of the key methods available in the SDKs.
description: Get started with OpenPanel's powerful analytics platform that combines the best of product and web analytics in one simple solution.
---
<Callout>
While all OpenPanel SDKs share a common set of core methods, some may have
syntax variations or additional methods specific to their environment. This
documentation provides an overview of the base methods and available SDKs.
OpenPanel is currently in beta and free to use. We're constantly improving our
platform based on user feedback.
</Callout>
## What is OpenPanel?
OpenPanel is an open-source analytics platform that combines product analytics (like Mixpanel) with web analytics (like Plausible) into one simple solution. Whether you're tracking website visitors or analyzing user behavior in your app, OpenPanel provides the insights you need without the complexity.
## Key Features
### Web Analytics
- **Real-time data**: See visitor activity as it happens
- **Traffic sources**: Understand where your visitors come from
- **Geographic insights**: Track visitor locations and trends
- **Device analytics**: Monitor usage across different devices
- **Page performance**: Analyze your most visited pages
### Product Analytics
- **Event tracking**: Monitor user actions and interactions
- **User profiles**: Build detailed user journey insights
- **Funnels**: Analyze conversion paths
- **Retention**: Track user engagement over time
- **Custom properties**: Add context to your events
## Getting Started
1. **Installation**: Choose your preferred method:
- [Script tag](/docs/sdks/script) - Quickest way to get started
- [Web SDK](/docs/sdks/web) - For more control and TypeScript support
- [React](/docs/sdks/react) - Native React integration
- [Next.js](/docs/sdks/nextjs) - Optimized for Next.js apps
2. **Core Methods**:
```js
// Track an event
track('button_clicked', {
buttonId: 'signup',
location: 'header'
});
// Identify a user
identify({
profileId: 'user123',
email: 'user@example.com',
firstName: 'John'
});
```
## Privacy First
OpenPanel is built with privacy in mind:
- No cookies required
- GDPR and CCPA compliant
- Self-hosting option available
- Full control over your data
## Open Source
OpenPanel is fully open-source and available on [GitHub](https://github.com/Openpanel-dev/openpanel). We believe in transparency and community-driven development.
## Need Help?
- Join our [Discord community](https://discord.gg/openpanel)
- Check our [GitHub issues](https://github.com/Openpanel-dev/openpanel/issues)
- Email us at [hello@openpanel.dev](mailto:hello@openpanel.dev)
## Core Methods
### Set global properties

View File

@@ -0,0 +1,23 @@
---
title: Changelog for self-hosting
description: This is a list of changes that have been made to the self-hosting setup.
---
## 1.0.0 (stable)
OpenPanel self-hosting is now in a stable state and should not be any breaking changes in the future.
If you are upgrading from a previous version, you should keep an eye on the logs since it well tell you if you need to take any actions. Its not mandatory but its recommended since it might bite you in the *ss later.
### New environment variables.
<Callout>
If you upgrading from a previous version, you'll need to edit your `.env` file if you want to use these new variables.
</Callout>
- `ALLOW_REGISTRATION` - If set to `false` new users will not be able to register (only the first user can register).
- `ALLOW_INVITATION` - If set to `false` new users will not be able to be invited.
## 0.0.6
Removed Clerk.com and added self-hosted authentication.

View File

@@ -1,5 +1,9 @@
{
"title": "Self-hosting",
"defaultOpen": true,
"pages": ["self-hosting", "migrating-from-clerk"]
"pages": [
"[Get started](/docs/self-hosting/self-hosting)",
"changelog",
"migrating-from-clerk"
]
}

View File

@@ -47,7 +47,7 @@ docker compose cp ./users-dump.csv op-api:/app/packages/db/code-migrations/users
<Step>
Run the migration:
```bash
docker compose exec -it op-api bash -c "cd /app/packages/db && pnpm migrate:deploy:db:code 2-accounts.ts"
docker compose exec -it op-api bash -c "cd /app/packages/db && pnpm migrate:deploy:code 2-accounts.ts"
```
</Step>
</Steps>

View File

@@ -1,13 +1,10 @@
---
title: Self-hosting
title: Get started with self-hosting
description: This is a simple guide how to get started with OpenPanel on your own VPS.
---
import { Step, Steps } from 'fumadocs-ui/components/steps';
<Callout>OpenPanel is not stable yet. If you still want to self-host you can go ahead. Bear in mind that new changes might give a little headache to keep up with.</Callout>
<Callout>From version 0.0.5 we have removed Clerk.com. If you are upgrading from a previous version, you will need to export your users from Clerk and import them into OpenPanel. Read more about it here: [Migrating from Clerk](/docs/self-hosting/migrating-from-clerk)</Callout>
## Instructions
### Prerequisites
@@ -54,8 +51,8 @@ cd openpanel/self-hosting
1. Install docker
2. Install node
3. Install pnpm
4. Run the `npx jiti ./quiz.ts` script inside the self-hosting folder
3. Install npm
4. Run the `npm run quiz` script inside the self-hosting folder
</Step>
<Step>
@@ -110,6 +107,7 @@ Some of OpenPanel's features require e-mail. We use Resend as our transactional
<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
@@ -120,4 +118,62 @@ If you use a managed Redis service, you may need to set the `notify-keyspace-eve
Without this setting we wont be able to listen for expired keys which we use for caluclating currently active vistors.
> You will see a warning in the logs if this needs to be set manually.
> 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
```
## 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](/changelog) and apply them to your instance.