
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
@posthog/plugin-server
Advanced tools
This service takes care of processing events with plugins and more.
Let's get you developing the plugin server in no time:
Install dependencies and prepare for takeoff by running command yarn.
Start a development instance of PostHog. After all, this is the PostHog Plugin Server, and it works in conjuction with the main server. To avoid interference, disable the plugin server there.
Make sure that the plugin server is configured correctly (see Configuration). Two settings that you MUST get right are DATABASE_URL and REDIS_URL - they need to be identical between the plugin server and the main server.
If developing the enterprise Kafka + ClickHouse pipeline, set KAFKA_ENABLED to true and provide KAFKA_HOSTS.
Otherwise if developing the basic Redis + Postgres pipeline, skip ahead.
Start the plugin server in autoreload mode with yarn start, or in compiled mode with yarn build && yarn start:dist, and develop away!
Run tests with yarn test. Run benchmarks with yarn benchmark.
There's a multitude of settings you can use to control the plugin server. Use them as environment variables.
| Name | Description | Default value |
|---|---|---|
| DATABASE_URL | Postgres database URL | 'postgres://localhost:5432/posthog' |
| REDIS_URL | Redis store URL | 'redis://localhost' |
| BASE_DIR | base path for resolving local plugins | '.' |
| WORKER_CONCURRENCY | number of concurrent worker threads | 0 – all cores |
| TASKS_PER_WORKER | number of parallel tasks per worker thread | 10 |
| SCHEDULE_LOCK_TTL | How many seconds to hold the lock for the schedule | 60 |
| CELERY_DEFAULT_QUEUE | Celery outgoing queue | 'celery' |
| PLUGINS_CELERY_QUEUE | Celery incoming queue | 'posthog-plugins' |
| PLUGINS_RELOAD_PUBSUB_CHANNEL | Redis channel for reload events | 'reload-plugins' |
| PLUGIN_SERVER_INGESTION | Whether the plugin server should put events right into the database | false |
| CLICKHOUSE_HOST | ClickHouse host | 'localhost' |
| CLICKHOUSE_DATABASE | ClickHouse database | 'default' |
| CLICKHOUSE_USER | ClickHouse username | 'default' |
| CLICKHOUSE_PASSWORD | ClickHouse password | null |
| CLICKHOUSE_CA | ClickHouse CA certs | null |
| CLICKHOUSE_SECURE | Secure ClickHouse connection | false |
| KAFKA_ENABLED | use Kafka instead of Celery to ingest events | false |
| KAFKA_HOSTS | comma-delimited Kafka hosts | null |
| KAFKA_CONSUMPTION_TOPIC | Kafka consumption topic override | null (automatic) |
| KAFKA_CLIENT_CERT_B64 | Kafka certificate in Base64 | null |
| KAFKA_CLIENT_CERT_KEY_B64 | Kafka certificate key in Base64 | null |
| KAFKA_TRUSTED_CERT_B64 | Kafka trusted CA in Base64 | null |
| DISABLE_WEB | whether to disable web server | true |
| WEB_PORT | port for web server to listen on | 3008 |
| WEB_HOSTNAME | hostname for web server to listen on | '0.0.0.0' |
| LOG_LEVEL | minimum log level | LogLevel.Info |
| SENTRY_DSN | Sentry ingestion URL | null |
| STATSD_HOST | StatsD host - integration disabled if this is not provided | null |
| STATSD_PORT | StatsD port | 8125 |
| STATSD_PREFIX | StatsD prefix | 'plugin-server.' |
It's magic! Just bump up version in package.json on the main branch and the new version will be published automatically, on GitHub and on npm. Courtesy of GitHub Actions.
FAQs
PostHog Plugin Server
The npm package @posthog/plugin-server receives a total of 1,562 weekly downloads. As such, @posthog/plugin-server popularity was classified as popular.
We found that @posthog/plugin-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.