Deploy n8n (w/ AI Assistant)

n8n with a working AI Assistant: code sandbox and web search included.

Deploy n8n (w/ AI Assistant)

Just deployed

/var/lib/postgresql/data

Deploy and Host n8n (w/ AI Assistant) on Railway

n8n's AI Assistant builds and fixes workflows from a chat, but needs a code sandbox Railway can't normally run. This template includes one, plus web search, so the Assistant works out of the box.

n8n with its AI Assistant, sandbox and web search

About Hosting n8n (w/ AI Assistant)

Deploy with your email and a password, then sign in to n8n with them. Needs the Hobby plan: the Sandbox uses up to 0.9 GB while the Assistant builds.

Connect your AI model

  1. Sign in at platform.openai.com/api-keys and click Create new secret key.
  2. Name it (for example "n8n Assistant") and set Expiration to Never, so the Assistant doesn't stop working later.
  3. Click Create secret key, then Copy the key: OpenAI shows it only once.
  4. In n8n, open Assistant and click Get started. Pick OpenAI, paste the key and click Continue: the sandbox and web search are already set up.

Create an OpenAI key and paste it into n8n's Assistant

Common Use Cases

  • Build workflows from a chat
  • Debug failed executions
  • Ask how a node works

Dependencies for n8n (w/ AI Assistant) Hosting

  • n8n
  • Postgres
  • Sandbox
  • SearXNG

Deployment Dependencies

Implementation Details

n8n with its AI Assistant architecture

Back up N8N_ENCRYPTION_KEY: saved credentials can't be read without it. Sandboxes share one service; a Railway project token in RAILWAY_TOKEN gives each conversation its own VM.

Why Deploy n8n (w/ AI Assistant) on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying n8n (w/ AI Assistant) on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Updated 2026-10-29: First release.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
120
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
102
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
869