1
mirror of https://github.com/jakejarvis/mastodon-utils.git synced 2025-04-26 04:35:21 -04:00
mastodon-utils/README.md

5.2 KiB

🦣 Mastodon utilities

Random opinionated helper scripts & front-end customizations for my personal Mastodon instance (running on glitch-soc).

⚠️ You definitely don't want to use any of this as-is. Check out my more general-purpose scripts instead.

Notes

The wiki of this repo and the /etc folder are simply my way of not forgetting how I did something, which I do quite a bit. Refer there for random notes on PgBouncer, Grafana, etc. but DO NOT BLINDLY COPY & PASTE anything there without doing your own research!

Usage

AGAIN, DEFINITELY DO NOT JUST RUN THIS IF YOU'RE NOT ME!!! 😊

git clone https://github.com/jakejarvis/mastodon-utils.git /home/mastodon/utils && cd /home/mastodon/utils

# install Mastodon on fresh Ubuntu 20.04:
./scripts/install.sh

# back up Postgres, Redis, and secrets:
./scripts/backup.sh

# pull latest Mastodon (vanilla or glitch-soc) and apply patches from this repo:
./scripts/upgrade.sh

Scripts

  • init.sh: A small helper that runs at the very beginning of each script below to initialize rbenv and set consistent environment variables.
    • Optional: To make your life easier, you can also source this script from the .bashrc of the mastodon user and/or whichever user you regularly SSH in as:
if [ -f /home/mastodon/utils/init.sh ]; then
  . /home/mastodon/utils/init.sh
fi
  • version.sh: Tests init.sh by printing Mastodon, Ruby, and rbenv versions.

Periodic tasks

Dangerous

The following scripts are highly opinionated, catastrophically destructive, and very specific to me. Check them out line-by-line instead of running them.

Patches

Vanilla and glitch-soc:

glitch-soc only:

License

MIT