Skip to main content

The PostgreSQL relational database system is a powerful, scalable, and standards-compliant open-source database platform. It is designed to handle a range of workloads, from single machines to data warehouses or Web services with many concurrent users.

Note: This Marketplace App deploys 3 Compute Instances to create a highly available and redundant PostgreSQL cluster, each with the plan type and size that you select. Please be aware that each of these Compute Instances will appear on your invoice as separate items. To instead deploy PostgreSQL on a single Compute Instance, see Deploy PostgreSQL through the Linode Marketplace.

Deploying a Marketplace App

The Linode Marketplace allows you to easily deploy an application cluster on Compute Instances using the Cloud Manager. See Get Started with Marketplace Apps for complete steps.

  1. Log in to the Cloud Manager and select the Marketplace link from the left navigation menu. This displays the Linode Create page with the Marketplace tab pre-selected.
  2. Under the Select App section, select the cluster app you would like to deploy. Marketplace Apps that are deployed as clusters have a cluster label next to the app’s name.
  3. Complete the form by following the steps and advice within the Creating a Compute Instance guide. Depending on the Marketplace App you selected, there may be additional configuration options available. See the Configuration Options section below for compatible distributions, recommended plans, and any additional configuration options available for this Marketplace App.
  4. Click the Create Linode button. Once the first Compute Instance has been provisioned and has fully powered on, wait for the software installation to complete. If the instance is powered off or restarted before this time, the other Compute Instances may never be deployed and the software installation will likely fail.

To verify that the app has been fully installed, see Get Started with Marketplace Apps > Verify Installation. Once installed, follow the instructions within the Getting Started After Deployment section to access the application and start using it.

Estimated deployment time: The PostgreSQL cluster should be fully deployed and configured within 5-10 minutes after the first Compute Instance has finished provisioning.

Configuration Options

  • Supported distributions: Ubuntu 22.04 LTS
  • Recommended minimum plan: All plan types and sizes can be used.

PostgreSQL Options

  • Linode API Token (required): Your API token is used to deploy additional Compute Instances as part of this cluster. At a minimum, this token must have Read/Write access to Linodes. If you do not yet have an API token, see Get an API Access Token to create one.
  • Limited sudo user (required): A limited user account with sudo access is created as part of this cluster deployment. Enter your preferred username for this limited user. Please note that the password is automatically created. See Obtaining Usernames and Passwords.
  • Domain (required): The domain name you wish to use, such as This domain name is only used to identify your cluster and as part of the system’s hostname. No domain records are created within Linode’s DNS Manager.
  • Add SSH Keys to all nodes? If you select yes, any SSH Keys that are added to the root user account (in the SSH Keys section), are also added to your limited user account on all deployed Compute Instances.
  • PostgreSQL cluster size: This field cannot be edited, but is used to inform you of the number of Compute Instances that are created as part of this cluster.

Warning: Do not use a double quotation mark character (") within any of the App-specific configuration fields, including user and database password fields. This special character may cause issues during deployment.

Getting Started After Deployment

Obtaining Usernames and Passwords

  1. Log in to your new Compute Instance through Lish or SSH using the root user and the associated password you entered when creating the instance. If you opted to include your SSH keys as part of this deployment, you can also log in using those keys as either the root user or the limited user account you specified during deployment.
  2. The passwords have been saved in a .deployment-secrets.txt file located in your user’s home directory. You can view this file in your preferred text editor or through the cat command. In the command below, replace [username] with the limited sudo user you created during deployment.

    cat /home/[username]/.deployment-secrets.txt
File: /home/[user]/.deployment-secrets.txt
# system user

user: example-user
password: v[[<]xw`pm/]:I+F2:$|1je!nqw|%V2h

Using PostgreSQL

Modify the Postgres Users

By default, PostgreSQL will create a Linux user named postgres to access the database software.Important

The postgres user should not be used for other purposes (e.g. connecting to other networks). Doing so presents a serious risk to the security of your databases.

  1. Change the postgres user’s Linux password:

    sudo passwd postgres
  2. Issue the following commands to set a password for the postgres database user. Be sure to replace newpassword with a strong password and keep it in a secure place.
su - postgres
psql -d template1 -c "ALTER USER postgres WITH PASSWORD 'newpassword';"

This user is distinct from the postgres Linux user. The Linux user is used to access the database, and the PostgreSQL user is used to perform administrative tasks on the databases.

The password set in this step will be used to connect to the database via the network. Peer authentication will be used by default for local connections. See the Secure Local PostgreSQL Access section for information about changing this setting.

Create a Database

  1. Run the commands in this section as the postgres Linux user.

    createdb mytestdb
  2. Connect to the test database.

    psql mytestdb
  3. You will see the following output:
psql (12.2 (Debian 12.2-2.pgdg90+1))
Type "help" for help.


This is the PostgreSQL client shell, in which you can issue SQL commands. To see a list of available commands, use the \h command. You may find more information on a specific command by adding it after \h.

The PostgreSQL Cluster Marketplace app was built for Linode by Linode. For support regarding app deployment, contact Linode Support. For support regarding the tool or software itself, browse the official Postgres documentation.