Installation
apt updateapt install postgresql
Create database
sudo -u postgres createdb newdbname
Create user (role)
sudo -u postgres createuser -P newusername
Grant permissions to work with the public schema
sudo -u postgres psql dbname
And then inside the prompt:
GRANT ALL ON SCHEMA public TO username;