Hey everyone, I’m hitting a wall trying to get n8n running on Heroku using Docker. I’ve set up a Postgres database and created the necessary files, but something’s not clicking. Here’s what I’ve done so far:
Set up Postgres 11 on Heroku
Created a basic Dockerfile using the n8n image
Made a heroku.yml file with config settings and build instructions
When I check the logs, I’m seeing warnings about Tini not running as PID 1 and some permission issues. The app keeps crashing with an H10 error.
I’ve encountered similar challenges deploying n8n on Heroku. One crucial step often overlooked is properly configuring the PORT environment variable. Heroku dynamically assigns a port, so you need to ensure n8n listens on it. Try adding this to your Dockerfile:
ENV PORT=$PORT
CMD n8n start --port $PORT
Additionally, verify your Heroku Config Vars include all necessary n8n environment variables, especially database-related ones. The H10 error usually indicates an issue with your app not binding to the correct port or crashing during startup. Reviewing Heroku logs closely might reveal more specific error messages to troubleshoot further.
If problems persist, consider temporarily disabling SSL for the database connection to isolate potential issues.
I’ve gone through a similar ordeal with n8n on Heroku. One thing that helped me was tweaking the Dockerfile to use the official n8n image and adding some crucial environment variables. Here’s what worked for me:
Make sure to replace the database details with your actual Heroku Postgres credentials. Also, don’t forget to set the N8N_ENCRYPTION_KEY in your Heroku config vars for data encryption. This setup should help resolve the port binding issues and database connection problems you’re facing.