Vultr: Store Vanilla Minecraft Worlds on Decentralized Storage

Learn how to store vanilla Minecraft worlds on decentralized storage.

What is a Vanilla Minecraft Server?

Minecraft is an online sandbox virtual world video game. Users can host and maintain their own personal instances, or servers, of the virtual world and allow other players to join from around the world. Vanilla Minecraft refers to the base version of the game that does not include any modifications or custom packages.

What is Vultr?

Vultr is a cloud infrastructure deployment service that simplifies deploying cloud compute servers. Vultr offers a variety of pre-configured operating systems and software images for easy deployment. Vultr offers four Minecraft images, including Vanilla Minecraft.

Read below to learn how to store vanilla Minecraft worlds on decentralized storage.

Prerequisites:

1. First, we need a Filebase IPFS bucket.

To do this, navigate to console.filebase.com. If you don’t have an account already, sign up, then log in.

2. Select ‘Buckets’ from the left sidebar menu, or navigate to console.filebase.com/buckets.

Select ‘Create Bucket’ in the top right corner to create a new bucket.

3. Enter a bucket name and choose the IPFS storage network to create the bucket.

Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.

4. Login to the Vultr web dashboard.

5. Select the ‘Deploy Server’ button or select the blue plus sign icon in the right upper corner.

6. Select the type of server you’d like to use for your Minecraft server.

When making this decision, consider the number of players you intend to have on your server and the size of the world they will create.

7. Select a server location.

8. For the server image, select ‘Marketplace Apps’, then select Minecraft (Vanilla).

This server image is built using an Ubuntu 20.04 operating system.

9. Select a size for your server.

When making this decision, again consider the player base size and world size. Typically, Minecraft servers use a large amount of RAM memory, so keep that in mind when estimating size.

10. Disable automatic backups.

This backup feature backs up the image to Vultr, and costs an additional hosting fee. We’ll configure automatic backups to Filebase, which offer increased reliability and geo-redundancy while being a fraction of the cost.

11. Provide a label and hostname for your server:

12. Select ‘Deploy Now’ to deploy your server.

13. Once deployed, wait for your instance to change from ‘Installing’ to ‘Running’:

14. Click on the server to bring up the server details.

Take note of the server’s username and password.

15. Open the Web Console of the server:

16. Login to the web console with the username and password for the server.

17. Download and install AWS CLI with the following commands:

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"

unzip awscliv2.zip

./aws/install

18. Configure AWS CLI for use with your Filebase account.

To configure, use the following command:

aws configure

When prompted with your Access Key ID and Secret Key, input your Filebase Access and Secret Keys.

19. Next, download the Minecraft backup script from GitHub.

This tutorial uses a working directory of /home/:

wget https://github.com/nicolaschan/minecraft-backup/releases/latest/download/backup.sh

chmod +x backup.sh

20. Make a new directory to store your backups:

mkdir /home/backups

21. Next, create a new file called minecraft_backup_job.sh. Input the following content:

#!/bin/bash

# Run the backup script
/home/backup.sh -c -i /home/minecraft/server/world -o /home/backups

# Script waits to assure that the backup script finishes:
sleep 120

# Te backup script puts the backup in a tar file using the current date and time that the backup was run.
# To upload the file to Filebase, we need to save the current date as a variable to reference
# Get the current date
DATE=$(date '+%Y-%m-%d')

# Upload the Backup for today to Filebase.
/usr/bin/aws --endpoint https://s3.filebase.com s3 cp $DATE*.tar.gz s3://filebase-ipfs/ --storage-class STANDARD_IA

Replace filebase-ipfs with the name of your Filebase IPFS bucket.

22. Next, set up automation of this script using a cronjob.

Open your crontab with the following command:

crontab -e

23. Add the following line to your crontab to create a cronjob that runs your minecraft_backup_job.sh script:

0 8 * * * /home/minecraft_backup_job.sh

Replace the file path with the correct path for your configuration.

This cronjob is scheduled to run every day at 8:00AM on your server. Configure the cronjob values to reflect your desired configuration.

You’ve now secured your Minecraft server with routine, daily backups to decentralized storage!

Last updated