Back to Blog
2 min read
Deploy n8n on AWS Lightsail - Step-by-Step Guide
Here is how to Deploy n8n on AWS Lightsail for free
Loading amazing prompts...
Here is how to Deploy n8n on AWS Lightsail for free
ssh ubuntu@<instance_public_ip>
sudo apt update && sudo apt install -y docker.io docker-compose
sudo systemctl start docker
sudo systemctl enable docker
mkdir ~/n8n && cd ~/n8n
nano docker-compose.yml
Paste the following (adjust environment variables as needed):
services:
n8n:
image: n8nio/n8n
ports:
- "5678:5678"
volumes:
- ./n8n_data:/home/node/.n8n
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=yourUser
- N8N_BASIC_AUTH_PASSWORD=yourPassword
- N8N_SECURE_COOKIE=false
restart: always
docker compose up -d
Check if running:
docker ps
Logs:
docker logs n8n-n8n-1 --tail=50
Visit: http://<instance_public_ip>:5678
N8N_SECURE_COOKIE=false
(already done above)(Recommended for production, enables TLS/HTTPS)
restart: always
in docker-compose./n8n_data
directoryTag: n8n, how to install n8n, free host n8n, how to host n8n free, install n8n free, amazon n8n