Skip to content

Instantly share code, notes, and snippets.

View OrchidLuna's full-sized avatar
😍

Tiffany Lynch OrchidLuna

😍
View GitHub Profile
@OrchidLuna
OrchidLuna / install-mastodon.md
Last active October 7, 2024 13:07
How to install Mastodon in docker (even easier imo, 2024)

I'm assuming you're running the latest version of Ubuntu (24.04) or Debian (12), so the installation of prerequisites will use apt.

  1. Login as root: sudo -i
  2. Install the prerequisites: apt install docker.io docker-compose nginx python3-venv
  3. Create directory for Mastodon: mkdir /opt/mastodon
  4. Enter to Mastodon directory: cd /opt/mastodon
  5. Create directory for Postgres: mkdir postgres14
  6. Create directory for Redis: mkdir redis
  7. Create directory for Mastodon files: mkdir -p public/system
  8. Set owner to Mastodon user (991) for public directory: chown -R 991:991 public
  9. Get docker-compose.yml for Mastodon: wget https://raw.githubusercontent.com/mastodon/mastodon/main/docker-compose.yml