How to install the Evolution API on a DigitalOcean droplet

 Step by step:

Installing the Evolution API on DigitalOcean for use with Bluguezap, a module for Perfex CRM.

Let's do this together. I'll give you the exact commands.

These steps were tested on a droplet at DigitalOcean, but you can replicate them on an AWS server, Hetzner server, or another server of your choice.

Step 1. 

Creating the Server (Droplet)

  1. Create an account with DigitalOcean, AWS, Hetzner (4GB RAM recommended). - Recommended: DigitalOcean - Receive $200.00 in credit for 60 days.
    DigitalOcean Referral Badge

  2. Click on Create -> Droplets.

  3. Region: New York or San Francisco (generally more stable/cheaper), or choose a region you prefer. I recommend NYC.

  4. OS: Ubuntu 24.04 (LTS) x64 or later. 

  5. Size: Choose -> (4GB RAM / 50GB SSD). Don't get the $6 one (1GB RAM) to avoid frustration.

  6. Authentication: SSH Key (more secure) or Password (easier to get started).

  7. Click on Create Droplet.

Step 2. 

Preparando o Ambiente (Terminal)

Access your server via terminal (PuTTY or VS Code Terminal, or use DigitalOcean's own access feature if you've decided to use DigitalOcean).

ssh root@YOUR_DROPLET_IP

Run the commands below to install Docker (copy and paste):

# Update the system.

apt update && apt upgrade -y

# Install Docker

curl -fsSL https://get.docker.com -o get-docker.sh

sh get-docker.sh 

# Install the Docker Compose (Plugin)

apt install docker-compose-plugin -y 

Step 3. 

Setting up the Evolution API (The Magic File)

IMPORTANT. Configuring the Security Key

You need to generate a strong API Key to protect your server. Run this command on your VPS terminal:

openssl rand -hex 32

Output generated (Example): a1b2c3d4e5f67890123456789abcdef0123456789abcdef0123456789abcdef

Copy the result and paste it into your docker-compose.yml  file in the AUTHENTICATION_API_KEY field.

Now, let's create the folder and the configuration file.

  1. Create the folder:

mkdir evolution-api && cd evolution-api

Create the docker-compose.yml file (with that exact name).: 

nano docker-compose.yml

Copy the contents of the docker-compose.yml file (This is a complete setup we've prepared for you, with the Database and Redis already integrated. Please remember to change the database password and the API Global Key. If you wish, you can change the database name, but we recommend keeping it as is):

file: docker-compose.yml (Present in the file "Main_file -> server_setup")

Warning: Change where it says YOUR_DROPLET_IP to the actual IP address of the machine. Change the passwords if desired.

Save the file (Ctrl+O, Enter) and exit (Ctrl+X).

The following steps are necessary if you want to use a subdomain of your own website for the API. For example, api.yourdomain.com.

Step 4:

Domain Preparation

To have HTTPS (https://api.yourdomain.com), you need to go to the control panel where you purchased your domain (yourdomain.com) and create a DNS record:

  • Type: A

  • Name (Host): api (or whatever you prefer)

  • Value (Destination): The IP address of your DigitalOcean Droplet (e.g., 64.225.01.04). 

Passo 5: 

V2 Installation with Reverse Proxy (HTTPS)

Now let's install the professional stack. We're not just going to use the simple docker-compose.yml. We're going to use one that includes the Nginx Proxy Manager. This will manage the SSL certificate (Let's Encrypt) for us for free.

Now let's run everything. 

Now run:

docker compose up -d

Docker will download the images and upload everything. Wait about 30 seconds.

A summary of what we've done so far: 

  1. We created DNS A (api.yourdomain.com -> IP). 

  2. Run the command above to start V2 and the Proxy. 

Let's continue...

  1. Access the Proxy Panel: Open http://YOUR_IP:81 in your browser.

    • Default login (usually): admin@example.com 

    • Default password: changeme

The system may prompt you to create an admin account on your first login. Be aware of this and keep your login credentials secure.

Make sure you configure NGINX correctly on your server if you haven't installed it before! Nginx Proxy Manager (NPM) is a powerful and visual tool that greatly simplifies certificate and security management.

These steps assume that this process is being carried out in a clean facility.

Now we will connect your domain (api.yourdomain.com) to the Evolution API container and automatically activate the security padlock (SSL).

Follow these steps within the Proxy Manager dashboard:

Step 5.1: Create the Proxy Host

  1. In the dashboard, click on Hosts in the top menu and then on Proxy Hosts.

  2. Click the Add Proxy Host button (top right corner).

Step 5.2: Configure the "Details" tab

Fill it out exactly like this:

  • Domain Names: Type api.yourdomain.com (or the exact subdomain you created in DNS) and press Enter to apply the tag.

  • Scheme: Leave it in http.

  • Forward Hostname / IP Type: evolution_api 

    • Note: This is the container_name we defined in docker-compose.yml. Since they are on the same Docker network, the Proxy finds the API by this name.

  • Forward Port: 8080

  • Cache Assets: Disabled.

  • Block Common Exploits: Activate (Extra Security).

  • Websockets Support: Activate (Essential for QR Code and real-time events).

Step 5.3: Configure the "SSL" tab (the padlock)

  1. Click on the SSL tab.

  2. In SSL Certificate, select: "Request a new SSL Certificate".

  3. Enable the Force SSL option (requires the use of HTTPS).

  4. Enable HTTP/2 Support (Improves performance).

  5. In the Email Address field, enter your email address (for notifications from Let's Encrypt).

  6. Check the "I Agree to the Let's Encrypt Terms of Service" box.

Step 5.4: Save and Test

  1. Click on Save.. 

    • The system will take about 10 to 20 seconds to communicate with Let's Encrypt and generate the certificate.

  2. If the result is "Success", you will see the domain in the list with the status "Online".

Now, the real test:

Open a new tab in your browser and go to:

https://api.seudominio.com

What should appear:

You should see the Evolution API (v2) welcome JSON:

{ "status": 200, "message": "Welcome to the Evolution API...", ... }

Next Step: Configure Bluguezap in your CRM.

If the link above opened with the secure padlock 🔒, your infrastructure is perfect.

Now we need to tell your Bluguezap in your Perfex CRM installation to use this secure domain. 

  1. Go to Perfex CRM -> Blugue Zap -> Settings.

  2. Enter the Evolution API URL: https://api.yourdomainolmitec.com (without port, without a trailing slash).

  3. API Key: Verify and enter the same key (B840626F...) that is in docker-compose.yml.

  4. Save.

Final Connection Test

  1. Go to Manage Zaps.

  2. Create a new instance (e.g., "HTTPS Test").

  3. Click on Scan QR Code.

After these steps, your API is ready.

If the response is {"status":200... "version":"..."} from https://api.yourdomain.com, it confirms that your "Enterprise" (V2 + HTTPS) infrastructure is 100% ready. The SSL padlock is active and the API has responded.