Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
FROM n8nio/n8n:latest
# syntax=docker/dockerfile:1

ARG N8N_VERSION=latest
FROM n8nio/n8n:${N8N_VERSION}

# Run as root to allow runtime updates of the n8n CLI when requested.
USER root

WORKDIR /home/node/packages/cli
ENTRYPOINT []
# Replace the entrypoint with a Heroku-friendly bootstrap script that
# prepares the database configuration and optionally keeps n8n updated.
COPY entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh

ENV N8N_RUNTIME_DIR=/tmp/n8n-runtime

ENTRYPOINT ["/docker-entrypoint.sh"]

COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]
CMD ["n8n", "start"]
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# n8n-heroku

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?template=https://github.com/n8n-io/n8n-heroku/tree/main)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?template=https://github.com/kuromi04/n8n-heroku2025.git)
[![Actualizar n8n](https://img.shields.io/badge/Actualizar%20n8n-Deploy%20Update-79589f?logo=heroku&logoColor=white)](https://dashboard.heroku.com/new?template=https://github.com/kuromi04/n8n-heroku2025.git&env[N8N_FORCE_INSTALL]=true)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Deploy Buttons Point to Wrong Repository

The repository field in app.json and the deploy buttons in README.md now point to a personal fork (kuromi04/n8n-heroku2025.git) instead of the official n8n-io/n8n-heroku repository. This appears to be an accidental commit, which could direct users to an unofficial deployment.

Additional Locations (1)

Fix in Cursor Fix in Web


## n8n - Free and open fair-code licensed node based Workflow Automation Tool.

This is a [Heroku](https://heroku.com/)-focused container implementation of [n8n](https://n8n.io/).

Use the **Deploy to Heroku** button above to launch n8n on Heroku. When deploying, make sure to check all configuration options and adjust them to your needs. It's especially important to set `N8N_ENCRYPTION_KEY` to a random secure value.
Use the **Deploy to Heroku** button above to launch n8n on Heroku. When deploying, make sure to check all configuration options
and adjust them to your needs. It's especially important to set `N8N_ENCRYPTION_KEY` to a random secure value.

Refer to the [Heroku n8n tutorial](https://docs.n8n.io/hosting/server-setups/heroku/) for more information.

If you have questions after trying the tutorials, check out the [forums](https://community.n8n.io/).

## Automatic n8n version management

This container keeps the n8n CLI up to date without requiring code changes:

- Set the `N8N_VERSION` config var to pin a specific n8n release. The default value (`latest`) resolves to the newest stable version on each deploy or dyno restart.
- Automatic upgrades can be disabled by setting `N8N_AUTO_UPDATE=false` if you prefer to manage updates manually.
- To force an upgrade of the currently requested version (for example after a new `latest` is published), set `N8N_FORCE_INSTALL=true` or use the **Actualizar n8n** button above and select your existing application in the Heroku dialog. The flag will trigger a clean reinstall on the next deploy without touching other configuration and clears npm's cache to make sure the newest build is fetched.

During startup the entrypoint script compares the installed version with the desired one and installs upgrades when required, ensuring that only n8n itself changes while the rest of the environment remains stable.

Updated releases are placed in a writable runtime directory (default `/tmp/n8n-runtime`) and prepended to the `PATH`, so the Heroku slug remains untouched. The runtime installer automatically clears any previously staged binaries before installing the requested version. You can change the directory by defining the optional `N8N_RUNTIME_DIR` config var as long as the location is writable at boot time.

Tanto la fase de *release* como los *dynos* web reutilizan el mismo entrypoint del contenedor, por lo que cada despliegue verifica si hay una versión más reciente de n8n, la instala antes de ejecutar las migraciones de base de datos y sólo entonces expone la aplicación.
96 changes: 56 additions & 40 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,59 @@
{
"name": "n8n",
"description": "deploy n8n to heroku without any hassle",
"keywords": [
"n8n",
"node",
"automation"
],
"website": "https://n8n.io",
"repository": "https://github.com/n8n-io/n8n-heroku",
"logo": "https://raw.githubusercontent.com/n8n-io/n8n-heroku/main/n8n_logo.png",
"success_url": "/",
"stack": "container",
"env": {
"GENERIC_TIMEZONE": {
"description": "Time Zone to use with Heroku. You can find the name of your timezone for example here: https://momentjs.com/timezone/.",
"value": "Europe/Berlin"
},
"N8N_ENCRYPTION_KEY": {
"description": "Set the n8n encryption key to a static value to avoid Heroku overriding it (causing authentication to fail).",
"value": "change-me-to-something-else"
},
"WEBHOOK_URL": {
"description": "Replace <appname> with your Heroku application name. This will ensure the correct webhook URLs are being shown in n8n.",
"value": "https://<appname>.herokuapp.com"
},
"DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED": {
"description": "SSL is required to connect to Postgres on Heroku",
"value": "false"
}
"name": "n8n",
"description": "Deploy n8n to Heroku without any hassle",
"keywords": [
"n8n",
"node",
"automation"
],
"website": "https://n8n.io",
"repository": "https://github.com/kuromi04/n8n-heroku2025.git",
"logo": "https://raw.githubusercontent.com/n8n-io/n8n-heroku/main/n8n_logo.png",
"success_url": "/",
"stack": "container",
"env": {
"GENERIC_TIMEZONE": {
"description": "Time Zone to use with Heroku. You can find the name of your timezone for example here: https://momentjs.com/timezone/.",
"value": "Europe/Berlin"
},
"N8N_ENCRYPTION_KEY": {
"description": "Set the n8n encryption key to a static value to avoid Heroku overriding it (causing authentication to fail).",
"value": "change-me-to-something-else"
},
"WEBHOOK_URL": {
"description": "Replace <appname> with your Heroku application name. This will ensure the correct webhook URLs are being shown in n8n.",
"value": "https://<appname>.herokuapp.com"
},
"DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED": {
"description": "SSL is required to connect to Postgres on Heroku",
"value": "false"
},
"addons": [
{
"plan": "heroku-postgresql",
"options": {
"version": "14"
}
},
{
"plan": "papertrail:choklad"
"N8N_VERSION": {
"description": "Desired n8n release (for example 1.42.0). Leave as 'latest' to automatically install the newest stable version during deploy.",
"value": "latest"
},
"N8N_AUTO_UPDATE": {
"description": "Set to 'false' to disable automatic updates when the running version differs from N8N_VERSION.",
"value": "true"
},
"N8N_RUNTIME_DIR": {
"description": "Optional writable directory for storing on-boot n8n upgrades. Defaults to /tmp/n8n-runtime.",
"value": "/tmp/n8n-runtime"
},
"N8N_FORCE_INSTALL": {
"description": "Temporarily set to 'true' to reinstall the requested n8n version from scratch on the next deploy without touching other settings. npm's cache will be cleared automatically to fetch the newest build.",
"value": "false"
}
},
"addons": [
{
"plan": "heroku-postgresql",
"options": {
"version": "15"
}
]
}
},
{
"plan": "papertrail:choklad"
}
]
}
Loading