postgres template - wrong credentials
I tried to launch the postgres template but when I try to connect, I get a FATAL: password authentication failed for user "postgres"
I made sure to expose the external port, I also tried different volume mapping, redeploying, other db client, other db users, manually setting the env for user/pass with no luck.


54 Replies
not sure what else to try I have to be missing something simple here

you have firewall setup?
not that im aware of, just setup a clean hetzner vps
adn Im reaching the db itelf, it also tells me in the logs: password authentication failed for user "postgres"
can you run docker ps

Looks good
The database port is being exposed
In the database field can you try Postgres?
same issue
Did you modify the mounts ?
no, not on this one. just deployed this fresh
for my sanity Ill create a new one again so we are on the same page 100%
π
yea same thing
let me try
are you deploying in remote server or dokploy server?
what do you mean exactly? Im using one vps dokploy on the same machine
hmm
I tested and it was working
I used a completely new project now, same issue
I can screen share if it helps


just of curiosity, can you try to create a new db with the database name as postgres?
just did that, before I also tried leaving it blank
Can you share the credentials of your server?
I dm'd you
hmm looks like the Generation password is including characters like #$#%^&*(()!! and I don't know if that is the main issue
because I receive this error
could not connect to server: could not initiate GSSAPI security context: The operation or option is not available could not initiate GSSAPI security context: Credential for asked mech-type mech not found in the credential handle FATAL: password authentication failed for user "postgres"
after creating a database with a simple password 9417e9789e5de6f2
it works
oh interesting! let me try with a simple one
It's strange I've never had that happen before or was it just coincidence that the generation of the password included those characters
lol
but try to create a new database and assign a password with letters and numbers
yep thats it!
strange since I used a similar password on my old system
Weird, I will fix this tonight, thanks
a8p!+DK@YhyB7b4G <- this works, so not sure which chars exactly (#?) but good to know! If its a postgres limitation maybe a frontend validation would be cool for people in the future getting this issue. otherwise thank you for the fix and for looking into this!
very strange I will read more about that, thanks !
this error keeps happening, I spent 3 hours trying to figure out why I couldn't connect... I removed the special characters and it worked @Siumauricio
it should be fixed already in a newest version if im not wrong?
i think not because today is my first time with dokploy
but it help me a lot, really good job on this tool! pls keep upgrading this tool π
ooops, looks like I have duplicated functions and very probably are still using another function
can you share what password generated?
i can tell you what caracters i remove from password: #, ?, $
but probably has more
in theory it should use this characters https://github.com/Dokploy/dokploy/blob/1e1409e6510211b6ffd74e08324847255b1d6891/packages/server/src/templates/utils/index.ts#L37
GitHub
dokploy/packages/server/src/templates/utils/index.ts at 1e1409e6510...
Open Source Alternative to Vercel, Netlify and Heroku. - Dokploy/dokploy
But i'm seeing I have duplicated files so I need to check if is using older reference
but it let me create the database.. maybe that function removes the caracters?
what version you have?
last version
umm ok, very probably is using a reference from another function, I will check
in the meantime just create a password without those characters
i used this comamnd to install curl -sSL https://dokploy.com/install.sh | sh
i assume this is the last version
sure, thank you. if you want i can create one issue on github
let me know
Yeah please create!
but i keep with the problem :/
my backend on dokploy cant read database_url from environment variables
but i put them there
Check this example https://github.com/Dokploy/examples/tree/main/t3
GitHub
examples/t3 at main Β· Dokploy/examples
Examples to deploy on Dokploy. Contribute to Dokploy/examples development by creating an account on GitHub.
is using a nextjs application with a mysql database it also uses prisma
the idea should be the same if you use another application
in the readme are the instructions

did you copy the internal url from the database?
yes
I need to see more details
they are both on dokploy
If your password has strange characters try what I said above please
how you build this?
because im using dockerfile
using nixpacks
read the instructions in the readme
let me test that
im using nest js, but its similar
yeah it should be similar