docs: add EC2 setup instructions for multi-server deployment

This commit is contained in:
Mauricio Siu
2025-08-13 21:51:54 -06:00
parent 0590adbe60
commit ea130b924c

View File

@@ -0,0 +1,47 @@
---
title: EC2 Instructions
description: "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:
1. **Click on launch instance**
2. **Select the distribution of your choice** (we recommend Ubuntu, Debian or Amazon Linux)
3. **Choose your instance type** and all the other settings you want
4. **In the Network settings**, click on:
- `Allow SSH traffic from the internet`
- `Allow HTTPS traffic from the internet`
- `Allow HTTP traffic from the internet`
5. **Click on `Launch instance`** (If you see a warning about adding a new key pair, just skip it)
6. **Now go to your instance and click on `Connect`**
7. **Type this command** `sudo nano /etc/ssh/sshd_config` and find the line `#PermitRootLogin prohibit-password` and change it to `PermitRootLogin yes`. Save and exit.
8. **Restart the SSH service** by typing this command:
```bash
sudo systemctl restart sshd
```
9. **Go back to the EC2 instance and click on `Connect`** but instead of using the default username `ec2-user`, type `root`
10. **Connect using the `root` user**
11. **Create a server in the Dokploy dashboard** in the remote server section
12. **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`
13. **Click on action `Setup Server`** in the `SSH Keys` tab, follow the manual process (Copy the Command and paste in the server manually)
14. **Connect to the server** - you should now be able to setup the server properly and deploy your applications