{"id":17750,"date":"2026-08-22T07:27:31","date_gmt":"2026-08-22T06:27:31","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=17750"},"modified":"2026-08-22T07:27:32","modified_gmt":"2026-08-22T06:27:32","slug":"how-to-install-grafana-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/","title":{"rendered":"How to install Grafana on Ubuntu?"},"content":{"rendered":"\n<p>Grafana connects to sources such as Prometheus, MySQL, and Elasticsearch, then presents that data as dashboards you can actually read at a glance. It&#8217;s widely used for server and application monitoring because it&#8217;s free, open-source, and works with almost any data backend. Here&#8217;s how to get it installed on Ubuntu.<\/p>\n\n\n\n<p>This guide covers everything from the initial system update to your first login on the Grafana dashboard. There are six steps in total, and you&#8217;ll have Grafana running on Ubuntu once you&#8217;re through them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 1: Update Your System<\/strong><\/h2>\n\n\n\n<p>Refresh your package list before installing anything new. An outdated list occasionally causes version mismatches during installation, so it&#8217;s worth ten seconds now.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n\n\n\n<p>This command pulls the latest package information and brings any outdated packages on your server up to date.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 2: Install the Required Dependencies<\/strong><\/h2>\n\n\n\n<p>A few tools handle repository access and package downloads for Grafana.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install -y apt-transport-https software-properties-common wget curl<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>apt-transport-https<\/strong> \u2013 lets APT fetch packages over a secure connection<\/li>\n\n\n\n<li><strong>software-properties-common<\/strong> \u2013 manages third-party repositories<\/li>\n\n\n\n<li><strong>wget<\/strong> and <strong>curl<\/strong> \u2013 used to download files from the terminal<\/li>\n<\/ul>\n\n\n\n<p>Most Ubuntu systems already have these installed. If a package is already installed, the command won&#8217;t cause any issues \u2014 it just confirms and moves on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 3: Add the Grafana Repository<\/strong><\/h2>\n\n\n\n<p>Grafana isn&#8217;t included in Ubuntu&#8217;s default repositories, so you&#8217;ll need to add it yourself, along with the signing key that confirms the packages are genuine.<\/p>\n\n\n\n<p>Create a keyring directory and download the key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/etc\/apt\/keyrings\/\n\nwget -q -O - https:\/\/apt.grafana.com\/gpg.key | gpg --dearmor | sudo tee \/etc\/apt\/keyrings\/grafana.gpg &gt; \/dev\/null<\/code><\/pre>\n\n\n\n<p>Register the repository with APT:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"deb &#91;signed-by=\/etc\/apt\/keyrings\/grafana.gpg]\nhttps:\/\/apt.grafana.com stable main\" | sudo tee -a\n\/etc\/apt\/sources.list.d\/grafana.list<\/code><\/pre>\n\n\n\n<p>Then refresh the package index so the new source is recognized:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<p><strong>Related Read: <a href=\"https:\/\/www.milesweb.co.uk\/blog\/hosting\/vps\/how-to-run-grafana-with-docker\/\">How to Run Grafana with Docker? (Step-by-Step Guide for Beginners)<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 4: Install Grafana<\/strong><\/h2>\n\n\n\n<p>With the repository registered, installing Grafana is a single command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install grafana -y<\/code><\/pre>\n\n\n\n<p>Grafana pulls in its dependencies and creates the config folders during installation. Take a quick look at the install location to see for yourself:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/grafana &amp;&amp; ls<\/code><\/pre>\n\n\n\n<p>Three items should be present: <strong>grafana.ini<\/strong> (the main configuration file), an LDAP config for directory-based authentication, and a <strong>provisioning <\/strong>folder for dashboards and data sources.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 5: Start and Enable the Service<\/strong><\/h2>\n\n\n\n<p>Bring the service online:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start grafana-server<\/code><\/pre>\n\n\n\n<p>Grafana listens on port 3000 by default. Verify that the service is actually running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status grafana-server<\/code><\/pre>\n\n\n\n<p>You&#8217;re looking for <strong>active (running)<\/strong> in the output. If the status shows anything else, the logs printed just below it usually point to the cause.<\/p>\n\n\n\n<p>To have Grafana start automatically after a reboot, enable it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable grafana-server<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Step 6: Log Into Grafana<\/strong><\/h2>\n\n\n\n<p>Point your browser to your server&#8217;s IP address or hostname on port 3000:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;your-server-ip:3000<\/code><\/pre>\n\n\n\n<p>Log in with the default credentials:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Username:<\/strong> admin<\/li>\n\n\n\n<li><strong>Password:<\/strong> admin<\/li>\n<\/ul>\n\n\n\n<p>Grafana makes you change the password the first time you log in. Choose a stronger one when it prompts you.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Few Important Considerations<\/h2>\n\n\n\n<p>A working install isn&#8217;t the same as a secure or production-ready one. A few things are worth handling before Grafana goes into daily use.<\/p>\n\n\n\n<p>The default admin\/admin login should never stay active longer than it takes to log in and change it. If Grafana needs to be reachable from outside your local network, open port 3000 on the firewall deliberately rather than by accident, and put the instance behind HTTPS instead of serving it over plain HTTP.<\/p>\n\n\n\n<p>On its own, Grafana only draws what it&#8217;s given \u2014 it needs at least one data source, such as Prometheus or MySQL, before the dashboards mean anything. Before editing grafana.ini or the provisioning folder, keep a backup on hand; configuration mistakes are easier to undo than to diagnose.<\/p>\n\n\n\n<p>Like any other service exposed on a server, Grafana should be kept current. Regular updates close known vulnerabilities and bring in whatever improvements the newer releases add.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Grafana connects to sources such as Prometheus, MySQL, and Elasticsearch, then presents that data as dashboards you can actually read at a glance. It&#8217;s widely used for server and application monitoring because it&#8217;s free, open-source, and works with almost any data backend. Here&#8217;s how to get it installed on Ubuntu. This guide covers everything from [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-17750","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-vps-faq"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to install Grafana on Ubuntu?<\/title>\n<meta name=\"description\" content=\"Learn how to install Grafana on Ubuntu, configure the service, and access the dashboard with simple steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install Grafana on Ubuntu?\" \/>\n<meta property=\"og:description\" content=\"Learn how to install Grafana on Ubuntu, configure the service, and access the dashboard with simple steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-22T06:27:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-22T06:27:32+00:00\" \/>\n<meta name=\"author\" content=\"Pravin Dahadade\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pravin Dahadade\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/\",\"name\":\"How to install Grafana on Ubuntu?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2026-08-22T06:27:31+00:00\",\"dateModified\":\"2026-08-22T06:27:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/8ec3f61c42d57dcdfe230b85246842ad\"},\"description\":\"Learn how to install Grafana on Ubuntu, configure the service, and access the dashboard with simple steps.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install Grafana on Ubuntu?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/8ec3f61c42d57dcdfe230b85246842ad\",\"name\":\"Pravin Dahadade\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3dbf83949fba3453ab1d66d34757a110?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3dbf83949fba3453ab1d66d34757a110?s=96&d=blank&r=g\",\"caption\":\"Pravin Dahadade\"},\"description\":\"With an interest in doing something creative daily. I like to write technical blogs related to web hosting, digital marketing, and other IT topics. Also like to spend leisure time on social media to find different strategies for client engagement.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pravin-d\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install Grafana on Ubuntu?","description":"Learn how to install Grafana on Ubuntu, configure the service, and access the dashboard with simple steps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/","og_locale":"en_GB","og_type":"article","og_title":"How to install Grafana on Ubuntu?","og_description":"Learn how to install Grafana on Ubuntu, configure the service, and access the dashboard with simple steps.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2026-08-22T06:27:31+00:00","article_modified_time":"2026-08-22T06:27:32+00:00","author":"Pravin Dahadade","twitter_misc":{"Written by":"Pravin Dahadade","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/","name":"How to install Grafana on Ubuntu?","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2026-08-22T06:27:31+00:00","dateModified":"2026-08-22T06:27:32+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/8ec3f61c42d57dcdfe230b85246842ad"},"description":"Learn how to install Grafana on Ubuntu, configure the service, and access the dashboard with simple steps.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-install-grafana-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to install Grafana on Ubuntu?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/8ec3f61c42d57dcdfe230b85246842ad","name":"Pravin Dahadade","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3dbf83949fba3453ab1d66d34757a110?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3dbf83949fba3453ab1d66d34757a110?s=96&d=blank&r=g","caption":"Pravin Dahadade"},"description":"With an interest in doing something creative daily. I like to write technical blogs related to web hosting, digital marketing, and other IT topics. Also like to spend leisure time on social media to find different strategies for client engagement.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/pravin-d\/"}]}},"views":0,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/17750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=17750"}],"version-history":[{"count":3,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/17750\/revisions"}],"predecessor-version":[{"id":17753,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/17750\/revisions\/17753"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=17750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=17750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=17750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}