How to Install Grafana to Monitor Your Chia Farm on Ubuntu 20.04

A full Grafana & Prometheus stack to view your Chia farmers, nodes and plotters.

Heres a really quick and easy way of getting Grafana up and running with Prometheus using Docker that will display all the statistics from our Chia nodes and farms.

Grafana is particularly good at what it does and is fully customizable to display the statics you need from your plots and farms. We will be installing Docker and Docker Compose, along with Portainer to view the containers.💪🕶

We are starting with Ubuntu 20.04 fresh install. First make sure you have setup a non root account and give the user sudo privileges. Once thats done we start the docker install

##install prerequisites
sudo apt install apt-transport-https ca-certificates curl software-properties-common

##install Docker GPG keys
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

##add to repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

##update APT
sudo apt update

##install Docker
sudo apt install docker-ce

##add current user to docker group
sudo usermod -aG docker ${USER}

##reboot
sudo reboot

After rebooting docker should be installed and working. Next install docker-compose with this one liner

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Check if all went well..

docker-compose --version

You should see

docker-compose version 1.29.1, build c34c88b2

Or something similar based on your version. If you get permission errors, try this

curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > ~/docker-compose 
chmod +x ~/docker-compose sudo mv ~/docker-compose /usr/local/bin/docker-compose 
docker-compose --version

Next to install Portainer. Do a

docker volume create portainer_data

Then

docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

Open up your browser at http://localhost:9000 and login. select local endpoint.

Back to the terminal, go to a folder you use to store github scripts. Eg, /home/user/Documents/github

cd
git clone https://github.com/retzkek/chiamon.git
cd chiamon
docker-compose up -d

The script will run and the docker images will load. From here all you need to do is go to http://localhost:3000 and login with username: admin and password: admin.

grafana main page
Grafana login page

And thats it you’re done! Be aware that there is no persistence so when you restart your machine the stats will reset! If your install fails make sure you are NOT running docker-compose with sudo, your user MUST be in the docker group!

sudo usermod -aG docker ${USER}

Hello there! My name is Darren and i am a hobbyist/homelab/crypto enthusiast. If you liked this post please consider signing up for a Digital Ocean account using my link and you will receive $100 in free credit while at the same time helping me to cover the costs of my servers. Thank you!

XCH: xch1hrumdza9u6slw5hz343p3yh954wvjs4rqnqdkq6huanctf0vytzqqkahxk
BTC: 1BVwmPMt6kxRe88EKhThJviFp3M4MhubTA
ETH: 0xa958d40518d76168BB795947Bf96AafD6bccc177
LTC: MBJdCsnZXDuXBYme6Ur7VFAeYw4LTFM9CP
BAT: 0xab574A09fFf2aa391658D3D048265ad1401cA7AF
DOGE: DBCchyovcTXSioWM392kKydJxY5nyECYFB
SCP: 9f2feed9f29f3f8035e4ae2a33837ae4affa0a5b5773bcc5a33a4abb041e82e2cccb318c78ef
Share This Guide!