netbox+postgresql+django.png

Official documentation said that you must do this comands for creating user/role in PostgreSQL:

# sudo -u postgres psql

postgres=# CREATE DATABASE netbox;
CREATE DATABASE

postgres=# CREATE USER netbox WITH PASSWORD 'somepassword';
CREATE ROLE

postgres=# GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
GRANT

\l

postgres=# \q

but during the server installation, I was faced with a lack of rights to the database, that's why I have provided the right data base the following commands:

# sudo -u postgres psql
postgres=# alter database netbox_db owner to netbox_user;
\l
\q