Recently MINIMA test network incentives have announced that their current linux nodes need to update and convert them to a docker version of the application.
In this tutorial I will share how to update as simple as possible and those who have never installed MINIMA can also use this tutorial to install nodes on an ubuntu server. I'm using ubuntu version 20.04 and I recommend you to use a vps like contabo, vultr, ovh or onet to run minima, Nodes minima is very light and for example I only use a server with 1 cpu core and 2 gb ram with a 50gb ssd only.
If you haven't join the minima incentive yet, join now by clicking on https://Lihat.info/minima
Let's start with removing any existing minima installation on your server.
sudo wget -O minima_remove.sh https://raw.githubusercontent.com/minima-global/Minima/master/scripts/minima_remove.sh && chmod +x minima_remove.sh && sudo ./minima_remove.sh -p 9001 -x
if you have multiple nodes installation make sure you're changing the port to each of your nodes port.
Next step we'll download docker
sudo curl -fsSL https://get.docker.com/ -o get-docker.sh
Run the docker installation
sudo chmod +x ./get-docker.sh && ./get-docker.sh
if you found like images below, just press CTRL+C on your keyboard. this is not an error, just a reminder that you have already install docker on your system before, no need to reinstall docker :)
Install and run the minima docker, you can change the minima_mdspassword for security :) but in this tutorial i'll use 123 as password to make it easy to follow.
docker run -d -e minima_mdspassword=123 -e minima_server=true -v ~/minimadocker9001:/home/minima/data -p 9001-9004:9001-9004 --restart unless-stopped --name minima9001 minimaglobal/minima:latest
make sure your port already opened. for parameters data, you can check below if you want to custom the script.
-d
: daemon mode, Minima will run in the background-e minima_mdspassword=123
: sets the password for your MiniDapp system to 123. YOU MUST USE A LONG SECURE PASSWORD USING LOWERCASE LETTERS AND NUMBERS ONLY-e minima_server = true
: sets your node type as a server node that receives incoming connections-v ~/minimadocker9001:/home/minima/data
: creates a local folder called minimadocker9001 in your home directory and maps it to the /home/minima/data directory in Docker. The minimadocker9001 folder is where the Minima database and is also where your backups will be stored.-p 9001-9004:9001-9004
: the port number mapping from your server to the Docker container--restart unless-stopped
: ensures your container automatically restarts unless you stop it--name minima9001
: sets the name of your Minima container to minima9001minimaglobal/minima:latest
: specifies where to pull the Minima code from
Once you found like images below, then your minima nodes already active.
Ensure Docker starts up automatically when the server starts
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
Congratulations! Your Node is up and running. Continue to install the Watchtower (use scriptbelow) to automatically update Minima.
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.
Set up your Incentive Program account
If you haven't join the minima incentive yet, join now by clicking on https://Lihat.info/minima
Go to https://YourServerIP:9003/ in your web browser (make sure you are using https protocol, http should not working). then login with your mds password. (in this tutorial i use 123 as mds password)
Open the incentive programs mini DApp
Follow the instructions to login to the Incentive Program website and copy your Incentive ID
Paste your Incentive ID into the field provided and click Update
Congratulations, now your nodes are incentivized :)
If you need to check minima status running or not (this also giving all docker app running data), use this script:
docker ps
you may see the container number.
if you want to restart you can use:
docker restart <container_id>
or you can also stop using:
docker stop <container_id>
and also you can remove images by using:
docker stop <container_id>
docker rm -f <container_id>
Thanks for visiting my tutorial, if you like it, join our community on telegram @codeblocklabs
Subscribe on my Youtube Channel if you want to check new Testnet , Blockchain News, and How To Make Money Programs :)