Version 0.13.0
OS Ubuntu 18.04
Unmodified Postgres with some useful plugins. Our goal is not to modify Postgres, but to provide some of the most common extensions with a one-click install. Find out more in out github repository.
pg_stat_statements
.In addition to the package installation, this droplet also enables the UFW firewall to allow port 22
for SSH and port 5432
for access to PostgreSQL. Once you have your droplet up and running, you would first need to set up the password for your DB superuser postgres
.
Once you have SSH into your instance, type in the following:
$ sudo -u postgres psql postgres
Then, in the psql terminal, type in the following:
$ \password postgres
Enter your desired password and reconfirm. You can disconnect from your SSH afterwards. Now, with any SQL client of your choice, you can now connect to the database with the following credentials:
Host: insert droplet ip address
Port: 5432
User: postgres
Password: insert your chosen password
Database: postgres
At any point wherein you would want to check whether your database is up, you can type this into your host terminal:
$ pg_isready -h <insert droplet ip address> -p 5432
If you are using attached volumes along with your droplet, you can use a volume as the default data directory for your Postgres server. A comprehensive guide on how to move your data directory to any such volume can be found here.
In addition to creating a Droplet from the Supabase Postgres 1-Click App via the control panel, you can also use the DigitalOcean API.
As an example, to create a 4GB Supabase Postgres Droplet in the SFO2 region, you can use the following curl command. You’ll need to either save your API access token to an environment variable or substitute it into the command below.
curl -X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' -d \
'{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image":"supabase-supabasepostgres-18-04"}' \
"https://api.digitalocean.com/v2/droplets"
Developers supporting developers
Ask anything related to system administration, programming, devops, open source, or the DigitalOcean platform.
Partner with us to build traction for your open source project or software company