How to Setup PostgreSQL Server for Metabase

You can follow the “this tutorial” to create the ECS instance and steps to connect to your instance. This tutorial assumes that you have created your Alibaba instance and “” is the public IP address assigned to your Ubuntu instance. You have also configured “” to point to your Ubuntu instance. Once you have connected to your instance via SSH, run the following command to update the repository cache and the base system.

apt update && apt -y upgrade && apt -y autoremove

Setup ApsaraDB for PostgreSQL

By default, Metabase is configured to use H2 database. H2 database is a flat file based database and it does not require any special software to run. However, using an H2 database in the multi-user production environment is not recommended as it deteriorates the performance of the application. In this tutorial, we will use the PostgreSQL server from ApsaraDB for RDS to host the Metabase database. Go to “” and create a new RDS instance for PostgreSQL. Choose your subscription type and select region. Creating the RDS instance in the same region where your ECS instance is located gives you many leverages such as ECS and RDS instances can communicate using a private intranet address. We do not require to apply for an internet address and intranet data transfers are free of charge. For this tutorial, I have created the RDS instance in Mumbai region where my ECS instance is also located.

Related Blog Posts

Setting up a PostgreSQL Database on Ubuntu

Related Market Product

Postgres Pro Standard Database 10 (Ubuntu 16)

Related Documentation

Connect to a AnalyticDB for PostgreSQL database

Related Products

AnalyticDB for PostgreSQL

Original Source

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store