Deploy n8n (w/ AI Assistant)
n8n with a working AI Assistant: code sandbox and web search included.
Just deployed
Just deployed
Just deployed
Just deployed
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.

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
- Sign in at platform.openai.com/api-keys and click Create new secret key.
- Name it (for example "n8n Assistant") and set Expiration to Never, so the Assistant doesn't stop working later.
- Click Create secret key, then Copy the key: OpenAI shows it only once.
- 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.

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

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
ADMIN_EMAIL
Your email address. It becomes your n8n owner login.
ADMIN_PASSWORD
Choose your n8n owner password: 8 to 64 characters, with at least one number and one uppercase letter.