PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
Zeabur provides a one-click deployment feature for PostgreSQL service, allowing you to deploy a PostgreSQL database on Zeabur in seconds.
At present, Zeabur's PostgreSQL service supports the latest version. More versions of the PostgreSQL service will be supported in the future, so stay tuned.
In your project page, click on Add service button and select Marketplace and then find PostgreSQL in the list.
After selecting PostgreSQL, Zeabur will automatically start deploying your PostgreSQL service.
After you deploy the PostgreSQL service, Zeabur will automatically inject the relevant environment variables into other services.
Sometimes, we can use the self-added
DATABASE_URL to replace the above environment variables, for example:
<DATABASE_NAME> is the name of the database that you added yourself.
By default, the username and database name in Zeabur's PostgreSQL are both
Sometimes you may need to add a
databse to the PostgreSQL service, you can use the following methods to add a database.
pgAdmin (opens in a new tab) is the most popular and feature-rich open-source management and development platform for PostgreSQL. You can use pgAdmin (opens in a new tab) to connect to the PostgreSQL database deployed on Zeabur.
You need to install the pgAdmin client first. Go to pgAdmin's official website (opens in a new tab) to download and follow the instructions to install.
First, you need to click Add New Server and enter the relevant information:
Then, you can add a database in the Databases section.
psql (opens in a new tab) is a terminal-based PostgreSQL tool. It allows you to enter queries interactively, send them to PostgreSQL, and view the query results. In addition, psql (opens in a new tab) provides many shell-like features to facilitate writing scripts and automating various tasks.
To use PSQL, you need to install the PostgreSQL client first. Go to PostgreSQL's official website (opens in a new tab) to download and follow the instructions to install.
After the installation, you may need to restart your computer. You can check if the installation is successful by entering the following command:
You can use psql (opens in a new tab) to connect to the PostgreSQL database deployed on Zeabur by simply entering the following command:
psql -h <POSTGRES_HOST> -p <POSTGRES_PORT> -U <POSTGRES_USERNAME> -W
CREATE DATABASE <DATABASE_NAME>;
Make sure to enter this command in the
postgres=# state to execute it correctly.