EC2 Instructions
Instructions for setting up a multi-server on EC2
When using EC2 instances, by default you don't have root access, and Dokploy needs root access to install the necessary packages without restrictions.
To do this, you need to make manual modifications to the instance:
-
Click on launch instance
-
Select the distribution of your choice (we recommend Ubuntu, Debian or Amazon Linux)
-
Choose your instance type and all the other settings you want
-
In the Network settings, click on:
Allow SSH traffic from the internetAllow HTTPS traffic from the internetAllow HTTP traffic from the internet
-
Click on
Launch instance(If you see a warning about adding a new key pair, just skip it) -
Now go to your instance and click on
Connect -
Type this command
sudo nano /etc/ssh/sshd_configand find the line#PermitRootLogin prohibit-passwordand change it toPermitRootLogin yes. Save and exit. -
Restart the SSH service by typing this command:
-
Go back to the EC2 instance and click on
Connectbut instead of using the default usernameec2-user, typeroot -
Connect using the
rootuser -
Create a server in the Dokploy dashboard in the remote server section
-
Specify the server details:
- IP field: IPv4 public address of the instance
- Username field:
root - SSH key: Select the SSH key you created earlier
- Click on
Create Server
-
Click on action
Setup Serverin theSSH Keystab, follow the manual process (Copy the Command and paste in the server manually) -
Connect to the server - you should now be able to setup the server properly and deploy your applications