- ·Docker packages your agent with everything it needs into a container: it runs the same on your laptop and on the server. This is the single most important deployment tool.
- ·Docker Compose describes your whole stack (model server, workflow engine, database) in one file, and `docker compose up -d` starts everything.
- ·Not a terminal person? Portainer gives you a visual dashboard over Docker: start, stop, and inspect everything from the browser.
An agent that runs on your laptop is a demo. An agent that runs on a server, restarts itself after a crash, and keeps working while you sleep is a system. The gap between the two is deployment, and in 2026 the path is far simpler than it looks: almost everything reduces to Docker plus one configuration file. This guide keeps it that simple.
Why Docker is the one tool that matters
The oldest problem in software is "it works on my machine". Your agent needs Python 3.12, four libraries, a model server, and a database, and the server has none of them. Docker solves this by packaging the application and everything it needs into a container: a sealed box that runs identically anywhere Docker is installed. You build the box once; the server just runs it. That is the entire idea, and it is why Docker is the default skill to learn before any other deployment tool.
The supporting cast
A full agent stack in one file
Here is the smallest honest example: a model server and a workflow engine, wired together, surviving reboots. Save it as docker-compose.yml on the server and run one command. This is genuinely how small the core of a deployment is.
services:
ollama:
image: ollama/ollama
volumes: ["ollama:/root/.ollama"]
restart: unless-stopped
n8n:
image: n8nio/n8n
ports: ["127.0.0.1:5678:5678"]
environment:
- N8N_BASIC_AUTH_ACTIVE=true
volumes: ["n8n:/home/node/.n8n"]
restart: unless-stopped
volumes:
ollama:
n8n: docker compose up -d
# see what is running
docker compose ps
# read the logs of one service
docker compose logs n8n -f Note the two quiet safety choices in that file: restart: unless-stopped brings every service back after a crash or reboot, and the n8n port is bound to 127.0.0.1, so it is reachable only from the server itself, not from the internet. You then access it through a VPN or an SSH tunnel. Those two lines prevent the two most common beginner disasters.
One server with Compose carries most teams surprisingly far. You will know you have outgrown it when you need many servers, zero-downtime updates, or autoscaling; that is when Kubernetes enters. Do not start there. Start with one machine, one file, one command, and a backup of your volumes.