To install Grafana on Hostinger you need a VPS. Grafana is a compiled Go binary that runs as a long-lived service and listens on its own TCP port, so shared hosting cannot host it at all. On a Hostinger KVM VPS you have two clean routes: the one-click Grafana Docker template, or the official apt repository on a plain Ubuntu box.
Grafana 13 shipped at GrafanaCON in April 2026, so anything you install today from the official channels is on that line. The install itself is fifteen minutes. What takes longer, and what most guides skip, is the part where you stop exposing an admin dashboard on a raw IP over plain HTTP. This walkthrough covers both.
Why shared hosting is a dead end for Grafana
Shared hosting runs PHP scripts under a web server it controls. It does not let you register a systemd unit, bind an arbitrary port, or keep a process alive between requests. Grafana needs all three. It also wants its own database, SQLite by default, living at /var/lib/grafana/grafana.db.
Grafana’s own documentation puts the floor at 1 CPU core and 512 MB of RAM. That is genuinely minimal, and it assumes Grafana alone. The moment you add Prometheus scraping a few targets with any retention, you want more. Every Hostinger KVM plan starts at 4 GB, so RAM is not your constraint here. Disk for time-series retention is.
Step 1: Pick your install method
Hostinger publishes Grafana as an application template built on Ubuntu 24.04, alongside separate templates for Grafana Loki and Grafana Tempo. In hPanel, go to VPS → Manage for your server, then OS & Panel → Operating System, and look under the application templates for Grafana. You can also pick it during first-time VPS setup. The template deploys Grafana in Docker with Hostinger’s Docker manager available in the panel for logs and updates.
grafana/grafana is now the image to pull for Grafana OSS. The old grafana/grafana-oss repository stopped receiving updates from version 12.4.0 onward. If you have a compose file pinned to grafana-oss, change it.| Install method | Practical RAM | Disk to plan for | What else you need | Best for |
|---|---|---|---|---|
| Grafana alone, apt repo | 512 MB minimum, 1 GB comfortable | ~1 GB plus SQLite growth | Nothing beyond the OS | Querying data sources that live elsewhere |
| Grafana alone, Docker | 1 GB | ~2 GB with the image layers | Docker engine, a named volume | Clean upgrades and rollbacks |
| Grafana + Prometheus + node_exporter | 2 GB, 4 GB if you keep 30 days | 10–30 GB, driven by retention | Two more services, scrape config | Monitoring the VPS itself |
| Grafana + Prometheus + Loki | 4 GB and up | 50 GB+ for logs | Loki, Promtail or Alloy | Metrics and logs in one place |
| Grafana with a MySQL or Postgres backend | 2 GB and up | Depends on the database | MySQL 8.0+ or PostgreSQL 12+ | Multiple Grafana instances or HA |
Step 2: Install Grafana with Docker
If you deployed a plain Ubuntu 24.04 template, install Docker first, then run Grafana with a named volume so your dashboards survive a container replacement. The run command is written on one line deliberately, so you can paste it without worrying about line continuations.
ssh root@your-vps-ip
apt update && apt -y upgrade
apt -y install docker.io docker-compose-v2
docker volume create grafana-storage
docker run -d -p 127.0.0.1:3000:3000 --name=grafana --restart=unless-stopped --volume grafana-storage:/var/lib/grafana grafana/grafana
docker logs -f grafanaNote the 127.0.0.1:3000:3000 binding. That publishes the port on loopback only, so Grafana is reachable from Nginx on the same box but not from the public internet. If you want to test from your laptop before setting up the proxy, use -p 3000:3000 instead and remember to change it back.
--user "$(id -u)", and getting that wrong is the single most common reason a fresh Grafana container exits immediately.Step 3: Or install Grafana from the apt repository
The package route gives you a systemd service, config in a normal place, and updates through apt upgrade. These are the current commands from Grafana’s Debian and Ubuntu documentation.
apt-get install -y apt-transport-https wget gnupg
mkdir -p /etc/apt/keyrings
wget -O /etc/apt/keyrings/grafana.asc https://apt.grafana.com/gpg-full.key
chmod 644 /etc/apt/keyrings/grafana.asc
echo "deb [signed-by=/etc/apt/keyrings/grafana.asc] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list
apt-get update
apt-get install -y grafana
systemctl daemon-reload
systemctl enable --now grafana-server
systemctl status grafana-serverConfig lives at /etc/grafana/grafana.ini. Data lives at /var/lib/grafana. Never edit conf/defaults.ini, which is overwritten on upgrade.
Step 4: Open port 3000 (temporarily) in the Hostinger firewall
Hostinger’s managed firewall sits outside the VPS and is off by default. To reach Grafana directly for a first look, go to the VPS section in hPanel, select your server, then Security → Firewall. Create a firewall group with Add Firewall, edit it, and add an accept rule for TCP port 3000:3000. Set the traffic source to custom and enter your own IP rather than leaving it open to anywhere. Then toggle the firewall active for that VPS.
Once the reverse proxy in step 6 is working, delete that rule. There is no good reason to leave an admin UI listening on a numbered port on the public internet.
Step 5: First login and changing the default port
Browse to http://your-vps-ip:3000. The default credentials are admin / admin, and Grafana prompts you to set a new password on first login. Do it, and use a password manager. On Hostinger’s Grafana template you set the password during provisioning instead.
To move Grafana off 3000, edit the [server] section of /etc/grafana/grafana.ini:
[server]
http_addr = 127.0.0.1
http_port = 3001
domain = grafana.example.com
root_url = %(protocol)s://%(domain)s/Then systemctl restart grafana-server. In Docker you change the published port instead, or set GF_SERVER_HTTP_PORT as an environment variable. Every grafana.ini setting has an environment-variable equivalent in the form GF_<SECTION>_<KEY>.
Step 6: Put Nginx and a Let’s Encrypt certificate in front
Point an A record for grafana.example.com at your VPS IP first, then install Nginx and Certbot with apt -y install nginx certbot python3-certbot-nginx and create a server block at /etc/nginx/sites-available/grafana.
Grafana uses WebSockets for its live features, so the proxy needs the upgrade headers on /api/live/. This is the shape Grafana’s own reverse-proxy guide recommends:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream grafana {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name grafana.example.com;
location / {
proxy_set_header Host $host;
proxy_pass http://grafana;
}
location /api/live/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_pass http://grafana;
}
}ln -s /etc/nginx/sites-available/grafana /etc/nginx/sites-enabled/
nginx -t && systemctl reload nginx
certbot --nginx -d grafana.example.com
systemctl list-timers | grep certbotCertbot rewrites the server block for TLS and installs a renewal timer. Set domain = grafana.example.com in grafana.ini so generated links and OAuth redirects use the real hostname, then remove the port 3000 firewall rule.
Serving Grafana from a sub-path
If you want example.com/grafana/ rather than a subdomain, both sides have to agree. In grafana.ini:
[server]
domain = example.com
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana/
serve_from_sub_path = trueAnd in Nginx, proxy location /grafana/ with a rewrite that strips the prefix, and repeat the block for /grafana/api/live/ with the WebSocket headers. Getting one of those two halves wrong is the classic cause of the blank-page error covered below.
Step 7: Add Prometheus as a data source
Install Prometheus and node_exporter on the same VPS if the goal is monitoring the server itself, then wire it up in Grafana under Connections → Data sources → Add new data source → Prometheus. Set the Prometheus server URL to http://localhost:9090 and click Save & test. You should see a success message naming the Prometheus version.
If Grafana is in Docker and Prometheus is on the host, localhost resolves inside the container and will fail. Use http://host.docker.internal:9090 with the matching --add-host flag, or put both containers on one Docker network and use the service name. This is the same class of networking gotcha you hit inside Kubernetes, and if you want to practice it locally, our guides to installing Minikube on Ubuntu and installing Helm in Minikube are a cheap sandbox.
Step 8: Import a dashboard by ID
You do not need to build panels by hand. Go to Dashboards → New → Import, paste a numeric dashboard ID from grafana.com into the URL-or-ID field, click Load, pick your Prometheus data source, and click Import. The classic starting point for a Linux box is the Node Exporter Full dashboard, ID 1860.
- Dashboards → New → Import.
- Paste the ID or the full grafana.com dashboard URL, then Load.
- Rename it, choose a folder, and set a UID if you manage dashboards as code.
- Select the data source the dashboard asks for.
- Import, then fix any panel that shows “No data” by checking the metric names match your exporter version.
Should you enable anonymous access?
Usually no. Anonymous access is genuinely useful for a wall-mounted status screen or a public status page, and genuinely dangerous otherwise, because Grafana data sources often hold credentials and the Explore view can query anything the data source can reach.
[auth.anonymous]
enabled = true
org_role = Viewer
[auth.basic]
enabled = true
[users]
viewers_can_edit = false
[security]
disable_gravatar = true
cookie_secure = trueA safer pattern for sharing one chart is a public dashboard or a snapshot, both of which expose a single view instead of the whole instance.
Troubleshooting
“If you’re seeing this Grafana has failed to load its application files”
This message means the browser loaded Grafana’s HTML shell but could not fetch its JavaScript bundles. In almost every case it is a path mismatch, not a broken install. Check three things in order. First, root_url in grafana.ini must match the URL you actually type, including scheme and any sub-path. Second, if you are on a sub-path, serve_from_sub_path = true must be set and Nginx must strip the prefix. Third, open your browser devtools network tab and look at where the failing requests for Grafana’s JavaScript bundles under /public/build/ are pointing. A 404 on those paths tells you exactly which half of the config is wrong. Ad blockers and a stale service worker cache cause a small minority of cases, so try a private window before rewriting configs.
Port 3000 refuses connections
Check the service is up with systemctl status grafana-server or docker ps, then confirm something is listening with ss -tlnp | grep 3000. If it is bound to 127.0.0.1 you cannot reach it remotely by design. If it is bound to 0.0.0.0 and still unreachable, the block is the Hostinger firewall or ufw inside the VPS. Remember that Hostinger’s firewall must be toggled active, and that a group with no accept rule for a port drops it.
Grafana won’t start after an edit
Run journalctl -u grafana-server -n 50 --no-pager. A typo in grafana.ini, a duplicated section header, or a port already in use will all show up in those lines. For Docker, docker logs grafana gives the same information, and a permission error on /var/lib/grafana means your bind mount is owned by the wrong user.
You lost the admin password
Reset it from the CLI on the server with grafana-cli admin reset-admin-password newpassword. In Docker, run the same command through docker exec -it grafana grafana-cli admin reset-admin-password newpassword.
Frequently asked questions
Can I install Grafana on Hostinger shared hosting?
No. Grafana is a compiled binary that runs as a persistent service on its own port, and shared hosting only executes PHP under a web server you do not control. There is no workaround, no PHP port, and no plugin route. The entry-level KVM 1 VPS is the cheapest place it will actually run.
Does Hostinger have a one-click Grafana template?
Yes. Hostinger lists Grafana as a Docker application template on Ubuntu 24.04, with separate templates for Grafana Loki and Grafana Tempo. You select it in hPanel under VPS → Manage → OS & Panel → Operating System, or during initial setup. Changing template reinstalls the server and wipes existing data.
How much RAM does Grafana need?
Grafana’s documented minimum is 512 MB of RAM and one CPU core, which is enough when it only queries data sources hosted elsewhere. Add Prometheus and node_exporter on the same box and 2 GB is a realistic floor. Add Loki for logs and plan on 4 GB or more.
How do I change Grafana’s default port from 3000?
Set http_port in the [server] section of /etc/grafana/grafana.ini and restart grafana-server. In Docker, change the published port in your run command or set the GF_SERVER_HTTP_PORT environment variable. Update root_url to match.
Can I run Grafana alongside a control panel on the same VPS?
Yes. Grafana on 3000 does not conflict with a panel on 8090, though both will want ports 80 and 443 for their own proxies, so pick one to own Nginx. Our guide to launching CyberPanel on Hostinger covers that side, and on 4 GB you should expect it to be tight.
Is Grafana a replacement for Google Analytics?
No, they answer different questions. Grafana visualizes infrastructure and application metrics you collect yourself. Product and marketing analytics are a separate stack, which is what using Google Analytics for marketing deals with. Plenty of teams run both and never join the data.
Wrapping up
Use the Hostinger Grafana template if you want dashboards in ten minutes, and the apt repository if you want a plain systemd service you fully understand. Either way, the part that actually matters comes after the install: bind Grafana to loopback, terminate TLS in Nginx with a Let’s Encrypt certificate, close port 3000 in the firewall, and change the admin password before you connect a single data source.
After that, adding Prometheus and importing dashboard 1860 takes about five minutes and gives you CPU, memory, disk and network graphs for the VPS itself. From there you’re building, not installing. The official Grafana installation docs and the grafana.ini configuration reference are the two pages worth bookmarking, since option names do shift between major versions.

