N8n hosting set up on Digital Ocean


we keep all our infrastructure in the cloud with Digital Ocean and to optimize costs, we would like to host n8n there as well.

However, when trying to create a droplet and follow the steps given in the n8n documentation, I have not been able to make it work. This is the second time I have created a subdomain and droplet, but in both cases, although the installation is successful without errors, I cannot access the domain. The first attempt was yesterday, and the second one was this morning.

Can you help me understand what I might be doing wrong?

1. Install Docker

sudo apt-get remove docker docker-engine containerd runc

sudo apt-get update

sudo apt-get install ca-certificates curl gnupg lsb-release

sudo mkdir -p /etc/apt/keyrings

curl -fsSL []( | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] []( $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli

3. Install Docker-Compose#

sudo apt-get install docker-compose-plugin

[Digital Ocean - n8n Documentation](

Clone configuration repository

git clone [](

cd n8n-docker-caddy

Create Docker volume

docker volume create caddy_data

Open ports

sudo ufw allow 80

sudo ufw allow 443

Configure n8n

nano .env

The Docker Compose file

nano docker-compose.yml

Configure Caddy

nano caddy_config/Caddyfile

Start Docker Compose

docker compose up -d

Here are the sources: Docker Compose - n8n Documentation

Digital Ocean - n8n Documentation

Here is my subdomain:

Here is DNS checker: DNS Checker - DNS Check Propagation Tool

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
April 18, 2023

Hi there,

As far as I can see there is no DNS record for the subdomain name that you’ve shared.

As you are using the Cloudflare nameservers this means that you need to login to your Cloudflare account and add a DNS record for the subdomain name that you would like to use for your n8n setup as described here:

Once you add the A record to point to your Droplet, it could take up to 24 hours for the DNS cache to clear over the Globe before you can see the new records.

Let me know how it goes.



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel