Setup

Local Setup

brew install postgresql

Follow instructions onscreen(brew services start postgresql & initdb /usr/local/var/postgres )

postgres -V

psql to enter cml

On Server

GCP guidearrow-up-right

  1. Create Ubuntu server on whatever Cloud Provider with some hard disk space or something idk

  2. Install postgres

sudo apt update
sudo apt -y install postgresql postgresql-client postgresql-contrib
  1. Setup user

Default user is postgres, but you need to set the password as it doesn't have one

sudo -u postgres psql postgres
\password postgres
#add password
CREATE EXTENSION adminpack; #enables server instrumentation
\q
  1. Edit pg_hba.conf

ip4.mearrow-up-right => Get your ipv4 address

  1. Edit postgresql.conf to listen on all IP addresses

Find the line:

And turn into:

Save, exit, and restart in bash

  1. For your cloud provider make sure the server can be accessed by all IPs

Last updated