How to Setup Grafana Cloud's Epic Free Tier for your Linux VM
So I got a VPS. I love tinkering with these things, and got a sweet discount on Hetzner via a referral code from my new favorite way to deploy apps on a VM — Dokploy. More on this in another blog perhaps!
The VM is a Ubuntu 26.04 LTS instance that I’ve affectionately named sleepysheep. It’s been running super well, but as I started testing and deploying more services (databases, frontends, APIs), I realized I was missing something: observability.
If a container crashes, a database query takes 10 seconds, or Nginx starts spitting out 404s, I would have absolutely no idea until I manually SSH’d in to run docker logs or htop.
A simple solution would be to spin up Prometheus, Loki, and Grafana on the VM itself; but that takes up: CPU, Memory, Disk space, and a lot of my time (which is now only on the weekends to set this up).
That’s when I learnt that Grafana Cloud has an really good free tier. They give you 10,000 metrics, 50 GB of logs, 50 GB of traces, and a bunch of other stuff for free. On top of that, they also host the database backend (Prometheus & Loki), so your VM only has to run a lightweight agent to send metrics to Grafana cloud, and the agent is actually easy to install. They also give you some really nice dashboards ready to use right after you start.
Here is how I set it up, how I ran into some classic permission gotchas, and how I’m admiring these cool dashboards now and then.
Step 1: Getting Started with Grafana Cloud
First, sign up for a free Grafana Cloud account. Once you log in, you’ll land on the main “Get started” page:
Now, we’d like to add our VM as a source of that nice observability data, so from here, we want to head over to the left sidebar, click on Connections, and select Add new connection:
Since I have a Linux VM, Under the “Most popular” section, I selected a Linux Server:
There are so many connectors available to plug into Grafana
Next, we’re required to select our platform and architecture. Since we’d like to add this to a virtual machine (and not a kubernetes cluster 😆🤯), we’ll choose Linux, set the distribution to Debian (which is the one for Ubuntu after a quick google), and the architecture on my VM is Amd64:

Step 2: Creating a Token and Installing Grafana Alloy
To ship metrics and logs to Grafana Cloud, we’ll use Grafana Alloy.
But first, what is Grafana Alloy?
Think of Grafana Alloy as a universal pipeline agent. It is a service that runs quietly in the background on your server, gathering metrics, logs, and traces from your applications and shipping them securely to Grafana Cloud. It officially replaces the old Grafana Agent, bringing OpenTelemetry and Prometheus collection together under a single, flexible collector; and the best part is that it’s super simple to set up:
First, we need to create an authentication token. I named mine sleepysheep to match my VM:
Creating an Authentication token so that only the Alloy agent that we set up can send metrics to Grafana cloud and no one else.
Once you click on Create token, Grafana generates a massive one-liner curl script that downloads, installs, and configures Grafana Alloy automatically:
Once you copy that script, SSH into your VM, and run it, this installer does a few things:
Downloads and installs Grafana Alloy.
Configures the collector with your secret token.
Starts the Alloy service.
Generates a basic config file at
/etc/alloy/config.alloy. (We'll get to this in the next step)
You can verify it’s running with:
sudo systemctl status alloy.serviceStep 3: Configuring the Node Exporter Integration
Now that Alloy is installed, we need to configure it to scrape system metrics (like CPU, memory, and disk) and tail system logs.
In the next screen (below), Grafana gives us a configuration snippet to append to our /etc/alloy/config.alloy file. Here you can choose whether to capture logs as well as whether you’d like to capture only the metrics required for the dashboards they provide. I selected Include logs so that we capture syslog and auth logs! (After enabling this, I realized how many people/bots are trying to hack me via SSH, which is why I ended up securing SSH behind a Tailnet; more on that on another blog perhaps!)
Grafana Alloy configuration file snippet
I opened up /etc/alloy/config.alloy in nano and appended the snippet to the bottom of the file:
Once saved, you’ll need to restart the Alloy service so that the Alloy picks up the configuration changes:
sudo systemctl restart alloy.serviceWe can then go back to the Grafana UI and click on Test connection. Hopefully we will see a nice green success banner!
That wasn’t too hard, was it?
Next we can click on Install to load some really cool pre-configured system dashboards.
If you navigate to the new dashboard, you’ll see live telemetry streaming in. We can see CPU usage, memory, disk space, and even system logs parsed nicely by Loki:
Fleet Overview Dashboard (Helpful if you have multiple nodes/servers)
CPU & System Dashboard
Node Memory Dashboard
Node logs Dashboard (from journald!)
Network Node Interfaces Dashboard
Node Overview Dashboard

Step 4: The Fun Part: Adding the Docker Integration
Monitoring OS metrics is great, but when I was adding the Linux connection, I noticed there was a Docker connector as well. Since I just find Docker to be so cool, I run everything as Docker containers.
To understand CPU usage, memory usage, and get logs in one place, I’ve previously tried tools like Dozzle. If Grafana could do it as easily as installing a connector, it would be really cool.
On that same Add new connection page, selecting Docker:
Under the hood, Grafana Alloy uses cAdvisor.
cAdvisor (Container Advisor) is an open-source daemon developed by Google that analyzes and exposes resource usage and performance data from running containers to collect container metrics and Docker service discovery to parse logs.
To make this work, Alloy needs permission to read the Docker daemon socket (/var/run/docker.sock) and root privileges to let cAdvisor collect resource stats, which makes sense.
The guide tells you how to do that:
Allowing Alloy access
Here’s what each command does:
Give Alloy access to the Docker socket: Add the
alloyuser to thedockergroup.
sudo usermod -a -G docker alloy
The flags:
> -a Add
> -G to a group2. Elevate Alloy’s service permissions: Since cAdvisor requires root privileges, we need to run the Alloy systemd service as root. systemd is the first process and basically your OS's manager, it ensures that processes spin up properly with the right permissions and in the right order, and can automatically restart them if they crash, we talk to systemd via the systemctl CLI:
sudo systemctl edit --full alloy.serviceThis command opens the systemd unit file for Alloy in your default editor. Here we change the User for the Alloy service from Alloy to root.
(A note on security: this would mean that if there was a vulnerability found in Alloy, it could compromise your entire system, but according to Gemini, for tools that require deep infrastructure monitoring (like cAdvisor integrations), running as root is often a necessary tradeoff.)
User=alloy before
Change that to User=root
4. Reload systemd and restart Alloy to apply these changes:
# Tell systemd to read the new changes off the disk
sudo systemctl daemon-reload
# Restart alloy.service
sudo systemctl restart alloy.serviceNow that the permissions are sorted, grab the Docker configuration snippets provided in the UI and append them to /etc/alloy/config.alloy:
Restarting the Alloy service once more to let it pick up the configuration changes:
sudo systemctl restart alloy.serviceNow we can use the cool “Test connection” button, and you’ll hopefully see that the integration is successfully collecting and sending Docker data to Grafana Cloud:
Integration successful!
We can now click Install to add the pre-built Docker dashboards:

Conclusion
Observability goes from a “nice-to-have” to an absolute necessity the second you start hosting your own services.
Using Grafana Cloud’s free tier with Grafana Alloy gives you corporate-grade monitoring and centralized logging without bloating your VM’s CPU and memory footprint. Alloy is super lightweight, and the auto-generated dashboards work perfectly right out of the box.
If you are hosting services on your own VM, I highly recommend spending 15 minutes to set this up. It will save you hours of debugging down the road.
Let me know what you think! Hope you enjoyed this blog post!
Sources: