A Step-by-Step Guide to Installing Metabase Using Docker on Azure VM

Anshul
2 min readFeb 17, 2024

--

Metabase is an open-source business intelligence tool that allows users to create interactive dashboards and generate insights from their data. Leveraging Docker for deployment simplifies the installation process and facilitates easy management. In this guide, we’ll walk through the steps to install Metabase using Docker on an Azure Virtual Machine (VM).

Prerequisites:
1. An Azure account with an active subscription.
2. An Azure Virtual Machine running a supported Linux distribution.
3. Docker installed on the Azure VM.

Step 1: Connect to Your Azure VM:
- Use an SSH client (e.g., PuTTY) to connect to your Azure VM.

Step 2: Install Docker:
- If Docker is not installed on your VM, you can follow the official Docker installation guide for your Linux distribution.

# Update package list
sudo apt-get update

# Install Docker dependencies
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

# Add Docker's GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg - dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

# Set up the stable Docker repository
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install Docker engine
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io

Step 3: Pull Metabase Docker Image:
- Pull the Metabase Docker image from the official repository.
docker pull metabase/metabase

Step 4: Run Metabase Container:
- Create a Docker container for Metabase, specifying the desired port (e.g., 3000).
docker run -d -p 3000:3000 — name metabase metabase/metabase

Step 5: Access Metabase Web Interface:
- Open a web browser and navigate to `http://<Your_VM_IP>:3000`.
- Follow the Metabase setup wizard to configure the initial admin account and connect Metabase to your database.

Step 6: Persist Data (Optional):
- To persist Metabase data across container restarts, consider using Docker volumes.
docker run -d -p 3000:3000 — name metabase -v /path/on/host:/metabase-data metabase/metabase

Step 7: Access Metabase Dashboard:
- Once configured, log in to Metabase and start creating dashboards and visualizations with your data.

Conclusion:
By following these steps, you’ve successfully installed Metabase on an Azure Virtual Machine using Docker. This approach offers flexibility, scalability, and easy management of your business intelligence platform. Feel free to explore Metabase’s rich features and unleash the power of data visualization for insightful decision-making.

--

--

Anshul

DevRel 🥑 DevOps / Cloud Engineer | Terraform, Ansible, Docker & Kubernetes Enthusiast 🐳 GCP | Jenkins | Terraform Certified