im running a google cloud vm. I have n8n running in docker on that instance. i have a postgresql db instance running with persistient storage, connected to the vm instance. i deployed a front end on nginx using the a simple index.html file. n8n was deployed using the config below. I have a web listener configured in n8n using basic auth. When i submit an answer via the button on the UI i get a 404 error. I have checked all the POST request urls for accuracy, checked the firewalls on GC and local, and tried bypassing nginx and posting directly to n8n with curl. everything results in the same error (some version of):
Error
Cannot POST /evaluation/question1
The n8n logs are clean as well. I am quite frustrated. help
I too am getting error 404. same workflow works in n8n cloud in production mode, but not locally running in docker.
version: "3.8"
# create new encryption key
#rm -rf ./n8n_data/config
# N8N_USER_MANAGEMENT_DISABLED=true: Disables user management, removing the account creation screen.
# N8N_BASIC_AUTH_ACTIVE=true: Enables basic authentication to secure the UI.
# N8N_BASIC_AUTH_USER and N8N_BASIC_AUTH_PASSWORD: Set the username and password for logging into the UI.
# N8N_DISABLE_PRODUCTION_MAIN_PROCESS=true: Disables the production checks.
######## To run n8n in Docker ########
# docker compose down
# docker compose up
# http://localhost:5678
services:
n8n:
image: n8nio/n8n
container_name: n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=admin
- N8N_USER_MANAGEMENT_DISABLED=true
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_ENCRYPTION_KEY=my_super_secret_key
- N8N_DISABLE_PRODUCTION_MAIN_PROCESS=true
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
####### Production Ready settings allowing multiple calls to webhooks ###
#- N8N_DEPLOYMENT_TYPE=main
#- N8N_PROTOCOL=http # or https
#- N8N_PORT=5678
- N8N_HOST=localhost # Change from 127.0.0.1 to localhost
- N8N_LISTEN_ADDRESS=0.0.0.0 # Add this line
- N8N_WEBHOOK_URL=http://localhost:5678/ # Add this to explicitly set webhook base URL
- N8N_WEBHOOK_TUNNEL=http://localhost:5678
- N8N_WEBHOOK_URL=http://localhost:5678/
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data: {} # Define the named volume here