{"id":124843,"date":"2025-11-06T08:31:36","date_gmt":"2025-11-06T08:31:36","guid":{"rendered":"\/ph\/tutorials\/how-to-install-grafana-mimir\/"},"modified":"2025-11-06T08:31:36","modified_gmt":"2025-11-06T08:31:36","slug":"how-to-install-grafana-mimir","status":"publish","type":"post","link":"\/ph\/tutorials\/how-to-install-grafana-mimir","title":{"rendered":"How to install Grafana Mimir for scalable metrics storage"},"content":{"rendered":"<p><strong>Grafana Mimir<\/strong> is a high-performance, <strong>Prometheus-compatible backend<\/strong> designed for <strong>scalable, long-term metrics storage<\/strong> and querying. It&rsquo;s ideal for setups where <strong>Prometheus<\/strong> alone can&rsquo;t handle the volume or retention requirements of your metrics. With Grafana Mimir, you can efficiently scale your monitoring system and store vast amounts of metrics data over extended periods.<\/p><p>In this guide, we will show you how to:<\/p><ol class=\"wp-block-list\">\n<li><strong>Install Grafana Mimir on Ubuntu Linux<\/strong>, setting up a monolithic, single binary mode installation.<\/li>\n\n\n\n<li><strong>Configure Grafana Mimir<\/strong> for optimal performance and data storage.<\/li>\n\n\n\n<li><strong>Integrate Prometheus<\/strong> to forward metrics to Grafana Mimir.<\/li>\n\n\n\n<li><strong>Connect Grafana Mimir to Grafana<\/strong> for seamless data visualization.<\/li>\n<\/ol><p>Whether you&rsquo;re testing Grafana Mimir in a lab environment or setting up a small deployment for your system&rsquo;s monitoring, this article will walk you through each step of the process to get everything up and running, ensuring effective metrics storage and visualization.<\/p><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2><p>Before you begin, make sure you have the following:<\/p><ul class=\"wp-block-list\">\n<li>An <strong>Ubuntu 20.04 or newer<\/strong> system (a local server or VPS with sudo access works fine).<\/li>\n\n\n\n<li>Basic experience with the Linux <strong>terminal<\/strong>.<\/li>\n\n\n\n<li>Essential tools like <strong>wget<\/strong>.<\/li>\n\n\n\n<li><a href=\"\/ph\/tutorials\/how-to-install-grafana\"><strong>Grafana<\/strong> installed<\/a> either using a Hostinger VPS template or manually.&nbsp;<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-1-install-dependencies\">1. Install dependencies<\/h2><p>To install Mimir on Ubuntu, you&rsquo;ll need two basic tools: <strong><a href=\"\/ph\/tutorials\/wget-command-examples\">wget<\/a> <\/strong>to download files and <strong>tar <\/strong>to unpack them. You can install both by running <strong>sudo apt update<\/strong> followed by <strong>sudo apt install wget tar -y<\/strong>.<\/p><p>Mimir communicates over several ports, including 9009 and 9095. If Uncomplicated Firewall (UFW), the default firewall service on Ubuntu, is active on your server, run <strong>sudo ufw allow 9009<\/strong> and <strong>sudo ufw allow 9095<\/strong> to make those available.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d45272\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/wget-tar-ufw-steps-1024x614.png\" alt=\"Installing dependencies and opening firewall ports.\" class=\"wp-image-129835\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Port 9009 is where Prometheus sends metrics over regular web traffic for Grafana to read them, while port 9095 is used for Mimir&rsquo;s internal communication between components.<\/p><h2 class=\"wp-block-heading\" id=\"h-2-download-and-install-mimir\">2. Download and install Mimir<\/h2><p>Head to the <a href=\"https:\/\/github.com\/grafana\/mimir\/releases\" target=\"_blank\" rel=\"noopener\">Grafana Mimir releases page<\/a> and grab the latest Linux AMD64 binary, named <strong>mimir-linux-amd64<\/strong>. Copy the link to the file, then run <strong>wget<\/strong> followed by the copied URL. For example:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wget -q --show-progress https:\/\/github.com\/grafana\/mimir\/releases\/download\/mimir-2.15.2\/mimir-linux-amd64<\/pre><p>Once downloaded, move the binary to a location in your system&rsquo;s PATH environment variable. You can rename it while moving it to keep things clean:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo mv mimir-linux-amd64 \/usr\/local\/bin\/mimir<\/pre><p>Then make it an executable with:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo chmod +x \/usr\/local\/bin\/mimir<\/pre><p>To verify the install, run <strong>mimir &ndash;version<\/strong>. If you see version info, the binary is good to go.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d46c29\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/download-install-mimir-1024x130.png\" alt=\"Downloading latest Mimir binary and installing it.\" class=\"wp-image-129837\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-3-configure-mimir\">3. Configure Mimir<\/h2><p>Mimir is designed to run as a collection of services. Each service handles a different job, like storage, querying, or ingestion. But for some setups, especially when you&rsquo;re just getting started, running it in <strong>single-binary mode<\/strong> makes life easier. This mode combines everything into one executable, so you don&rsquo;t have to wire up multiple components.<\/p><p>To run Mimir in single-binary mode, you&rsquo;ll need a basic <strong>configuration file<\/strong> written in YAML. Create one at <strong>\/etc\/mimir\/mimir.yaml<\/strong> using the command below:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo mkdir -p \/etc\/mimir\n\nsudo tee \/etc\/mimir\/mimir.yaml &gt; \/dev\/null &lt;&lt;EOF\n\nserver:\n\n&nbsp;&nbsp;http_listen_address: 0.0.0.0\n\n&nbsp;&nbsp;http_listen_port: 9009\n\nlimits:\n\n&nbsp;&nbsp;max_label_name_length: 1024\n\n&nbsp;&nbsp;max_label_value_length: 2048\n\n&nbsp;&nbsp;max_label_names_per_series: 30\n\nblocks_storage:\n\n&nbsp;&nbsp;backend: filesystem\n\n&nbsp;&nbsp;filesystem:\n\n&nbsp;&nbsp;&nbsp;&nbsp;dir: \/var\/lib\/mimir\n\nmemberlist:\n\n&nbsp;&nbsp;bind_addr:\n\n&nbsp;&nbsp;&nbsp;&nbsp;- 127.0.0.1\n\ningester:\n\n&nbsp;&nbsp;ring:\n\n&nbsp;&nbsp;&nbsp;&nbsp;replication_factor: 1\n\nEOF<\/pre><p>Pay attention to three sections in the config:<\/p><ul class=\"wp-block-list\">\n<li><strong>Server<\/strong> block sets the port. Typically, <strong>0.0.0.0:9009<\/strong> is a default value.<\/li>\n\n\n\n<li>The <strong>Limits<\/strong> section helps control resource use. This is especially useful on smaller servers.<\/li>\n\n\n\n<li>The <strong>Blocks storage<\/strong> block tells Mimir where to keep your metrics. In our case, we set Mimir to store data locally.<\/li>\n\n\n\n<li>The <strong>Memberlist<\/strong> block configures internal service discovery and communication. Here we define the network interface that Mimir uses for internal traffic.<\/li>\n\n\n\n<li>The<strong> Ingester ring<\/strong> sets the number of ingesters to which each time series is replicated. Since our setup is on a single machine, we need to specify one.<\/li>\n<\/ul><p>You will point Mimir to this file using the<strong> -config.file<\/strong> flag in the launch command later.<\/p><h2 class=\"wp-block-heading\" id=\"h-4-start-mimir-automatically\">4. Start Mimir automatically<\/h2><p>Since you&rsquo;ve installed Mimir from a binary, you need to manually add a <strong>systemd<\/strong> service to run it in the background and make sure it starts on boot.<\/p><p>Create a new file at <strong>\/etc\/systemd\/system\/mimir.service<\/strong> and add:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[Unit]\nDescription=Grafana Mimir\n\nAfter=network.target\n\n[Service]\n\nType=simple\n\nUser=root\n\nExecStart=\/usr\/local\/bin\/mimir --config.file=\/etc\/mimir\/mimir.yaml\n\nRestart=on-failure\n\n[Install]\n\nWantedBy=multi-user.target<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d48180\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/systemd-mimir-process-1024x306.png\" alt=\"System service configuration file for Mimir.\" class=\"wp-image-129838\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Then, reload <strong>systemd<\/strong> to pick up the new file:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl daemon-reexec<\/pre><p>Enable the service and start it:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl enable mimir\n\nsudo systemctl start mimir<\/pre><p>Check if it&rsquo;s running with:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl status mimir<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d49808\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/mimir-process-running-1024x256.png\" alt=\"System service for Mimir is active and running.\" class=\"wp-image-129839\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Mimir will stay up and automatically start after your machine reboots.<\/p><h2 class=\"wp-block-heading\" id=\"h-5-connect-prometheus-to-mimir\">5. Connect Prometheus to Mimir<\/h2><p>If you already have Prometheus set up, you can forward its metrics to Mimir for long-term storage by adding a <strong>remote_write<\/strong> block to your Prometheus config.<\/p><p>Open your <strong>\/etc\/prometheus\/prometheus.yml<\/strong> file and add this section near the bottom:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">remote_write:\n\n&nbsp;&nbsp;- url: http:\/\/localhost:9009\/api\/v1\/push\n\n&nbsp;&nbsp;&nbsp;&nbsp;headers:\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X-Scope-OrgID: anonymous<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d4ac4c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/prometheus-config-1024x193.png\" alt=\"Prometheus configuration to forward metrics to Mimir.\" class=\"wp-image-129840\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>This tells Prometheus where to forward the data it collects. If Prometheus and Mimir are on different machines, you&rsquo;ll need to change <strong>localhost<\/strong> to the actual IP address of your Mimir server.<\/p><p>After saving the file, <strong>restart Prometheus<\/strong> for the change to take effect:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo systemctl restart prometheus<\/pre><p>After the restart, inspect the logs. Look for messages that show metrics are being pushed via <strong>remote_write<\/strong>. Once connected, Prometheus will start sending data to Mimir automatically.<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">journalctl -u prometheus -f<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d4c2b1\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/prometheus-remote-push-1024x316.png\" alt=\"Successful log from Prometheus pushing metrics to Mimir.\" class=\"wp-image-129841\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-6-add-mimir-to-grafana\">6. Add Mimir to Grafana<\/h2><p>To visualize your metrics, connect Mimir to Grafana using the <strong>Prometheus<\/strong> data source type. Although Mimir is a separate project, it&rsquo;s fully compatible with the Prometheus API, so you won&rsquo;t need any custom plugin.<\/p><p>In Grafana, navigate to <strong>Connections &rarr; Data Sources<\/strong>, then click <strong>Add data source<\/strong> and select <strong>Prometheus<\/strong>.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d4d7a8\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/add-data-source-1024x386.png\" alt=\"Adding a new data source in Grafana.\" class=\"wp-image-129842\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>In the <strong>URL<\/strong> field, enter:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">http:\/\/localhost:9009\/prometheus<\/pre><p>In the <strong>HTTP Headers<\/strong> section, add the following:<\/p><ul class=\"wp-block-list\">\n<li>Header:<strong> X-Scope-OrgID<\/strong><\/li>\n\n\n\n<li>Value: <strong>anonymous<\/strong><\/li>\n<\/ul><p>The header is required because Mimir uses multi-tenancy by default. Without the <strong>X-Scope-OrgID<\/strong> header, your queries will be rejected with a <strong>401 Not authorized<\/strong> error.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d4ee5a\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/grafana-add-data-source-1024x626.png\" alt=\"Prometheus data source configuration for Mimir.\" class=\"wp-image-129843\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Scroll down and click <strong>Save &amp; Test<\/strong>. If Mimir is set up correctly and Prometheus is pushing data, Grafana will display a success message confirming the connection.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d50297\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/grafana-success-data-source-1024x186.png\" alt=\"Successfully saving and testing the Mimir data source.\" class=\"wp-image-129844\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-7-test-the-installation\">7. Test the installation<\/h2><p>Open Grafana and go to the <strong>Explore<\/strong> tab to confirm that Mimir is receiving and storing metrics correctly. At the top, make sure the data source is set to <strong>Mimir<\/strong>. In the <strong>Metric <\/strong>field, select the <strong>up <\/strong>metric and click <strong>Run query<\/strong>.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e08a3d51761\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/www.hostinger.com\/tutorials\/wp-content\/uploads\/sites\/2\/2025\/06\/grafana-explorer-test-1024x624.png\" alt=\"Grafana Explorer test metric for Mimir data source.\" class=\"wp-image-129845\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If Prometheus is pushing metrics, you&rsquo;ll see the status of the Prometheus instance itself. This confirms that Mimir is storing metrics and that Grafana can read them.<\/p><p>If the query returns no data and you have configured the <strong>remote_write <\/strong>block correctly, double-check that both Prometheus and Mimir are running, or try restarting the services using <strong>sudo systemctl restart prometheus<\/strong> and <strong>sudo systemctl restart mimir<\/strong> commands.<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>You&rsquo;ve now set up a working observability pipeline with Grafana Mimir at the core. You installed Mimir on an Ubuntu Linux server, configured it to run in single binary mode, connected Prometheus to forward metrics, and visualized the data in Grafana.<\/p><p>This gives you a solid starting point to explore Mimir and understand how it fits into a Prometheus-based monitoring stack.<\/p><p>From here, you can scale things up by separating Mimir&rsquo;s components, switching to object storage, or adding alerting and recording rules. To complete your observability setup with log aggregation and search, consider <a href=\"\/ph\/tutorials\/how-to-install-loki\">installing Loki<\/a> &ndash; Grafana&rsquo;s logging system that pairs seamlessly with Mimir.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-grafana-mimir-faq\">How to install Grafana Mimir FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1750166250365\"><h3 class=\"schema-faq-question\">What is Mimir?<\/h3> <p class=\"schema-faq-answer\">Grafana Mimir stores and manages Prometheus metrics at scale, preventing overload on local setups. It integrates with Grafana, supports PromQL, and is built for large environments. Mimir is ideal for reliable metrics storage across multiple systems or users.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1750166257616\"><h3 class=\"schema-faq-question\">What is Grafana Mimir used for?<\/h3> <p class=\"schema-faq-answer\">Grafana Mimir helps scale Prometheus metrics beyond a single server, storing large data volumes, supporting multiple users, and simplifying metric management. When paired with Grafana, it powers dashboards and enables long-term system monitoring.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1750166267437\"><h3 class=\"schema-faq-question\">Can I use Grafana Mimir without Prometheus?<\/h3> <p class=\"schema-faq-answer\">Grafana Mimir can&rsquo;t replace Prometheus because Mimir doesn&rsquo;t collect metrics on its own &ndash;&nbsp; it works alongside it. It&rsquo;s made to store and query data sent from Prometheus or similar tools. If you don&rsquo;t use Prometheus, you&rsquo;ll need another system that can send metrics in the same format.<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>Grafana Mimir is a high-performance, Prometheus-compatible backend designed for scalable, long-term metrics storage and querying. It&rsquo;s ideal for setups where Prometheus alone can&rsquo;t handle the volume or retention requirements of your metrics. With Grafana Mimir, you can efficiently scale your monitoring system and store vast amounts of metrics data over extended periods. In this guide, [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ph\/tutorials\/how-to-install-grafana-mimir\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":534,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to install Grafana Mimir on Linux","rank_math_description":"Learn how to install and configure Grafana Mimir on Linux. Set up Prometheus integration and view metrics in Grafana.","rank_math_focus_keyword":"install mimir","footnotes":""},"categories":[22643,22639],"tags":[],"class_list":["post-124843","post","type-post","status-publish","format-standard","hentry","category-managing-monitoring-and-security","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-install-grafana-mimir","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-install-grafana-mimir","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-install-grafana-mimir","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-install-grafana-mimir","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-install-grafana-mimir","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-install-grafana-mimir","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-install-grafana-mimir","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-install-grafana-mimir","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts\/124843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/users\/534"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/comments?post=124843"}],"version-history":[{"count":0,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/posts\/124843\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/media?parent=124843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/categories?post=124843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ph\/tutorials\/wp-json\/wp\/v2\/tags?post=124843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}