Invalid password while trying to set up database on installation

I was running each command in the installation guide:

https://docs.akkoma.dev/stable/installation/otp_en/#installing-akkoma

Everything seemed to be going fine until getting to the step to create the database schema with pleroma_ctl migrate, where I get this error multiple times:

19:02:10.417 [error] Postgrex.Protocol (#PID<0.137.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "akkoma"

The password I picked gets wrote into config.exs correctly. I don’t know what to do here.

If it’s not the first time you (try to) install akkoma on this server, the user may still have been in the database with a different password. In that case, it should’ve given an error when running the setup_db.psql.

You can either change the user password to the correct one (an internet search should tell you how to do that), or delete it and start again (see documentation on to remove an instance).

I didn’t get any sort of problem when running setup_db.psql:
su postgres -s $SHELL -lc “psql -f /tmp/setup_db.psql”
CREATE ROLE
CREATE DATABASE
You are now connected to database “akkoma” as user “postgres”.
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION

I changed the password on the akkoma user, but it still gave the same error when running pleroma_ctl migrate, so I did the removal instructions in the documentation and started over.

The migration worked, and I started the daemon, but http://localhost:4000/api/v1/instance returns {"error":"Error: Missing access token"}.

Then, running su akkoma -s $SHELL -lc "./bin/pleroma stop" returned --rpc-eval : RPC failed with reason :nodedown.