New to n8n but hit secure cookie problem - AWS ubuntu with docker

Hi, i’m new to n8n and aws - have coding background but didnt use aws much.

i managed to setup an ec2 instance with ubuntu(ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20250610), added tcp port 5678 into security group.
installed docker and ran n8n through docker:

docker run -it --rm -e N8N_BASIC_AUTH_USER=username -e N8N_BASIC_AUTH_PASSWORD=password -e N8N_HOST=0.0.0.0 -e N8N_PORT=5678 -e N8N_PROTOCOL=http -e N8N_COOKIE_SECURE=false -e N8N_EDITOR_BASE_URL=http://ec2_partialurl_compute.amazonaws.com:5678 -e WEBHOOK_URL=http://ec2_partialurl_compute.amazonaws.com:5678/ -e N8N_LOG_LEVEL=debug -p 5678:5678 n8nio/n8n

i also checked on terminal that n8n cookie secure is false using :
docker exec <container_name> printenv N8N_COOKIE_SECURE

but i’m still seeing “Your n8n server is configured to use a secure cookie,
however you are either visiting this via an insecure URL, or using Safari.” using chrome.

i want to try out n8n automation with whatsapp and google sheets so i want to do a quick setup. Hence, does not want to setup https if possible.

any solution to get n8n working on ec2? or if cannot just http, what can i do to setup for https?

Hi there!
Based on your problem, it seems like you need to make your site as https instead of http.

Luckily, n8n already have reproducible usage for your case.

You can read here :backhand_index_pointing_down:t3:
Docker Compose | n8n Docs

Instead of running very long command, you can set the environment in compose.yaml file that you create, and you just run docker compose up -d and it’ll be running automatically with added SSL certificate from traefik.

1 Like