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

apollonin's avatar

How to get root access to server, created with Forge at Digital Ocean

Hi! I've a question about root access to my Digital Ocean server. I've created new server using Laravel Forge (that's awesome, btw). So now i can login like ssh [email protected]

But i can not login as ssh [email protected]. I just get Permission denied (publickey) error. But i really like to have root and sudo access to my own server =) So how can i login as admin? Suppose I can get my root pass in some way (i believe, i can reset it at digital ocean panel).

Thanks a lot!

0 likes
2 replies
SaeedPrez's avatar
Level 50
  • When you create a droplet at DigitalOcean you get an email with server IP, root password, etc.
  • Then you go add the server to Forge and it will give you command to run on the server, which gives control to Forge and then Forge emails you database info and sudo password.
3 likes
jekinney's avatar

When you add a ssh key via forge you should have root access to your droplet.

Please or to participate in this conversation.