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

pschillemat's avatar

Laravel Forge Sudo Password

Hello Everyone,

Hopefully someone can give me a hand with this! Recently I had setup a new server with Laravel Forge - as a huge rookie mistake, I forgot to write down the passwords that popped up during the creation... No big deal due to the provisioning email right? In this case wrong >.< I never the got the email.

Okay - still no big deal - Digitalocean, reset the root password, bingo done! Well sorta... I was able to get the root password reset no problem - however, in reading the documentation on Laravel Forge it says you still need to reset some passwords on the server in order for Forge to access the server properly, however, without the old sudo password this seems impossible...

I followed the directions @ https://forge.laravel.com/docs/1.0/servers/cookbook.html#resetting-the-sudo-password but these instructions just give me the same "wrong password" error as I do not have the initially set sudo password.

Are these steps necessary? If not great but how do I get the same functionality as before by having one sudo password for all the users (if there are multiple) on the server as before?

0 likes
5 replies
pschillemat's avatar

Interesting.... Well I haven't noticed any issues with Forge's abilities to communicate with the server so I suppose its okay. I am having their support check just to be sure however. The change to no longer send emails with the sudo passwords makes sense though... Credentials and all.

Do you have any idea as to how to reenable the original forge behaviour of the same "sudo" password for all users that are created as that is a very useful feature rather than having to su root all the time (which is also not a great idea)

bristoldigital's avatar

The Forge instructions are misleading, but I presume that's because they're vendor agnostic and succinct.

  1. Reset your root password via Digital Ocean.
  2. Log into Digital Ocean via the Recovery Console.
  3. Change the root password as prompted. (If there is terminal lag pasting will fail. Further wait 5 seconds before pressing enter), but beat the timeout!
  4. Now you can change the Forge password: $ passwd forge
  5. Reconnect the server in Forge
8 likes

Please or to participate in this conversation.