Hosting Mastodon on latest Oracle Cloud free powerful ARM instance
Currently this repo is updated to use Mastodon v3.4.1
and corresponding Elasticsearch v7.10.1
- Go to page https://cloud.oracle.com/compute/instances/create
- Fill in instance name, such as
mastodon
- Edit
Image and shape
, make sure to chooseVM.Standard.A1.Flex
with the CPU cores and memory size you need, max 4 cores and 24G memory - Edit
Image and shape
, make sure to choose the right image, support bothOracle Linux
as well asUbuntu
none minimal version. In this guide, assumptionUbuntu
is used - Double check step 3 and 4, as sometimes updating one of them will automatically change another's settings, making sure you have chosen the right image and shape
- (Optional) Tick
Specify a custom boot volume size
, and enter volume size, maximum 200G, or leave it as it is and create a data volume later - Click on
Create
Use your common SSH method to connect to your instance. You can find the public IP address by going to https://cloud.oracle.com/compute/instances and choose the instance you have just created. In the details page, you will see you public IP address on the right hand side.
- Following the official guide at https://docs.docker.com/engine/install/ubuntu/, make sure to choose
arm64
during the process. - Download the latest v2 docker compose CLI at https://github.com/docker/compose-cli#compose-v2-aka-local-docker-compose, after that run
docker compose
to make sure it is working
- Clone this repo,
git clone https://github.com/xmflsct/oracle-arm-mastodon.git
- Go into
mastodon
folder and clone the Mastodon repo,cd mastodon
andgit clone https://github.com/tootsuite/mastodon.git
- Checkout to latest version of Mastodon,
git checkout tags/v3.4.1
- To use full-text search and optimising for Chinese content, follow instructions of how to update source code before building the docker image
- Go back to the root folder by
cd ..
- Update
./caddy/Caddyfile
to your domain name. Before Caddy can request for SSL certificates successfully, make sure your domain is not behind Cloudflare or such at this moment - Run
docker compose build
- If build is successful, you can run
docker compose up -d
now!