20241017 ◎

My back has hurt since I last did pull-ups.

Change AWS Lightsail plan

Motivation

I'm using an AWS Lightsail instance with Ubuntu, 2 GB RAM, 2 vCPUs, and 60 GB SSD. The problem is that, 2 GB RAM seem to be a bit too weak to run a Mastodon server.

When I build Docker images, the machine often runs out of memory. When I get many interactions with other servers, the machine sometimes stops working.

I can see that other people run an instance with the specification same as mine and have multiple people signed up for their instances, but I'm not sure how stable their instances are. They may not be using Docker Compose, but I would love to continue using Docker Compose to avoid configuration headaches.

Official documentation does not have any guides on the machine specification required Running your own server - Mastodon documentation

Upgrade AWS Lightsail plan

Change your Lightsail plan | AWS re:Post

To upgrade your Lightsail plan to a larger instance, take a snapshot, and then create a larger instance from the snapshot.

Upsize a Lightsail instance, storage, or database from snapshots

Upgrading a Lightsail instance looks straightforward. I think I better dump the PostgreSQL data and send it to an external computer using the scp command, though it should be in the snapshots.

It's been a while since I used scp command last time :sweat_smile:

Securely Copy database

  1. $ docker exec -it db pg_dump mydb > mydb.sql
  2. Download the SSH key (.pem) from the Lightsail dashboard
  3. scp -i /path/to/your/private-key.pem ubuntu@<instance-public-IP>:/remote/path/to/file /local/path

If something break

I will return 410 Gone to let other Fediverse servers know that my Mastodon server is gone.

AWS Route 53 seems to have a bit different configuration for DNS record management. It seems that I need to create a Hosted zone first, and then I will be able to add DNS records.


Tajin 450 Pasta 400 Chips 450 M&M's 350 Yogurt 350

Total 2000 kcal

4 mi run, push-ups


MUST:

TODO:


index 20241016 20241018