createdb fails when using custom postgres

When using custom postgresql, createdb fails as local user with ID 1001 does not exist

Problem

unknown.png

Solution

Execute the command as user postgres instead, e.g., createdb -U postgres chirpns