Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EliyaCohen's avatar

Changing the root password in forge?

I've mistakenly changed my user root password in my server I'm using Digital Ocean servers. And now I can't manage my host with forge (Yea I know, I'm total noob).

So my question is , Is there a way I can change the root password in forge too?

WHEN CONNECTING AS "root" USER:

WARNING: Your password has expired.
Password change required but no TTY available.
0 likes
10 replies
lindstrom's avatar

You can reset your root password from the Digital Ocean control panel. Login, select your droplet and it's right there.

bashy's avatar

Since forge connects via SSH (forge user?), it would just be like issuing

sudo passwd root 
2 likes
christopher's avatar

@EliyaCohen It sets a new password for the root user. After you typed sudo passwd root you will be asked two times for the new password for the root user.

EliyaCohen's avatar

@cristopher Thank you, but how would I be able to know which password to do if I want to integrate back with forge?

bashy's avatar

I don't know what you're trying to do? Does Forge use the root user? Surely it uses SSH keys and not passwords?

EliyaCohen's avatar

@bashy I think I confused you a little bit, sorry. When I created the server in forge, I navigated to DigitalOcean and changed the root password, when I navigated back to forge, I received this message. I know it was foolish of me to change the root password, and now I want to know if there's a way to update the root's key in my forge to make it work again.

bashy's avatar

Not really sure how it works but updating the password won't change the access if someone has a public key in .authorized_keys file

cosmicvibes's avatar

In case any one comes across this thread like I did, here is your answer:

Laravel forge uses keys to login, not the password. BUT - After resetting the password on Digital Ocean, you must once login to the droplet and set a new password of your choosing. The error you saw was because this step had yet to be completed.

You can login to the droplet via the Digital Ocean control panel, console.

Thanks to this thread for the answer: https://laracasts.com/discuss/channels/forge/digitalocean-password-reset

2 likes

Please or to participate in this conversation.