Misskey logo

Misskey

Open source, federated social media platform and interplanetary microblogging

Alternative to: twitter, x


Misskey is an open source, federated microblogging and social media platform built on ActivityPub. Run your own instance to post notes, follow people across the fediverse and customize your own community server.

Misskey Docker Compose example

Self-host Misskey on your own server, homelab, or VPS starting from this Docker Compose example. It runs Misskey in Docker containers using the official misskey/misskey:latest, misskey/misskey:latest, redis:7-alpine, postgres:18-alpine images, with persistent volumes and automatic restarts preconfigured. Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.

services:
  web:
    image: misskey/misskey:latest
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
      files-permissions:
        condition: service_completed_successfully
    volumes:
      - files:/misskey/files
      - ./default.yml:/misskey/.config/default.yml:ro
    environment:
      # Final public URL of your instance (e.g. https://misskey.example.com/). DO NOT change it after the first start.
      MISSKEY_URL: "http://localhost:3000/"
      # PostgreSQL database name.
      DATABASE_DB: "misskey"
      # PostgreSQL user.
      DATABASE_USER: "misskey"
      # PostgreSQL password (must match POSTGRES_PASSWORD of the db service).
      DATABASE_PASSWORD: "changeme"
    restart: unless-stopped

  # One-shot helper: the image runs as user misskey (991) and has no /misskey/files directory,
  # so the uploads volume is handed over to that user before the server starts.
  files-permissions:
    image: misskey/misskey:latest
    user: root
    command: ["chown", "-R", "991:991", "/misskey/files"]
    volumes:
      - files:/misskey/files

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      retries: 20
    restart: unless-stopped

  db:
    image: postgres:18-alpine
    volumes:
      - db_data:/var/lib/postgresql
    environment:
      # PostgreSQL database name.
      POSTGRES_DB: "misskey"
      # PostgreSQL user.
      POSTGRES_USER: "misskey"
      # PostgreSQL password.
      POSTGRES_PASSWORD: "changeme"
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "misskey", "-d", "misskey"]
      interval: 5s
      retries: 20
    restart: unless-stopped

volumes:
  files:
  redis_data:
  db_data:

Values set to changeme are required — replace them with your own values before starting Misskey.

Extra files

The Docker Compose configuration above bind-mounts the following file. Save it next to your compose.yml, keeping the same relative path.

default.yml

# Misskey configuration, derived from upstream .config/docker_example.yml.
# The public URL and the database name/user/password are intentionally not
# set here: Misskey reads them from the MISSKEY_URL, DATABASE_DB,
# DATABASE_USER and DATABASE_PASSWORD environment variables instead.

# The port that your Misskey server should listen on.
port: 3000

# PostgreSQL connection.
db:
  host: db
  port: 5432

dbReplications: false

# Redis connection.
redis:
  host: redis
  port: 6379

# Full-text search provider (sqlLike needs no extra services).
fulltextSearch:
  provider: sqlLike

# ID generation method. DO NOT change this after the instance has started.
id: 'aidx'

proxyBypassHosts:
  - api.deepl.com
  - api-free.deepl.com
  - www.recaptcha.net
  - hcaptcha.com
  - challenges.cloudflare.com

Prefer a managed setup? WinterFlow installs, configures, and updates Misskey for you using this same Docker Compose configuration.