Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(storage): swap objectstorage to seaweedfs compatibly (#60432)

Julian Bez6e52e808b2a6
diff --git a/bin/upgrade-objectstorage b/bin/upgrade-objectstorage
new file mode 100755
index 000000000000..aefa97fb6917
--- /dev/null
+++ b/bin/upgrade-objectstorage
@@ -0,0 +1,357 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+
+# Image used to read the old MinIO data — must match the format the dev/hobby MinIO
+# wrote (same RELEASE tag as docker-compose.hobby.yml).
+MINIO_IMAGE="minio/minio:RELEASE.2025-04-22T22-12-26Z"
+TEMP_CONTAINER="objectstorage-salvage-src"
+S3_KEY="object_storage_root_user"
+S3_SECRET="object_storage_root_password"
+
+show_help() {
+ cat <<'EOF'
+Objectstorage MinIO → SeaweedFS Salvage Script
+
+⚠️ IMPORTANT: This script is for LOCAL DEVELOPMENT environments.
+
+PostHog dev objectstorage now runs SeaweedFS in a fresh named volume
+(objectstorage-data). Your old MinIO objects live on the previous (now
+orphaned) volume and are invisible to the new SeaweedFS — the on-disk formats
+are not compatible, so there is no in-place conversion. This script salvages
+them by copying object-by-object over S3.
+
+The script automatically:
+- Finds the orphaned MinIO objectstorage volume (looks for /data/.minio.sys)
+- Spins up a temporary MinIO container reading that volume
+- Copies every bucket into the running SeaweedFS objectstorage
+- Removes the temporary container when done
+
+The old MinIO volume is left untouched, so this is safe to run later if you
+forgot — and safe to re-run (existing objects are skipped). Remove the old
+volume once you've verified the data landed.
+
+Usage:
+ hogli deploy:upgrade-objectstorage Interactive mode (default)
+ hogli deploy:upgrade-objectstorage --list List all MinIO volumes
+ ./bin/upgrade-objectstorage <volume-id> Salvage a specific volume
+
+Examples:
+ # Interactive: detect the orphaned volume and copy it over
+ hogli deploy:upgrade-objectstorage
+
+ # Find orphaned MinIO volumes
+ hogli deploy:upgrade-objectstorage --list
+
+ # Salvage a specific volume
+ ./bin/upgrade-objectstorage 6e93806fad73d030739a55dd1c6594bf925833dd1a2ef59b3fb14b54bd6f5d73
+
+EOF
+}
+
+# A MinIO data volume always has a .minio.sys directory at its root.
+is_minio_volume() {
+ docker run --rm -v "$1:/data:ro" alpine test -d /data/.minio.sys 2>/dev/null
+}
+
+list_minio_volumes() {
+ echo "Scanning for MinIO objectstorage volumes..."
+ echo ""
+
+ docker volume ls -q | while read -r vol; do
+ if is_minio_volume "$vol"; then
+ SIZE=$(docker run --rm -v "$vol:/data:ro" alpine du -sh /data 2>/dev/null | awk '{print $1}' || echo "unknown")
+ IN_USE=$(docker ps -a --filter "volume=$vol" --format "{{.Names}}" 2>/dev/null)
+
+ if [ -n "$IN_USE" ]; then
+ echo "✅ $vol"
+ echo " Size: $SIZE | In use by: $IN_USE"
+ else
+ echo "⚠️ $vol"
+ echo " Size: $SIZE | ORPHANED (not mounted)"
+ fi
+ echo ""
+ fi
+ done
+}
+
+# The compose file in the directory you run this from is authoritative — whoever runs
+# the command controls how containers come up. We deliberately do NOT read the running
+# container's recorded compose path: the objectstorage container is shared across
+# worktrees (same COMPOSE_PROJECT_NAME), so it may have last been started from another
+# worktree still on MinIO. Trusting that label would force-recreate MinIO again instead
+# of swapping to the SeaweedFS your freshly-pulled compose defines. So: pull, run, done.
+detect_compose_file() {
+ if [ -f "docker-compose.dev.yml" ]; then
+ echo "docker-compose.dev.yml"
+ elif [ -f "docker-compose.yml" ]; then
+ echo "docker-compose.yml"
+ else
+ echo ""
+ fi
+}
+
+# Return the first volume that looks like MinIO data and isn't backing a running
+# container (the live objectstorage is SeaweedFS, so it won't match anyway).
+detect_minio_volume() {
+ docker volume ls -q | while read -r vol; do
+ if is_minio_volume "$vol"; then
+ echo "$vol"
+ return
+ fi
+ done
+}
+
+# Image of the running objectstorage container, empty if none is running.
+running_objectstorage_image() {
+ local container
+ container=$(docker ps --filter "label=com.docker.compose.service=objectstorage" --format "{{.ID}}" | head -1)
+ [ -z "$container" ] && return
+ docker inspect "$container" --format '{{.Config.Image}}' 2>/dev/null || true
+}
+
+# The destination must be SeaweedFS. If the old MinIO objectstorage is still running
+# (branch checked out but `hogli up` not run yet), copying into it would silently
+# no-op — the data is already there — and never populate SeaweedFS. Recreate it as
+# SeaweedFS first; that orphans the old volume, which is exactly what we salvage from.
+ensure_objectstorage_running() {
+ local COMPOSE_FILE="$1"
+ local image
+ image=$(running_objectstorage_image)
+
+ if [ -n "$image" ] && [[ "$image" != *minio* ]]; then
+ return
+ fi
+
+ if [ -n "$image" ]; then
+ echo "objectstorage is still the old MinIO — recreating it as SeaweedFS first..."
+ docker compose -f "$COMPOSE_FILE" up -d --force-recreate objectstorage
+ else
+ echo "Starting objectstorage (SeaweedFS) as the copy destination..."
+ docker compose -f "$COMPOSE_FILE" up -d objectstorage
+ fi
+
+ for _ in $(seq 1 30); do
+ image=$(running_objectstorage_image)
+ if [ -n "$image" ] && [[ "$image" != *minio* ]]; then
+ return
+ fi
+ sleep 1
+ done
+ echo "❌ objectstorage is not running as SeaweedFS. Run 'hogli up' to swap it, then re-run."
+ exit 1
+}
+
+# Host port the running objectstorage publishes for S3 (defaults to 19000).
+objectstorage_host_port() {
+ local container
+ container=$(docker ps --filter "label=com.docker.compose.service=objectstorage" --format "{{.ID}}" | head -1)
+ local mapping
+ mapping=$(docker port "$container" 19000 2>/dev/null | head -1)
+ if [ -n "$mapping" ]; then
+ echo "${mapping##*:}"
+ else
+ echo "19000"
+ fi
+}
+
+cleanup_temp_container() {
+ docker rm -f "$TEMP_CONTAINER" >/dev/null 2>&1 || true
+}
+
+# boto3 sends buffered (non-streaming) signed PUTs, which open-mode SeaweedFS
+# accepts — unlike mc / aws-chunked streaming uploads, which it rejects.
+copy_buckets() {
+ local SRC_ENDPOINT="$1"
+ local DST_ENDPOINT="$2"
+
+ if ! python3 -c "import boto3" >/dev/null 2>&1; then
+ echo "❌ boto3 is required. Run this inside the PostHog dev environment (flox)."
+ exit 1
+ fi
+
+ python3 - "$SRC_ENDPOINT" "$DST_ENDPOINT" "$S3_KEY" "$S3_SECRET" <<'PY'
+import sys, time, boto3
+from botocore.config import Config
+from botocore.exceptions import ClientError
+
+src_ep, dst_ep, key, secret = sys.argv[1:5]
+
+
+def client(ep):
+ return boto3.client(
+ "s3", endpoint_url=ep, aws_access_key_id=key, aws_secret_access_key=secret,
+ region_name="us-east-1",
+ config=Config(s3={"addressing_style": "path"}, signature_version="s3v4"),
+ )
+
+
+src, dst = client(src_ep), client(dst_ep)
+
+for name, c in (("source", src), ("destination", dst)):
+ for _ in range(60):
+ try:
+ c.list_buckets()
+ break
+ except Exception:
+ time.sleep(1)
+ else:
+ print(f"❌ {name} object storage never became reachable")
+ sys.exit(1)
+
+
+def exists(c, bucket, key):
+ try:
+ c.head_object(Bucket=bucket, Key=key)
+ return True
+ except ClientError:
+ return False
+
+
+buckets = [b["Name"] for b in src.list_buckets().get("Buckets", [])]
+if not buckets:
+ print("No buckets on the old volume — nothing to copy.")
+ sys.exit(0)
+
+copied = skipped = 0
+for bucket in buckets:
+ try:
+ dst.create_bucket(Bucket=bucket)
+ except ClientError:
+ pass
+ print(f"→ {bucket}")
+ for page in src.get_paginator("list_objects_v2").paginate(Bucket=bucket):
+ for obj in page.get("Contents", []):
+ obj_key = obj["Key"]
+ if exists(dst, bucket, obj_key):
+ skipped += 1
+ continue
+ o = src.get_object(Bucket=bucket, Key=obj_key)
+ body = o["Body"].read()
+ kw = {"Bucket": bucket, "Key": obj_key, "Body": body}
+ if o.get("ContentType"):
+ kw["ContentType"] = o["ContentType"]
+ dst.put_object(**kw)
+ copied += 1
+
+print(f"✅ Copied {copied} objects ({skipped} already present, skipped)")
+PY
+}
+
+migrate_volume() {
+ local SOURCE_VOLUME="$1"
+ local COMPOSE_FILE="$2"
+
+ if ! is_minio_volume "$SOURCE_VOLUME"; then
+ echo "❌ Error: Volume $SOURCE_VOLUME does not look like MinIO data (no .minio.sys)"
+ exit 1
+ fi
+
+ SIZE=$(docker run --rm -v "$SOURCE_VOLUME:/data:ro" alpine du -sh /data 2>/dev/null | awk '{print $1}' || echo "unknown")
+ echo "Found MinIO objectstorage volume: $SOURCE_VOLUME ($SIZE)"
+ echo ""
+ read -r -p "Copy this data into the running SeaweedFS objectstorage? [y/N] " confirm
+ if [[ ! "$confirm" =~ ^([yY][eE][sS]|[yY])$ ]]; then
+ echo "Cancelled."
+ exit 0
+ fi
+
+ ensure_objectstorage_running "$COMPOSE_FILE"
+ DST_PORT=$(objectstorage_host_port)
+
+ cleanup_temp_container
+ trap cleanup_temp_container EXIT
+
+ echo ""
+ echo "Step 1: Starting temporary MinIO reading the old volume..."
+ docker run -d \
+ --name "$TEMP_CONTAINER" \
+ -p "127.0.0.1::19000" \
+ -v "$SOURCE_VOLUME:/data" \
+ -e MINIO_ROOT_USER="$S3_KEY" \
+ -e MINIO_ROOT_PASSWORD="$S3_SECRET" \
+ "$MINIO_IMAGE" \
+ server --address ":19000" /data >/dev/null
+
+ SRC_MAPPING=$(docker port "$TEMP_CONTAINER" 19000 | head -1)
+ SRC_PORT="${SRC_MAPPING##*:}"
+
+ echo ""
+ echo "Step 2: Copying every bucket into SeaweedFS..."
+ copy_buckets "http://127.0.0.1:$SRC_PORT" "http://127.0.0.1:$DST_PORT"
+
+ echo ""
+ echo "Step 3: Removing temporary container..."
+ cleanup_temp_container
+ trap - EXIT
+
+ echo ""
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo "✅ Objectstorage salvage complete!"
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo ""
+ echo "Verify your data, then remove the old MinIO volume to reclaim disk:"
+ echo " docker volume rm $SOURCE_VOLUME"
+ echo ""
+}
+
+case "${1:-}" in
+ --help|-h)
+ show_help
+ exit 0
+ ;;
+
+ --list)
+ list_minio_volumes
+ exit 0
+ ;;
+
+ "")
+ echo ""
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo "🪣 Objectstorage MinIO → SeaweedFS salvage"
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo ""
+
+ COMPOSE_FILE=$(detect_compose_file)
+ if [ -z "$COMPOSE_FILE" ]; then
+ echo "❌ Error: No docker-compose file found"
+ exit 1
+ fi
+ echo "Using compose file: $COMPOSE_FILE"
+ echo ""
+
+ DETECTED_VOLUME=$(detect_minio_volume)
+ if [ -n "$DETECTED_VOLUME" ]; then
+ migrate_volume "$DETECTED_VOLUME" "$COMPOSE_FILE"
+ else
+ echo "No MinIO objectstorage data detected — nothing to salvage."
+ echo ""
+ echo "If you have data in an orphaned MinIO volume:"
+ echo " hogli deploy:upgrade-objectstorage --list # List all MinIO volumes"
+ echo " ./bin/upgrade-objectstorage <volume-id> # Salvage a specific volume"
+ echo ""
+ fi
+ ;;
+
+ *)
+ VOLUME_ID="$1"
+
+ COMPOSE_FILE=$(detect_compose_file)
+ if [ -z "$COMPOSE_FILE" ]; then
+ echo "❌ Error: No docker-compose file found"
+ exit 1
+ fi
+
+ echo ""
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo "🪣 Objectstorage MinIO → SeaweedFS salvage"
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
+ echo ""
+ echo "Using compose file: $COMPOSE_FILE"
+ echo ""
+
+ migrate_volume "$VOLUME_ID" "$COMPOSE_FILE"
+ ;;
+esac
diff --git a/devenv/news.txt b/devenv/news.txt
index 70a819e4e579..ef0bd9ea0c9f 100644
--- a/devenv/news.txt
+++ b/devenv/news.txt
@@ -1,3 +1,6 @@
+2026-06-08
+objectstorage swapped minio -> seaweedfs; old local files stay on the old volume, run hogli deploy:upgrade-objectstorage to copy them over
+
2026-05-05
check product maturity: hogli product:maturity <product>, or --all for a leaderboard
diff --git a/docker-compose.base.yml b/docker-compose.base.yml
index 1c58fc14efaf..16eb19e902ec 100644
--- a/docker-compose.base.yml
+++ b/docker-compose.base.yml
@@ -237,13 +237,69 @@ services:
DYNAMIC_CONFIG_ENABLED: 'true'
objectstorage:
- image: minio/minio:RELEASE.2025-04-22T22-12-26Z
+ # SeaweedFS, S3-compatible object storage on objectstorage:19000.
+ # Run in default open-access mode (no -s3.config) so every credential pair our
+ # test/CI/dev code uses just works — including object_storage_root_user and
+ # any/any. Identity-based auth (-s3.config) was tried first but triggers known
+ # SeaweedFS SigV4 signature failures and presigned-URL regressions; see
+ # seaweedfs/seaweedfs #6635 and discussion #3976.
+ # Pin >= 4.05: that's the first release that persists Content-Encoding metadata
+ # (4.03/4.04 silently drop it, breaking gzipped objects that rely on the header
+ # round-tripping). 4.29 is the newest release that's been out at least two weeks.
+ image: chrislusf/seaweedfs:4.29
restart: on-failure
- environment:
- MINIO_ROOT_USER: object_storage_root_user
- MINIO_ROOT_PASSWORD: object_storage_root_password
- entrypoint: sh
- command: -c 'mkdir -p /data/posthog /data/ducklake-dev /data/ai-blobs && minio server --address ":19000" --console-address ":19001" /data' # create the 'posthog', 'ducklake-dev', and 'ai-blobs' buckets before starting the service
+ entrypoint:
+ - /bin/sh
+ - -c
+ # Background a create-and-verify loop and exec weed as PID 1 so SIGTERM
+ # reaches it directly. `weed shell` exits 0 as long as the master is
+ # reachable, even if individual `s3.bucket.create` commands fail (e.g. while
+ # the filer is still coming up), so we run create+list in one session and
+ # only touch the sentinel once `s3.bucket.list` reports every required bucket.
+ - |
+ (
+ while true; do
+ OUT=$$(printf 's3.bucket.create -name posthog\ns3.bucket.create -name ducklake-dev\ns3.bucket.create -name ai-blobs\ns3.bucket.list\n' \
+ | /usr/bin/weed shell -master=localhost:19001 2>&1 || true)
+ if echo "$$OUT" | grep -q posthog \
+ && echo "$$OUT" | grep -q ducklake-dev \
+ && echo "$$OUT" | grep -q ai-blobs; then
+ touch /tmp/objectstorage-ready
+ echo "Objectstorage SeaweedFS ready with required buckets"
+ break
+ fi
+ sleep 1
+ done
+ ) &
+ exec /usr/bin/weed "$$@"
+ - --
+ # Every S3 bucket is its own SeaweedFS collection that grows volumes in batches.
+ # By default SeaweedFS preallocates 1 GiB per volume, so a workload that creates
+ # many buckets (the test suite uses a unique bucket per test) reserves many GiB
+ # up front and exhausts disk/volumes — writes then fail with HTTP 500
+ # ("no writable volumes"). volumePreallocate=false makes volumes grow on demand so
+ # capacity tracks actual data, not bucket count; volume.max is raised well above the
+ # default 8 since each collection consumes several volume slots.
+ command:
+ [
+ 'server',
+ '-master.port=19001',
+ '-s3',
+ '-s3.port=19000',
+ '-dir=/data',
+ '-volume.max=1000',
+ '-master.volumePreallocate=false',
+ ]
+ # SeaweedFS creates buckets after startup via the background loop above, so without
+ # this sentinel bin/wait-for-docker would treat the container as ready the instant
+ # weed execs and race the bucket bootstrap. The loop touches the sentinel once every
+ # required bucket exists.
+ healthcheck:
+ test: ['CMD', 'test', '-f', '/tmp/objectstorage-ready']
+ interval: 5s
+ timeout: 5s
+ retries: 30
+ start_period: 10s
objectstorage-azure:
image: mcr.microsoft.com/azure-storage/azurite:3.35.0
@@ -337,7 +393,7 @@ services:
REDIS_URL: 'redis://redis7:6379/'
CAPTURE_MODE: events
RUST_LOG: 'info,rdkafka=warn'
- # AI endpoint S3 blob storage (MinIO)
+ # AI endpoint S3 blob storage
AI_S3_BUCKET: ai-blobs
AI_S3_PREFIX: 'llma/'
AI_S3_ENDPOINT: 'http://objectstorage:19000'
@@ -734,7 +790,9 @@ services:
- '/var/run/docker.sock:/var/run/docker.sock'
seaweedfs:
- image: chrislusf/seaweedfs:4.03
+ # Default open-access mode; see the `objectstorage` service above for rationale
+ # (including the >= 4.05 Content-Encoding pin).
+ image: chrislusf/seaweedfs:4.29
entrypoint:
- /bin/sh
- -c
@@ -769,7 +827,11 @@ services:
db:
condition: service_healthy
objectstorage:
- condition: service_started
+ # Wait for the bucket-bootstrap sentinel, not just the process: DuckLake
+ # targets s3://ducklake-dev/, which SeaweedFS creates asynchronously after
+ # startup. service_started would race the bootstrap loop (see the
+ # objectstorage healthcheck rationale above).
+ condition: service_healthy
command: ['--config', '/app/config.yaml']
networks:
diff --git a/docker-compose.dev-full.yml b/docker-compose.dev-full.yml
index d69be1d89893..8b567f5f5d2c 100644
--- a/docker-compose.dev-full.yml
+++ b/docker-compose.dev-full.yml
@@ -79,6 +79,10 @@ services:
ports:
- '19000:19000'
- '19001:19001'
+ # Fresh named volume so the swap starts clean; data on the previous volume
+ # stays salvageable via `hogli deploy:upgrade-objectstorage`.
+ volumes:
+ - objectstorage-data:/data
maildev:
extends:
@@ -282,3 +286,4 @@ networks:
volumes:
postgres-15-data:
redpanda-data:
+ objectstorage-data:
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 8ef96b17cd39..3d20a3bb145c 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -531,6 +531,10 @@ services:
ports:
- '19000:19000'
- '19001:19001'
+ # Fresh named volume so the swap starts clean; data on the previous volume
+ # stays salvageable via `hogli deploy:upgrade-objectstorage`.
+ volumes:
+ - objectstorage-data:/data
objectstorage-azure:
extends:
@@ -740,3 +744,4 @@ volumes:
redpanda-data:
seaweedfs-data:
duckgres-data:
+ objectstorage-data:
diff --git a/docker-compose.hobby.yml b/docker-compose.hobby.yml
index f6580ebae691..622c62594eda 100644
--- a/docker-compose.hobby.yml
+++ b/docker-compose.hobby.yml
@@ -288,11 +288,16 @@ services:
- web
- livestream
objectstorage:
- extends:
- file: docker-compose.base.yml
- service: objectstorage
-
+ # Transitional legacy MinIO source for hobby migrations.
+ # Dev/CI stacks use SeaweedFS-backed objectstorage from docker-compose.base.yml,
+ # but hobby keeps MinIO so bin/migrate-storage-hobby still has a MinIO source.
+ image: minio/minio:RELEASE.2025-04-22T22-12-26Z
restart: on-failure
+ environment:
+ MINIO_ROOT_USER: object_storage_root_user
+ MINIO_ROOT_PASSWORD: object_storage_root_password
+ entrypoint: sh
+ command: -c 'mkdir -p /data/posthog /data/ducklake-dev /data/ai-blobs && minio server --address ":19000" --console-address ":19001" /data'
logging: *default-logging
volumes:
- objectstorage:/data
diff --git a/docs/published/handbook/engineering/data-warehouse.md b/docs/published/handbook/engineering/data-warehouse.md
index 40d1903b6b3e..c8a769f086a2 100644
--- a/docs/published/handbook/engineering/data-warehouse.md
+++ b/docs/published/handbook/engineering/data-warehouse.md
@@ -23,11 +23,18 @@ Looking to add a new source to data warehouse? [We have a detailed guide in the
5. password = posthog
6. schema = public
3. Hit next, then select which tables you'd like to import. [More info on the sync types can be found here](https://posthog.com/docs/cdp/sources#incremental-vs-append-only-vs-full-table)
-4. Hit next and finish the import - `temporal-worker-data-warehouse` will then import the data into your local MinIO instance
+4. Hit next and finish the import - `temporal-worker-data-warehouse` will then import the data into your local object storage
-## Accessing MinIO
+## Accessing object storage
-All your data warehouse data is stored in your local MinIO instance. You can view all the files by going to `http://localhost:19001/` and using the username `object_storage_root_user` and password `object_storage_root_password`. There should be a `data-warehouse` bucket that has a separate folder for each table you sync.
+All your data warehouse data is stored in your local object storage (SeaweedFS, S3-compatible, running at `http://localhost:19000`). Unlike MinIO, SeaweedFS has no web console, so inspect it with any S3 client. For example, with the AWS CLI:
+
+```bash
+AWS_ACCESS_KEY_ID=object_storage_root_user AWS_SECRET_ACCESS_KEY=object_storage_root_password \
+ aws --endpoint-url http://localhost:19000 s3 ls s3://data-warehouse/ --recursive
+```
+
+There's a separate folder under the `data-warehouse` bucket for each table you sync.
## Setting up a MySQL source
diff --git a/docs/published/handbook/engineering/developing-locally.md b/docs/published/handbook/engineering/developing-locally.md
index 369a0a808b49..9b18333abc02 100644
--- a/docs/published/handbook/engineering/developing-locally.md
+++ b/docs/published/handbook/engineering/developing-locally.md
@@ -33,7 +33,7 @@ These components rely on a few external services:
- ClickHouse – for storing big data (events, persons – analytics queries)
- Kafka – for queuing events for ingestion
-- MinIO – for storing files (session recordings, file exports)
+- SeaweedFS – S3-compatible object storage for files (session recordings, file exports)
- PostgreSQL – for storing ordinary data (users, projects, saved insights)
- Redis – for caching and inter-service communication
- Zookeeper – for coordinating Kafka and ClickHouse clusters
diff --git a/docs/published/handbook/engineering/manual-dev-setup.md b/docs/published/handbook/engineering/manual-dev-setup.md
index b21871e71c85..ebd9be09b558 100644
--- a/docs/published/handbook/engineering/manual-dev-setup.md
+++ b/docs/published/handbook/engineering/manual-dev-setup.md
@@ -54,7 +54,7 @@ d22559261575 temporalio/auto-setup:1.20.0 "/etc/temporal/entry
c04358d8309f zookeeper:3.7.0 "/docker-entrypoint.…" 51 seconds ago Up 50 seconds 2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp posthog-zookeeper-1
09add699866e maildev/maildev:2.0.5 "bin/maildev" 51 seconds ago Up 50 seconds (healthy) 0.0.0.0:1025->1025/tcp, 0.0.0.0:1080->1080/tcp posthog-maildev-1
61a44c094753 elasticsearch:7.16.2 "/bin/tini -- /usr/l…" 51 seconds ago Up 50 seconds 9200/tcp, 9300/tcp posthog-elasticsearch-1
-a478cadf6911 minio/minio:RELEASE.2022-06-25T15-50-16Z "sh -c 'mkdir -p /da…" 51 seconds ago Up 50 seconds 9000/tcp, 0.0.0.0:19000-19001->19000-19001/tcp posthog-object_storage-1
+a478cadf6911 chrislusf/seaweedfs:4.29 "/bin/sh -c '(while …" 51 seconds ago Up 50 seconds 0.0.0.0:19000-19001->19000-19001/tcp posthog-objectstorage-1
91f838afe40e redis:6.2.7-alpine "docker-entrypoint.s…" 51 seconds ago Up 50 seconds 0.0.0.0:6379->6379/tcp posthog-redis-1
# docker logs posthog-db-1 -n 1
diff --git a/hogli.yaml b/hogli.yaml
index 3a27b0658b83..43ea163b1971 100644
--- a/hogli.yaml
+++ b/hogli.yaml
@@ -431,6 +431,15 @@ deploy:
\ migrate # One-way migrate all (MinIO \u2192 SeaweedFS)\n hogli deploy:migrate-storage-hobby\
\ exports -n # Dry run exports only"
prompt: true
+ deploy:upgrade-objectstorage:
+ bin_script: upgrade-objectstorage
+ description: "Dev: salvage objectstorage data from the old MinIO volume into the\
+ \ running SeaweedFS (interactive)\n\nExamples:\n hogli deploy:upgrade-objectstorage\
+ \ # Detect and copy the orphaned MinIO volume\n hogli deploy:upgrade-objectstorage\
+ \ --list # List all MinIO volumes"
+ services:
+ - docker
+ prompt: true
build:
build:
click: hogli_commands.build:build
diff --git a/rust/docker-compose.yml b/rust/docker-compose.yml
index 08e81338e9c8..6b464df127e0 100644
--- a/rust/docker-compose.yml
+++ b/rust/docker-compose.yml
@@ -49,16 +49,51 @@ services:
retries: 10
objectstorage:
- image: minio/minio:RELEASE.2025-01-20T14-49-07Z
+ # SeaweedFS, S3-compatible object storage on objectstorage:19000.
+ # Open-access mode (no -s3.config) so any credential pair our code uses just works.
+ # See docker-compose.base.yml `objectstorage` for full rationale (incl. the >= 4.05
+ # Content-Encoding pin).
+ image: chrislusf/seaweedfs:4.29
restart: on-failure
ports:
- '127.0.0.1:19000:19000'
- '127.0.0.1:19001:19001'
- environment:
- MINIO_ROOT_USER: object_storage_root_user
- MINIO_ROOT_PASSWORD: object_storage_root_password
- entrypoint: sh
- command: -c 'mkdir -p /data/capture && minio server --address ":19000" --console-address ":19001" /data' # create the 'capture' bucket before starting the service
+ entrypoint:
+ - /bin/sh
+ - -c
+ - |
+ (
+ while true; do
+ OUT=$$(printf 's3.bucket.create -name capture\ns3.bucket.create -name posthog\ns3.bucket.list\n' \
+ | /usr/bin/weed shell -master=localhost:19001 2>&1 || true)
+ if echo "$$OUT" | grep -q capture \
+ && echo "$$OUT" | grep -q posthog; then
+ touch /tmp/objectstorage-ready
+ echo "Objectstorage SeaweedFS ready with required buckets"
+ break
+ fi
+ sleep 1
+ done
+ ) &
+ exec /usr/bin/weed "$$@"
+ - --
+ # volumePreallocate=false so per-bucket collections grow on demand instead of
+ # reserving 1 GiB per volume — see docker-compose.base.yml `objectstorage`.
+ command:
+ [
+ 'server',
+ '-master.port=19001',
+ '-s3',
+ '-s3.port=19000',
+ '-dir=/data',
+ '-master.volumePreallocate=false',
+ ]
+ healthcheck:
+ test: ['CMD', 'test', '-f', '/tmp/objectstorage-ready']
+ interval: 5s
+ timeout: 5s
+ retries: 30
+ start_period: 10s
kafka-ui:
image: provectuslabs/kafka-ui:latest