Skip to content

thinkonezero/mastodon-docker-standup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastodon Docker Standup

This is a comprehensive docker-compose configuration to deploy a self-hosted Mastodon instance on a Synology NAS using the LinuxServer.io images.

🚀 Services

Service Description
Mastodon The core decentralized social networking platform.
PostgreSQL Relational database storage for user data and posts.
Redis In-memory data store used for sidekiq task processing and caching.
Cloudflared Provides a secure tunnel back to your instance (optional).

📋 Prerequisites

🛠️ Setup

  1. Clone the project:
    git clone https://gitlab.com/thinkonezero/mastodon-docker-standup.git
  2. Environment Configuration:
    • Copy sample.env to .env.
    • You must generate secret keys before starting the instance (see below).
  3. Deploy:
    docker-compose up -d

🔑 Generating Required Secrets

Mastodon requires several unique secret keys in your .env file. Run these commands via SSH:

Key Type Generation Command
Secrets & OTP docker run --rm -it -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon secret (Run twice)
VAPID Keys docker run --rm -it -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon mastodon:webpush:generate_vapid_key
Active Record docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon:latest generate-active-record

🌐 Accessing Apps

App Default URL
Mastodon HTTP http://<NAS_IP>:${MASTODON_HTTP_PORT}
Mastodon HTTPS https://<NAS_IP>:${MASTODON_HTTPS_PORT}

⚙️ Environment Variables

Crucial variables for deployment:

  • LOCAL_DOMAIN: Your public domain (e.g., mastodon.example.com).
  • MASTODON_WEB_DOMAIN: Used if your web UI domain differs from your actor domain.
  • CLOUDFLARED_TOKEN: Required if using the Cloudflare Tunnel service.
  • SMTP_*: Required for user registrations and notifications.

If this project has helped you, please consider supporting my work!

ko-fi


Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY.

About

A simple docker-compose based configuration to run your own Mastodon server.

Resources

License

Stars

Watchers

Forks

Contributors