You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dump_stack() 86a52f0163
Keep username/email in response
3 weeks ago
auth Keep username/email in response 3 weeks ago
patches Add max_toot_chars to API v1 4 weeks ago
.gitignore Initial 4 weeks ago
LICENSE Initial 4 weeks ago Installation notes 4 weeks ago
branding.nix Fix branding generation 4 weeks ago
configuration.nix Unused 4 weeks ago
disable-services.nix Switch to Caddy 4 weeks ago
mastodon.nix Auth API 3 weeks ago
secrets.nix.example Auth API 3 weeks ago

Installation notes

  1. Prepare the new machine (man nixos)
git clone /mnt/etc/nixos
nixos-generate-config --root /mnt
sed -i 's/imports = \[/imports = \[\n.\/disable-services.nix/' /mnt/etc/nixos/configuration.nix
vim /mnt/etc/nixos/secrets.nix
nixos-install --no-root-password
  1. Change DNS A record

  2. Dump the database on the old machine

systemctl stop 'mastodon-*'
su - mastodon
pg_dump -Fc mastodon_production -f backup.dump
  1. Load the database and start the server
sudo -u mastodon pg_restore -Fc -U mastodon -n public --no-owner --role=mastodon -d mastodon backup.dump
sed -i '/disable-services/d' /etc/nixos/configuration.nix
nixos-rebuild switch
su - mastodon -s "$(which bash)" -c 'mastodon-env tootctl feeds build'