Skip to content

n8n

n8n is a workflow automation platform for connecting APIs, services, and custom logic. Use this component when you need Diploi to build and deploy n8n so you can focus on building workflows, not configuring runtime environments.

Paste this entry into the components list in diploi.yaml to add n8n to your project.

components:
- name: n8n
identifier: n8n
package: https://github.com/diploi/component-n8n#v2.29.1

n8n stores its data in PostgreSQL. When you pick n8n in the Stack Builder, the PostgreSQL add-on and the environment variable mapping below are added to your project automatically. If you add n8n to an existing project by editing diploi.yaml yourself, add them too:

components:
- name: n8n
identifier: n8n
package: https://github.com/diploi/component-n8n#v2.29.1
env:
include:
- postgres.POSTGRES_HOST:DB_POSTGRESDB_HOST
- postgres.POSTGRES_PORT:DB_POSTGRESDB_PORT
- postgres.POSTGRES_USER:DB_POSTGRESDB_USER
- postgres.POSTGRES_PASSWORD:DB_POSTGRESDB_PASSWORD
addons:
- name: PostgreSQL
identifier: postgres
package: https://github.com/diploi/addon-postgres#v18.3-pgvector

The mapping is needed because n8n only reads the variable names listed in its documentation.

To use Diploi-hosted models in n8n, create an OpenAI credential that points at the AI Gateway:

  • Base URL: {diploi-ai-gateway-url}/openai/v1
  • API key: {diploi-ai-gateway-token}

Inject those placeholders as env vars on the n8n component, then pick a supported model. See AI Gateway.

What n8n defines in a deployment.

n8n sets these values in every deployment. Other components can import them with env.include as n8n.*. Defaults marked generated are unique to each deployment.

Parameters are set on the deployment’s Setup tab.

Connection

Superuser & connection configuration.

Variable Type Default Description
DB_POSTGRESDB_DATABASE string n8n
N8N_HOST string generated

Config

n8n onfiguration variables.

Variable Type Default Description
N8N_ENCRYPTION_KEY secret generated

Other variables

Set by the package. Override them on the deployment’s Environment tab or in diploi.yaml.

Variable Default
DB_TYPE postgresdb
DB_POSTGRESDB_SCHEMA public
TZ UTC
N8N_SAMESITE_COOKIE none
N8N_SECURE_COOKIE true

Start a demo, no card required https://diploi.com/component/n8n

A generic n8n component ready to be used for automating tasks.

This component uses latest stable N8N docker version and it uses PostgreSQL by default.

This component is based on the official n8n Docker image, ensuring compatibility and stability with the latest n8n releases.

  1. In the Dashboard, click Create Project +
  2. Under Pick Components, choose n8n
  3. In Pick Add-ons, you can add one or multiple databases to your app
  4. Choose Create Repository, which will generate a new GitHub repo
  5. Lastly, click Launch Stack

Link to guide, explains how to add a custom domain and launch to production https://diploi.com/blog/hosting_n8n

  1. Open the n8n web interface and create a new custom credential.

  2. In the DevPod terminal, run the following command to find your Diploi base URL and access token:

    Terminal window
    printenv | grep DIPLOI
  3. Return to n8n and use the retrieved values to configure your custom base URL. For detailed instructions, see the n8n community guide.

Keep your access token private and do not share it publicly.

For development and production, the component’s image is built using the official n8n stable release, ensuring reliability and optimal performance in deployment environments.