Postgres on Digital Ocean Droplet

Digital ocean allows you to just host the postgres database through it’s postgreSQL management tools but this tutorial is for those who wants to setup on their droplet machine. This assumes that you are on Ubuntu Machine Step 1 - Install PostgreSQL sudo apt update sudo apt install postgres postgresql-contrib sudo systemctl start postgresql Step 2 - Posgres Roles and Databases Switch to postgres account and run PSQL prompt sudo -u postgres psql Exit out of the prompt by typing \q postgres=# \q Step 3: Crate new User sudo adduser voidash Step 4 - Create new Role Rolename should be same as user as per convention, same goes for database...

December 30, 2023 · voidash