8000 self-host basic bugs · Issue #28804 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
self-host basic bugs #28804
Open
Open
@straxico

Description

@straxico

I tried to self-host PostHog but got stuck at the start and spent many hours troubleshooting. Here’s what I found:

  1. Latest Installable Commit
    The latest working commit for self-hosting is 579408c765dc6a33cba571a558b553c1fff771c5. You must use 579408c765dc6a33cba571a558b553c1fff771c5 as the Docker tag for self-hosting.

  2. Events Tab Not Showing Data
    The Events tab does not display data, and events cannot be used as filters.

    property-defs-rs:
        image: ghcr.io/posthog/posthog/property-defs-rs:master
        build:
            context: posthog/rust/
            args:
                BIN: property-defs-rs
        restart: on-failure
        environment:
            DATABASE_URL: 'postgres://posthog:posthog@db:5432/posthog'
            KAFKA_HOSTS: 'kafka:9092'
            SKIP_WRITES: 'false'
            SKIP_READS: 'false'
            FILTER_MODE: 'opt-out'
  3. Live Activity Not Working

  4. CSRF Issue with /i/v0/e/ Endpoint

    • POST /decide returns /i/v0/e/ as the analytics endpoint, but this endpoint fails CSRF checks.
    • My setup: posthog.example.com (PostHog) and www.example.com (website). When sending events from www.example.com, the request gets a 403 error due to forbidden origin.
    • CSRF_TRUSTED_ORIGINS is not changeable, and /i/v0/e/ is not CSRF-exempt.
    • I found NEW_CAPTURE_ENDPOINT and set it to /e/, which resolved the issue.
  5. some clickhouse funection not working

posthog define its in clickhouse/user_defined_function.xml . you must bind volume like below to funnel can work.

    clickhouse:
        extends:
            file: docker-compose.base.yml
            service: clickhouse
        restart: on-failure
        depends_on:
            - kafka
            - zookeeper
        volumes:
            - ./posthog/posthog/idl:/idl
            - ./posthog/docker/clickhouse/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
            - ./posthog/docker/clickhouse/config.xml:/etc/clickhouse-server/config.xml
            - ./posthog/docker/clickhouse/users.xml:/etc/clickhouse-server/users.xml
            - ./docker/clickhouse/config.d/default.xml:/etc/clickhouse-server/config.d/default.xml
            - ./posthog/posthog/user_scripts:/var/lib/clickhouse/user_scripts
            - ./posthog/docker/clickhouse/user_defined_function.xml:/etc/clickhouse-server/user_defined_function.xml
            - clickhouse-data:/var/lib/clickhouse
  1. Session Recording Causes System Failure
    • When session recording is enabled, everything works fine for about 30 minutes. After that, the panel stops loading, and events are no longer saved.
    • All containers remain up, but I receive a "storage slow" error without further details.

I managed to self-host PostHog by disabling session recording while I continue investigating the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0