Close Menu
GeekBlog

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    AI Made the Four-Day Week Possible. A Law From 1938 Is What Stands in the Way.

    September 17, 2026

    Apple Watch Series 12 and Ultra 4 Reviews Are In: Here’s What Actually Changed

    September 17, 2026

    A 9-Year-Old Spent $118,000 on YouTube Ads. It Bought 689,828 Views and Almost Nothing Else.

    September 17, 2026
    Facebook X (Twitter) Instagram Threads
    GeekBlog
    • Home
    • Mobile
    • Tech News
    • Blog
    • Gaming
    • Smartwatch
    • How-To Guides
    • AI & Software
    Facebook
    GeekBlog
    Home»Blog»How to Install Grafana on Hostinger VPS (Full Setup)
    Blog

    How to Install Grafana on Hostinger VPS (Full Setup)

    Marcus BennettBy Marcus BennettJuly 30, 2026Updated:July 30, 202613 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    Analytics dashboard on a laptop screen illustrating how to install Grafana on Hostinger VPS
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link

    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.

    Quick answer: On a Hostinger KVM VPS, either pick the Ubuntu 24.04 with Grafana application template in hPanel, or install a plain Ubuntu template and add the official apt repo. Grafana listens on port 3000, first login is admin / admin and forces a password change. Open 3000 in the hPanel firewall to test, then put Nginx and a Let’s Encrypt certificate in front of it and close 3000 again.

    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.

    Updated July 2026: Grafana Labs has consolidated its Docker images. 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 methodPractical RAMDisk to plan forWhat else you needBest for
    Grafana alone, apt repo512 MB minimum, 1 GB comfortable~1 GB plus SQLite growthNothing beyond the OSQuerying data sources that live elsewhere
    Grafana alone, Docker1 GB~2 GB with the image layersDocker engine, a named volumeClean upgrades and rollbacks
    Grafana + Prometheus + node_exporter2 GB, 4 GB if you keep 30 days10–30 GB, driven by retentionTwo more services, scrape configMonitoring the VPS itself
    Grafana + Prometheus + Loki4 GB and up50 GB+ for logsLoki, Promtail or AlloyMetrics and logs in one place
    Grafana with a MySQL or Postgres backend2 GB and upDepends on the databaseMySQL 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 grafana

    Note 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.

    Tip: Use a named volume rather than a bind mount. With a bind mount you have to start the container as a user that can write to the host directory, usually with --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.

    Recommended for you:

    How to Install Minikube on Windows 10 (Step-by-Step)
    Blog·Jul 30, 2026

    How to Install Minikube on Windows 10 (Step-by-Step)

    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-server

    Config 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 certbot

    Certbot 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 = true

    And 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.

    1. Dashboards → New → Import.
    2. Paste the ID or the full grafana.com dashboard URL, then Load.
    3. Rename it, choose a folder, and set a UID if you manage dashboards as code.
    4. Select the data source the dashboard asks for.
    5. 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 = true
    Heads up: If you enable anonymous access, never give the anonymous role anything above Viewer, and put the whole thing behind an IP allowlist in Nginx or the Hostinger firewall. An anonymous Editor is a stranger with query access to your databases.

    A 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.

    Recommended for you:

    How to Launch CyberPanel on Hostinger (VPS Setup Guide)
    Blog·Jul 30, 2026

    How to Launch CyberPanel on Hostinger (VPS Setup Guide)

    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.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email Copy Link
    Previous ArticleHow to Install Minikube on Windows 10 (Step-by-Step)
    Next Article How to Install Minikube on Ubuntu (Complete Guide)
    Marcus Bennett

      Marcus Bennett is GeekBlog's Android expert, covering everything from Google's Pixel line and Samsung Galaxy flagships to OnePlus, Nothing, Xiaomi and the broader Android ecosystem. He follows each Android OS release, One UI and Pixel Feature Drop, custom ROMs and the foldable wave, translating spec sheets and beta builds into hands-on guidance for readers choosing their next Android phone, tablet or wearable.

      Related Posts

      11 Mins Read

      South Carolina vs Michigan: Which State Is Better to Live In?

      11 Mins Read

      Are There Cordless Vacuums With Replaceable Batteries?

      12 Mins Read

      How to Use Parabolic SAR (Stop and Reverse) for Day Trading

      10 Mins Read

      Michigan vs Illinois: Which State Is Better to Live In?

      11 Mins Read

      California or Florida: Which State Is Better to Move To?

      11 Mins Read

      Best Front End Development Books to Learn From in 2026

      Top Posts

      The Mesh Router Placement Strategy That Finally Gave Me Full Home Coverage

      September 9, 20262 Views

      Fox Is Buying Roku for $22 Billion. Here’s What That Really Means for You

      June 24, 20262 Views

      Warcraft III Just Got Its First New Campaign in 23 Years, and It Finally Explains the Undercity

      September 13, 20261 Views
      Stay In Touch
      • Facebook

      Subscribe to Updates

      Get the latest tech news from FooBar about tech, design and biz.

      Most Popular

      How to Convert HEIC to JPG on iPhone, Mac, Android and Windows

      September 3, 20266 Views

      Gal Gadot’s Lawyers Spent Six Months on One AI Clause. Then SAG Called Them for Pointers.

      September 2, 20265 Views

      How to Spot AI Generated Images in 2026 (The Old Tricks Stopped Working)

      September 3, 20263 Views
      Our Picks

      AI Made the Four-Day Week Possible. A Law From 1938 Is What Stands in the Way.

      September 17, 2026

      Apple Watch Series 12 and Ultra 4 Reviews Are In: Here’s What Actually Changed

      September 17, 2026

      A 9-Year-Old Spent $118,000 on YouTube Ads. It Bought 689,828 Views and Almost Nothing Else.

      September 17, 2026

      Subscribe to Updates

      Get the latest creative news from FooBar about art, design and business.

      HEICJPG.online - Convert HEIC to JPG online
      Facebook
      • About Us
      • Contact us
      • Privacy Policy
      • Disclaimer
      • Terms and Conditions
      • Editorial Policy
      • Cookie Policy
      © 2026 GeekBlog

      Type above and press Enter to search. Press Esc to cancel.