10 Sentinels Active
SENTINEL 01: [AEGIS] AUDITING POCKETBASE INFRASTRUCTURE...
Back to Self-Hosted Stacks
Plausible

Deploy Plausible

Simple, open source, lightweight and privacy-friendly web analytics alternative to Google Analytics.

Quick Start

1

Create a directory

mkdir plausible-self-hosted && cd plausible-self-hosted
2

Create config file

Copy the content from the Config tab below into a file named docker-compose.yml

3

Deploy

docker compose up -d
Fast Track

Deploy Plausible in Minutes

Use our optimized Docker templates to deploy Plausible on any cloud provider. Get $200 in free credit to start on DigitalOcean.

Start with free creditDeploy on DigitalOcean
$200

Metadata

License
AGPL-3.0
Language
Elixir
Last Updated
10/13/2026
Category
Analytics

Configuration

yaml

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 🚀 BUILT & MAINTAINED BY THE ALTSTACK
# 🌍 https://thealtstack.com
# 💡 Open-source deployment templates for modern self-hosting.
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

# Docker Compose for Plausible
version: '3.8'

services:
  plausible_db:
    image: postgres:14-alpine
    restart: always
    volumes:
      - plausible_db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=postgres
    networks:
      - plausible_net
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5

  plausible_events_db:
    image: clickhouse/clickhouse-server:24.3.3.102-alpine
    restart: always
    volumes:
      - plausible_event_data:/var/lib/clickhouse
      - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
      - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
    ulimits:
      nofile:
        soft: 262144
        hard: 262144
    networks:
      - plausible_net
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"]
      interval: 10s
      timeout: 5s
      retries: 3

  plausible:
    image: plausible/analytics:latest
    restart: always
    command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
    depends_on:
      plausible_db:
        condition: service_healthy
      plausible_events_db:
        condition: service_healthy
    ports:
      - "8000:8000"
    environment:
      - BASE_URL=http://localhost:8000
      - SECRET_KEY_BASE=${SECRET_KEY_BASE:-replace-me-with-a-long-secret-key}
    networks:
      - plausible_net
    healthcheck:
      test: ["CMD", "wget", "--spider", "-q", "http://localhost:8000/api/health"]
      interval: 30s
      timeout: 10s
      retries: 3

networks:
  plausible_net:
    driver: bridge

volumes:
  plausible_db_data:
  plausible_event_data:
  plausible_geoip:

Community Notes

Help others by adding context, corrections, or warnings about this tool. Sign in to contribute.

No community notes yet. Be the first to add context.