This guide for running a Minima node on Lunix-based VPS-server using docker

Guide was successfully tested on Hetzner Cloud servers: CX21, CPX21, CX31, CPX31, CX41, CPX51

Requirements

There is official minimal requirements for running node:

CPU: 2

RAM: 2GB

SSD: 2GB

OS: Ubuntu 20.04 LTS

 

Installation

Step 1. Create new user

Add a new minima user with a command below, set a password and leave the remaining fields as default:

sudo add user minima

Confirm with -y

Give sudo permissions to new user:

sudo usermod -aG sudo minima

Switch to new user:

su - minima

Step 2. Install Docker

Download the docker install script:

sudo curl -fsSL https://get.docker.com/ -o get-docker.sh

Run the script and make docker install:

sudo chmod +x ./get-docker.sh && ./get-docker.sh

 

Step 3. Add the minima user to the Docker group

You can do it with this command:

sudo usermod -aG docker $USER

Then exit back to original user:

exit

You need to switch to minima user to refresh the groups:

su - minima

Step 4. Start your node

You can do it with command below:

docker run -d -e minima_mdspassword=INSERTPASSWORD -e minima_server=true -v ~/minimadocker9001:/home/minima/data -p 9001-9004:9001-9004 --restart unless-stopped --name minima9001 minimaglobal/minima:latest

Replace INSERTPASSWORD with your own password. Make sure that your password using a-z and 0-9 characters only.
Also this will be the password to access your Minidapp Hub.

Step 6. Make your Docker starts up automatically


sudo systemctl enable docker.service
sudo systemctl enable containerd.service

Step 5. Automate updates

Start a Watchtower container to automatically update Minima when a new version is available:

docker run -d --restart unless-stopped --name watchtower -e WATCHTOWER_CLEANUP=true -e WATCHTOWER_TIMEOUT=60s -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower

Every 24 hours, the Watchtower will check whether there is a new version of Minima and will update if so.

How to access your MiniDapp hub

Go to https://YourServerIP:9003/ in your web browser, click on Advanced, then Proceed.

Then you will see your MiniDapp System (MDS) login page.

Enter your password to login and you will see your MiniDapp hub.

Useful commands

View the logs: docker logs

minima9001

Stop Minima: docker stop

minima9001

Remove your Minima container:

docker rm minima9001

Start the Minima container:

docker start minima9001

Restart the Minima container:

docker restart minima9001

How to remove a node (login as minima user on server):

docker stop minima9001
docker rm minima9001
sudo rm -rf minimadocker9001