Experience a radically different approach to social networking where you dictate what appears on your timeline. This open-source platform removes corporate middlemen, algorithms, and advertisements, delivering a pure, chronological feed of the content you actually want to see. Because it operates on a decentralized model, you can join a server that aligns with your values or host your own, ensuring your data remains entirely yours.
Key benefits include:
services:
db:
image: postgres:14-alpine
restart: always
shm_size: 256mb
networks:
- internal_network
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
volumes:
- ./data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_USER=${DB_USER}
- POSTGRES_DB=${DB_NAME}
redis:
image: redis:7-alpine
restart: always
networks:
- internal_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
volumes:
- ./data/redis:/data
web:
image: tootsuite/mastodon:latest
restart: always
env_file: .env
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
networks:
- external_network
- internal_network
ports:
- "3000:3000"
depends_on:
- db
- redis
volumes:
- ./data/public/system:/mastodon/public/system
streaming:
image: tootsuite/mastodon:latest
restart: always
env_file: .env
command: node ./streaming
networks:
- external_network
- internal_network
ports:
- "4000:4000"
depends_on:
- db
- redis
sidekiq:
image: tootsuite/mastodon:latest
restart: always
env_file: .env
command: bundle exec sidekiq
networks:
- external_network
- internal_network
depends_on:
- db
- redis
volumes:
- ./data/public/system:/mastodon/public/system
networks:
external_network:
internal_network:
internal: true# Service dependencies
DB_HOST=db
DB_PORT=5432
DB_NAME=mastodon_production
DB_USER=mastodon
DB_PASS=your_secure_database_password
REDIS_HOST=redis
REDIS_PORT=6379
# Federation
# Domain name of your instance
LOCAL_DOMAIN=example.com
# Secrets (Generate these using `rake secret` inside the container)
SECRET_KEY_BASE=your_generated_secret_key_base
OTP_SECRET=your_generated_otp_secret
# VAPID keys (Generate these using `rake mastodon:webpush:generate_vapid_key`)
VAPID_PRIVATE_KEY=your_generated_vapid_private_key
VAPID_PUBLIC_KEY=your_generated_vapid_public_key
# Minio / S3 Storage (Optional, defaults to local file system)
# S3_ENABLED=true
# S3_BUCKET=your_bucket
# AWS_ACCESS_KEY_ID=your_access_key
# AWS_SECRET_ACCESS_KEY=your_secret_key
# S3_ALIAS_HOST=files.example.com
# SMTP Configuration (Required for emails)
SMTP_SERVER=smtp.mailgun.org
SMTP_PORT=587
SMTP_LOGIN=your_smtp_login
SMTP_PASSWORD=your_smtp_password
SMTP_FROM_ADDRESS=notifications@example.com
# Search (Optional, requires Elasticsearch service)
ES_ENABLED=false
ES_HOST=es
ES_PORT=9200Auto-fetched about 18 hours ago
Auto-fetched about 18 hours ago