How to run n8n AI agents with a self-hosted model on a cloud GPU
Rent a GPU on Deploy, then open a terminal in JupyterLab or over SSH. Install n8n with the Docker commands the official install docs print, serve a model on that machine, and point the Ollama Chat Model at the Base URL those docs print. Copy the Docker volume mounted at /home/node/.n8n before you destroy the instance, because destroying the instance deletes its disk, and if you used the starter kit also copy its PostgreSQL volume and the .env file that sets N8N_ENCRYPTION_KEY, because that kit stores workflows in PostgreSQL.
An agent can rent the GPU and run this application on it. The agent pages are GPU compute for AI agents and the agent integration guide. Those pages are how an agent discovers a GPU and runs work on it. This page is the n8n install. A CLI whose providers page sets OLLAMA_HOST to http://localhost:11434 is How to run the goose agent with a self-hosted model on a cloud GPU. A coding agent whose providers page sets package to the OpenAI-compatible provider is How to use OpenCode with a self-hosted model on a cloud GPU. A canvas whose self-host page opens http://localhost/install is How to run Dify with a self-hosted model on a cloud GPU. A canvas whose ChatOllama page names a base URL is How to run Flowise with a self-hosted model on a cloud GPU. A flow editor whose Ollama component defaults the base URL to http://127.0.0.1:11434 is How to run Langflow with a self-hosted model on a cloud GPU. A CLI whose connect help sets --base-url to http://localhost:8000/v1 for openai-compatible is How to run Letta agents with a self-hosted model on a cloud GPU. A browser chat whose serve command listens on port 8080 is How to run Open WebUI on a cloud GPU. A Python agent library whose CodeAgent can take TransformersModel or an OpenAI-compatible server is How to run smolagents with a self-hosted model on a cloud GPU. A crew whose LLM class takes base_url for Ollama or an OpenAI-compatible server is How to run CrewAI with a self-hosted model on a cloud GPU. A graph runtime whose overview example does not name a model is How to run LangGraph agents with a self-hosted model on a cloud GPU. An AgentChat library whose Ollama example sets model to llama3.2 is How to run AutoGen agents with a self-hosted model on a cloud GPU. A typed agent whose vLLM example sets base_url to http://localhost:8000/v1 is How to run Pydantic AI agents with a self-hosted model on a cloud GPU. A framework whose README sets Ollama and HuggingFaceEmbedding is How to build LlamaIndex agents with a self-hosted model on a cloud GPU. A browser agent whose models page sets base_url to http://localhost:11434/v1 is How to run browser-use with a self-hosted model on a cloud GPU. A pipeline whose OllamaChatGenerator sets url to http://localhost:11434 is How to run Haystack agents with a self-hosted model on a cloud GPU. A program whose language-models page sets dspy.LM to ollama_chat/llama3.2:1b is How to run DSPy with a self-hosted model on a cloud GPU. An agent whose Ollama example sets id to llama3.1:8b is How to run Agno agents with a self-hosted model on a cloud GPU. A TypeScript agent whose local-models section sets url on the model object is How to run Mastra agents with a self-hosted model on a cloud GPU. A ChatAgent whose vLLM example sets ModelPlatformType.VLLM is How to run CAMEL-AI agents with a self-hosted model on a cloud GPU. A local agent UI whose Docker command publishes port 3000 is How to run OpenHands with a self-hosted model on a cloud GPU. A general vLLM install is How to serve an OpenAI-compatible API with vLLM on a cloud GPU. A general SGLang install is How to run SGLang on a cloud GPU. Ollama’s install and port 11434 are How to run Ollama on a cloud GPU. CloudGPU’s hosted gateway is a different base URL: How do I use an OpenAI-compatible API for open models?. How published weight sizes are read: How much VRAM do I need to run an LLM?. The tunnel is How to use SSH port forwarding on a cloud GPU. If the process runs out of memory: How to fix CUDA out of memory on a cloud GPU. If the process raises no kernel image on an RTX 5090: How to fix CUDA no kernel image on an RTX 5090.
The README says n8n is fair-code distributed under the Sustainable Use License and n8n Enterprise License.
The commands below are copied from the upstream files and docs pages named in each step. They were not run on a CloudGPU instance for this page. Anything this page adds around them is marked. The README’s model-flexibility sentence names providers this page does not copy.
What the docs print about memory
The Install using Docker Compose page, fetched 2026-11-14, prints at least 4 GB of RAM and 2 vCPUs. That line is system memory for the Compose setup, including the sandbox container named sandbox-runner-1. It is not vram_gb. The Install with Docker page and the n8n README do not print a RAM figure. The production requirements page prints ports, not a GPU GB figure. The model information table on unsloth/Llama-3.1-8B-Instruct prints parameter counts 8B, 70B, and 405B, and a context length of 128k. This page does not treat those parameter counts as vram_gb. A later section of that card names training hardware. This page does not copy that section and does not use it as an inference memory figure. This page does not mark a catalog row as enough.
GET /v1/public/compute-capabilities does not list GPUs. It returns feature flags. The memory column is vram_gb from GET /v1/public/gpu-catalog (generated_at 2026-11-14T10:04:57.194Z). The catalog response also includes an availability field. This page does not copy it. Every catalog row below has min_gpu_count 1. Rows are sorted by vram_gb, then by name. Which listing you can start is on Deploy.
The catalog template list had no n8n template. It did have Ollama templates (jupyterlab-ollama, ollama-qwen3, ollama). Those templates are a different install. This page does not treat them as n8n.
| Catalog name | vram_gb |
|---|---|
| RTX 2080 | 8 |
| RTX 3080 | 10 |
| RTX 2080 Ti | 11 |
| RTX 3080 Ti | 12 |
| V100 16G | 16 |
| A30 | 24 |
| RTX 3090 | 24 |
| RTX 4090 | 24 |
| RTX 4090D | 24 |
| RTX 4080 SUPER 32G | 32 |
| RTX 5090 | 32 |
| RTX 5090D | 32 |
| V100 32G | 32 |
| A100 40G | 40 |
| A800 40G | 40 |
| A40 | 48 |
| RTX 4090 48G | 48 |
| RTX 4090D 48G | 48 |
| RTX A6000 | 48 |
| Ascend 910B | 64 |
| NVIDIA RTX PRO 5000 72G | 72 |
| RTX PRO 5000 72G | 72 |
| A100 80G | 80 |
| A800 80G | 80 |
| H800 | 80 |
| RTX 6000D | 83 |
| H20 96G | 96 |
| RTX PRO 6000 96G | 96 |
| RTX PRO 6000 Max-Q | 96 |
| H20-3e 141G | 141 |
Install
Main of n8n-io/n8n on 2026-11-14 was commit 5ee5c2bf152c1a5c6eb0c1183a8d4c9b202ed4bf, committed 2026-11-14T03:21:05Z. pushed_at the same day was 2026-11-14T10:02:57Z. The GitHub license field was NOASSERTION. Release tag n8n@2.47.7 is commit d4dcb1b152a98fc31ea7c4ee6aecdc45c5c88063, committed 2026-11-13T09:30:50Z, published 2026-11-13T09:44:36Z. Those commits are not the same. This page did not diff the tag README against main. The README quoted here is from that main commit. The docs pages were fetched the same day from the URLs in Sources.
The README quick start prints this Docker install, then says the editor is at http://localhost:5678. The same block also prints a curl install script. This page copies the Docker lines.
docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
The Install with Docker page says that content is outdated and points to Install using Docker Compose. Its own start block still prints a docker run. The image in that block is n8nio/n8n, not docker.n8n.io/n8nio/n8n. The timezone values are angle-bracket placeholders. The fence below is that command. Replace the placeholders with a timezone. This page did not run it.
docker volume create n8n_data
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-e GENERIC_TIMEZONE="<YOUR_TIMEZONE>" \
-e TZ="<YOUR_TIMEZONE>" \
-e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
-v n8n_data:/home/node/.n8n \
n8nio/n8n
That page says the command maps port 5678, mounts the n8n_data volume at /home/node/.n8n, and that once running you open http://localhost:5678. It also prints current stable 2.47.7 and current beta 2.48.4. The Compose page’s start lines, after you create the project files that page describes, are:
docker compose up -d
docker compose ps
That page says the editor is at http://localhost:5678, and a check is curl -sf http://localhost:5678/healthz. The Compose file itself is an embedded file, docker/get-n8n-compose.yml, not printed as a full YAML block on the page. This page does not invent that YAML.
The self-hosted AI starter kit is a different Compose file. Main of n8n-io/self-hosted-ai-starter-kit on 2026-11-14 was commit 662bd8892476b41d9084417a569cc84013354674, committed 2026-07-23T11:28:09Z. The GitHub license field was Apache-2.0. The README’s Nvidia section prints:
git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git
cd self-hosted-ai-starter-kit
cp .env.example .env
docker compose --profile gpu-nvidia up
The same README also prints an AMD profile, a Mac section, and docker compose --profile cpu up. This page does not choose a profile for a catalog row. docker-compose.yml at that commit publishes n8n on 5678:5678 and Ollama on 11434:11434. The gpu-nvidia service reserves an NVIDIA device with count: 1. The catalog includes rows that are not named in that file. This page does not invent a profile for them.
The files this page read do not print an SSH command. For the editor on port 5678, the tunnel is How to use SSH port forwarding on a cloud GPU.
Agent
The AI Agent node page, fetched 2026-11-14, says: connect a chat model and one or more tools, and the agent decides which tools to call. It says you must connect at least one tool sub-node. It says the agent type setting is deprecated from n8n 1.82.0 and that all AI Agent nodes now work as a Tools Agent. It does not print a model id or a Base URL.
The starter kit README’s quick start is a different canvas. It says to open http://localhost:5678/, then open http://localhost:5678/workflow/srOnR8PAY3u4RSwb, then click the Chat button. It says that on a first run you may need to wait until Ollama finishes downloading Llama3.2. The workflow file n8n/demo-data/workflows/srOnR8PAY3u4RSwb.json at the same commit is named Demo workflow. Its three nodes are Chat Trigger, Basic LLM Chain, and Ollama Chat Model. The Ollama Chat Model parameters set model to llama3.2:latest. That file is not an AI Agent node. The compose file’s pull command is ollama pull llama3.2. Those three strings are not the same. This page does not treat them as one id.
The Build and manage agents page describes a separate Agent Builder. It says to select Create Agent, which opens a blank draft, then pick a provider and model in the Model field. It says that settings page does not affect the AI Agent workflow node. It does not print a model id. Provider names on that page are not copied here.
Ollama and an OpenAI-compatible server
The Ollama Chat Model page says the node lets you use local Llama 2 models with conversational agents. Its Model parameter lists Llama2, Llama2 13B, Llama2 70B, and Llama2 Uncensored. It points at the Ollama credentials page for the Base URL. It does not print llama3.2.
The Ollama credentials page says the default Base URL is http://localhost:11434. If you set OLLAMA_HOST, enter that value. If a local connection fails, it says to try 127.0.0.1 instead of localhost. If Ollama and n8n run in separate Docker containers, it says to set Base URL to an angle-bracket container name on port 11434, and the example for a container named ollama is http://ollama:11434.
The Ollama Chat Model common issues page prints this command when only Ollama is in Docker:
docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
It then says the Base URL can stay http://localhost:11434. When only n8n is in Docker on Linux, the same page prints:
docker run -it --rm --add-host host.docker.internal:host-gateway --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n n8nio/n8n
and says to set the Base URL to http://host.docker.internal:11434. For the error connect ECONNREFUSED ::1:11434, it says to use http://127.0.0.1:11434.
A chat-model credential page fetched the same day, linked from the docs index for the node that is not the Ollama node, prints an API key and an Organization ID. It does not print a Base URL. This page does not copy that page’s product name and does not invent a Base URL for it. The local endpoint the Ollama pages do print is the one above. How to serve an OpenAI-compatible API with vLLM on a cloud GPU is the general server install. How to run Ollama on a cloud GPU is the Ollama install.
The n8n files this page read do not print hf download. The block below is added on this page. How to download a Hugging Face model prints pip install -U "huggingface_hub" and hf download. This page did not download the repository. The n8n files this page read do not print this repository id.
pip install -U "huggingface_hub"
hf download unsloth/Llama-3.1-8B-Instruct
On 2026-11-14, GET https://huggingface.co/api/models/unsloth/Llama-3.1-8B-Instruct reported gated false, cardData.license llama3.1, pipeline_tag text-generation, lastModified 2025-05-09T19:32:57.000Z, and sha 4699cc75b550f9c6f3173fb80f4703b62d946aa5. The card YAML also includes extra_gated_prompt. Those two fields are not the same fact. The card’s base_model field names a repository this page does not copy. This page did not run hf download.
When it fails
CUDA out of memory. The n8n files and docs pages this page read print no GPU GB figure. If the model server raises CUDA out of memory, use how to fix CUDA out of memory on a cloud GPU. This page does not pick a smaller model id for you.
“CUDA error: no kernel image is available for execution on the device” on an RTX 5090. The n8n README and the docs pages this page read do not name compute capability 12.0. The RTX 5090 guide says that card is compute capability 12.0 (sm_120) and that PyTorch 2.7 and later, on a build for CUDA 12.8 or newer, is the line that announced support. This page did not install a torch wheel and did not re-test this program on an RTX 5090. Catalog RTX 5090 and RTX 5090D are 32. That is the catalog number only.
connect ECONNREFUSED ::1:11434. The Ollama common-issues page says this happens when IPv6 is enabled and Ollama is listening on IPv4. It says to set the Base URL to http://127.0.0.1:11434.
What to copy off, then destroy
The Install with Docker page mounts n8n_data at /home/node/.n8n. The backup and restore page, fetched 2026-11-14, says that in Docker the .n8n folder lives in the n8n_data volume, and that with the default SQLite database that folder holds the database file and the config file with the credential encryption key. It says to stop n8n before copying that folder when the database is SQLite. The official Compose page says the n8n-data volume stores the database and the encryption key. That volume name is not the starter kit’s.
The starter kit docker-compose.yml at the commit in Sources sets DB_TYPE=postgresdb on the n8n service. It mounts n8n_storage at /home/node/.n8n and postgres_storage at /var/lib/postgresql/data. The README mounts a shared folder at /data/shared. .env.example at that commit sets N8N_ENCRYPTION_KEY, and the compose file passes that variable into the n8n service. The backup page says that if you use PostgreSQL, back up that database with the database’s own tooling, and that the .n8n folder is still part of the backup because credentials in the database are encrypted with the key it holds. The same page says that without the encryption key from the config file, or a custom N8N_ENCRYPTION_KEY, a restored database or encrypted credential export can’t be decrypted. Copy postgres_storage, n8n_storage, /data/shared, and the .env file you edited before you destroy the instance. This page does not print a database dump command. The backup page does not print one either.
The same backup page prints these export lines, and says they contain workflows and credentials only. It says a backups/ directory inside the container is not persisted, so copy the exported files out of the container. It says a CLI backup is not enough to recover a full instance on its own.
n8n export:workflow --backup --output=backups/workflows/
n8n export:credentials --backup --output=backups/credentials/
Save your work before you destroy a cloud GPU is the checklist. The terms say data on local instance storage is permanently deleted when the instance is destroyed.
The billing page states the billing rule in these words:
Per-minute options have a 1-minute minimum; unused prepaid minutes are refunded when you destroy the instance. Some configurations use whole-hour billing with a 1-hour minimum; unused time within a charged hour is not refunded on voluntary stop. The billing period, minimum charge and initial prepayment are shown before confirmation. No subscription.
Amounts are not copied here.
Frequently asked questions
What memory figure do the n8n docs print?
The Docker Compose install page prints at least 4 GB of RAM and 2 vCPUs. That line is system memory. It is not vram_gb. The Install with Docker page and the n8n README do not print a RAM figure. The unsloth/Llama-3.1-8B-Instruct model information table prints parameter counts 8B, 70B, and 405B, and context length 128k. This page does not treat those figures as vram_gb. This page does not mark a catalog row as enough. Which listing you can start is on https://cloudgpu.app/deploy.
Which install lines do the docs print?
The README prints docker volume create n8n_data, then docker run with image docker.n8n.io/n8nio/n8n, publishing port 5678, and http://localhost:5678. The Install with Docker page says that page is outdated and points to Install using Docker Compose. Its start command uses image n8nio/n8n and timezone placeholders. Current stable on that page is 2.47.7. Current beta is 2.48.4. Tag n8n@2.47.7 is commit d4dcb1b152a98fc31ea7c4ee6aecdc45c5c88063, committed 2026-11-13. Main is commit 5ee5c2bf152c1a5c6eb0c1183a8d4c9b202ed4bf, committed 2026-11-14. The starter kit Nvidia profile command is docker compose --profile gpu-nvidia up. This page did not run the commands.
How do the docs point the Ollama Chat Model at a server on the same machine?
The Ollama credentials page says the default Base URL is http://localhost:11434. If Ollama and n8n run in separate Docker containers, the example for a container named ollama is http://ollama:11434. If only n8n is in Docker on Linux, the common-issues page sets the base URL to http://host.docker.internal:11434. The included starter-kit workflow node sets model to llama3.2:latest. The compose file command is ollama pull llama3.2. The chat-model credential page that is not the Ollama page prints an API key and an Organization ID and does not print a Base URL. This page does not invent one. The files do not print an SSH command.
What license sentence does the README print?
The README says n8n is fair-code distributed under the Sustainable Use License and n8n Enterprise License. The GitHub license field on 2026-11-14 was NOASSERTION. That license text is not a CloudGPU rate.
Sources (read 2026-11-14, Asia/Shanghai)
- n8n-io/n8n README at commit
5ee5c2bf152c1a5c6eb0c1183a8d4c9b202ed4bf, committed 2026-11-14T03:21:05Z. GitHub license fieldNOASSERTION.pushed_at2026-11-14T10:02:57Z. Tagn8n@2.47.7is commitd4dcb1b152a98fc31ea7c4ee6aecdc45c5c88063, committed 2026-11-13T09:30:50Z, published 2026-11-13T09:44:36Z. This page did not diff that tag against main. README Docker imagedocker.n8n.io/n8nio/n8n, port 5678, editor http://localhost:5678 - LICENSE.md at that commit: Sustainable Use License. The README sentence is the one quoted above. The limitations section is not copied
- Install with Docker https://docs.n8n.io/deploy/host-n8n/install-options/install-with-docker.md, fetched 2026-11-14. Page says the content is outdated. Image
n8nio/n8n. Port 5678. Volumen8n_dataat/home/node/.n8n. Stable 2.47.7. Beta 2.48.4 - Install using Docker Compose https://docs.n8n.io/deploy/host-n8n/install-options/install-using-docker-compose.md, fetched 2026-11-14. At least 4 GB of RAM and 2 vCPUs.
docker compose up -d. Editorhttp://localhost:5678. Health checkcurl -sf http://localhost:5678/healthz. Compose YAML is the embeddeddocker/get-n8n-compose.yml, not inlined here - Production requirements https://docs.n8n.io/deploy/host-n8n/install-options/production-requirements.md, fetched 2026-11-14. Port 5678 is the default of
N8N_PORT. No GPU GB figure - AI Agent node https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent.md, fetched 2026-11-14. Connect a chat model and at least one tool sub-node. Tools Agent from n8n 1.82.0. No model id
- Ollama Chat Model https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatollama.md and credentials https://docs.n8n.io/integrations/builtin/credentials/ollama.md, fetched 2026-11-14. Default Base URL
http://localhost:11434. Model list Llama2, Llama2 13B, Llama2 70B, Llama2 Uncensored. Separate-container examplehttp://ollama:11434 - Ollama Chat Model common issues https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatollama/common-issues.md, fetched 2026-11-14.
docker runforollama/ollamaon port 11434. Linux--add-hostexample. Base URLhttp://host.docker.internal:11434.ECONNREFUSED ::1:11434useshttp://127.0.0.1:11434 - The other chat-model credential page fetched the same day prints an API key and an Organization ID and does not print a Base URL. Its product name is not copied
- n8n-io/self-hosted-ai-starter-kit commit
662bd8892476b41d9084417a569cc84013354674, committed 2026-07-23T11:28:09Z. GitHub license field Apache-2.0. Nvidia profiledocker compose --profile gpu-nvidia up. WorkflowsrOnR8PAY3u4RSwb.jsonmodelllama3.2:latest. Compose pull commandollama pull llama3.2. Shared path/data/shared. Ports 5678 and 11434.docker-compose.ymlsetsDB_TYPE=postgresdb, mountsn8n_storageat/home/node/.n8n, and mountspostgres_storageat/var/lib/postgresql/data..env.examplesetsN8N_ENCRYPTION_KEY. The example secret values in that file are not copied - Back up and restore https://docs.n8n.io/deploy/host-n8n/keep-n8n-running/backup-and-restore.md, fetched 2026-11-14. SQLite data and the encryption key live in the
.n8nfolder, Docker volumen8n_data. PostgreSQL is backed up with the database’s own tooling. The page does not print a dump command. CLI exports aren8n export:workflow --backupandn8n export:credentials --backup. Abackups/directory inside the container is not persisted. A CLI backup is not a full instance recovery - Build and manage agents https://docs.n8n.io/build/build-and-manage-agents.md, fetched 2026-11-14. Create Agent opens a blank draft. That page says it does not affect the AI Agent workflow node. Provider names on that page are not copied
- Hugging Face model API
unsloth/Llama-3.1-8B-Instruct:gatedfalse,cardData.licensellama3.1,pipeline_tagtext-generation,lastModified2025-05-09T19:32:57.000Z,sha4699cc75b550f9c6f3173fb80f4703b62d946aa5. The card YAML includesextra_gated_prompt. The model information table prints 8B, 70B, 405B, and 128k.base_modelnames a repository this page does not copy.hf downloadis added on this page and was not run. The training-hardware section is not copied - Public GPU memory: https://cloudgpu.app/v1/public/gpu-catalog (
generated_at2026-11-14T10:04:57.194Z).GET /v1/public/compute-capabilitiesreturned feature flags and no GPU list. The catalog had no n8n template
Cards you can start are on the Deploy page. Amounts are not copied here.
Last updated: 2026-11-14 (Asia/Shanghai).