Skip to main content

Deploy with an agent

Copy agent prompt

Before you start

Connect your AWS account and choose a project. Review the upstream deployment instructions for the release you plan to pin. This guide covers private company use in your own AWS account. n8n is source-available under its Sustainable Use License.

Data dependencies

PostgreSQL for this company deployment. Redis is needed only if you choose queue mode. See SQL databases for private writer access and connection details.

Deployment order

  1. Create a private PostgreSQL database in your Spring Winter project. Wait for the writer. Open Connect and prepare an application database and role.
  2. Deploy docker.n8n.io/n8nio/n8n as a web server on port 5678. Set DB_TYPE=postgresdb and DB_POSTGRESDB_HOST, DB_POSTGRESDB_PORT, DB_POSTGRESDB_DATABASE, DB_POSTGRESDB_USER and DB_POSTGRESDB_PASSWORD. Use database TLS settings appropriate for your deployment.
  3. Set a stable N8N_ENCRYPTION_KEY, the HTTPS WEBHOOK_URL and N8N_PROXY_HOPS for the actual proxy chain. Restrict editor access to the company. If workflows must receive external webhooks, expose only the necessary routes through a suitable proxy. If you need file-backed features, verify their durable storage before use.
  4. Start the main instance and let it migrate the database. In queue mode, provision Redis before starting the main instance and start workers after migrations. Use the same database and encryption key for all n8n processes.
Use Runtime variables for runtime credentials. For a Spring Winter web server, set an app-supported health path that returns HTTP 200 without credentials. Check History before running the application check.

Verify the deployment

Create and run a harmless workflow. Test a webhook if enabled and confirm stored credentials can still be used after task replacement.