During installation - Creating user I get an error

root@Gauss:~#  sudo -u postgres createuser -P peertube
could not change directory to "/root": Permission denied
Enter password for new role: 
Enter it again: 
createuser: error: could not connect to database template1: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?


Don’t run this command in the /root directory

I think it postgres is broken.

okay thanks! I’d reccomend this is clearly stated in the manual. that is should be done in /var/www/peertube