i'm setting n8n on debian on aws ec2. i ran these commands:
sudo apt update
sudo apt upgrade
sudo reboot
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
(re-open your shell)
curl -fsSL https://get.n8n.io | sh
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt install -y caddy
sudo nano /etc/caddy/Caddyfile
reverse_proxy 127.0.0.1:5678
}
sudo systemctl reload caddy
sudo nano ./n8n/.env
N8N_HOST=n8n.yourdomain.com
N8N_PORT=5678
N8N_PROTOCOL=https
WEBHOOK_URL=https://n8n.yourdomain.com/
restart n8n:
docker compose -f ./n8n/compose.yml down
docker compose -f ./n8n/compose.yml up -d
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article