How to deploy Metabase to make sense of your data

At Clever Cloud we manage most of our own data and when we want to gather a particular information, we open our SQL interpreter and query all the things manually. This somehow worked because most of us are technical but it’s not necessary the case anymore. So we want a nice dashboarding solution to make data available in a nicer way. This is how we came upon Metabase.

What is Metabase? In their own words:

The fastest, easiest way to share data and analytics inside your company.

You can configure different questions/queries/visualisations and organize them in dashboard. Take a look at their documentation to grasp the full extend of what you can do.

You can now integrate Metabase directly from Clever Cloud.

How to deploy Metabase

Metabase is written in java and available as a jar you can download and requires a PostgreSQL database. In Clever Cloud terms it means you will need a Java runtime and a PostgreSQL addon. It’s dead easy to setup. Here’s what you need to do to deploy it:

mkdir metabase # Create a metabase Folder
touch metabase.jar # Create a dummy placeholder file for the jar we will download.
git init # Create the git repository
git add . # Add your files
git commit -m"init" # Create the first commit
clever create --type jar Metabase # Create the java application
clever addon create postgresql-addon --plan m MetabasePG # Create the PostgreSQL instance
clever sevice link-addon MetabasePG # link the addon
clever env set CC_JAR_PATH ./metabase.jar # Configure the jar path
clever env set CC_PRE_BUILD_HOOK 'rm ./metabase.jar && wget -O metabase.jar http://downloads.metabase.com/v0.33.0/metabase.jar' # make sure you download the latest metabase release
clever env set MB_ENCRYPTION_SECRET_KEY `openssl rand -base64 32` # Generate a random key to encrypt the database configuration
clever env set MB_JETTY_PORT  # Tell Metabase to use the port 8080
clever env set MB_DB_TYPE postgres # Tell Metabase to use Postgres instead of the default H2
# Metabase uses it's own environment variables to configure postgres so you have to copy the one we give you:
clever env set MB_DB_DBNAME dbName
clever env set MB_DB_HOST host
clever env set MB_DB_PASS password
clever env set MB_DB_PORT port
clever env set MB_DB_USER user
clever deploy # Deploy the application

Now you should see the logs showing up. Once it’s over you can type clever open and it will take you straight to your Metabase instance. You should see a wizard to help you create your admin user and connect a first database. If you ave set the MB_ENCRYPTION_SECRET_KEY variable, don’t wory the databases credentials you enter in the Metabase will be encrypted.

Now you have a lot of things to do. And there is a lot more you can configure as you will see in their admin guide: Enable Emailing, Slack integration, add new authentication connectors… With that you should be ready to setup and query most of the datasources available to you and produce awesome dahsboards. Happy hacking!

Blog

À lire également

Clever Cloud at VivaTech 2025: demonstration of Clever AI, new partnerships and support for startups

At VivaTech 2025, Clever Cloud is highlighting a number of strategic announcements and innovations in line with its vision of a sovereign, open and resilient cloud. The team will be present in various pavilions, unveiling Clever AI for the first time, presenting a partnership with Grist, an open source data platform, signing a partnership for development in North Africa and stepping up its support for the startup ecosystem.
Company

Grist Labs and Clever Cloud Announce Strategic Partnership to Deliver Sovereign, Scalable Data Solutions in Europe

Grist Labs, creators of the modern, open-source data tool, and Clever Cloud, a leading European Platform-as-a-Service (PaaS) cloud service provider, today announced a strategic partnership to deliver secure, sovereign hosting and streamlined distribution of Grist services across Europe.
Company Press

What is native cloud?

The world of software development is changing at breakneck speed. In an economic environment where digital technology plays an increasingly central role, companies are looking to create applications that are ever more responsive, scalable and resilient.
Company