AI & LLMs8 GB RAM (Scale tier required)· Port 11434

Deploy Ollama Local LLM Server with Docker Compose

Run Llama 3, Qwen, Mistral, and embedding models with an OpenAI-compatible REST API.

1. Production docker-compose.yml Configuration

Copy this stack definition or deploy directly from your Vexlo Cloud console with automatic Let's Encrypt TLS and persistent volume mounts.

docker-compose.yml
yaml
services:
  ollama:
    image: ollama/ollama:latest
    restart: unless-stopped
    ports:
      - "11434:11434"
    environment:
      - OLLAMA_HOST=${OLLAMA_HOST:-0.0.0.0:11434}
      - OLLAMA_KEEP_ALIVE=${OLLAMA_KEEP_ALIVE:-15m}
    volumes:
      - app_data:/root/.ollama


volumes:
  app_data:

2. Required Environment Variables

VariableDefault / ExampleDescription
OLLAMA_HOST0.0.0.0:11434Binds the Ollama HTTP server on all container interfaces.
OLLAMA_KEEP_ALIVE15mDuration a model stays loaded in RAM after a request.

Ollama Local LLM Server Self-Hosting FAQs

How much RAM is required to self-host Ollama Local LLM Server in production?

Ollama Local LLM Server requires a minimum of 8 GB RAM (Scale tier required). On Vexlo Cloud Pro (₹149/mo via UPI in India or $5/mo globally), you get 2 vCPU, 3 GB RAM, and 2 managed databases—more than enough headroom for production workloads.

How do I expose Ollama Local LLM Server with automatic HTTPS/SSL on Vexlo Cloud?

Deploy the ollama/ollama:latest container on Vexlo Cloud, set the exposed port to 11434, and attach your custom domain in the Domains tab. Vexlo automatically provisions and renews Let's Encrypt TLS certificates.

How is persistent data backed up for Ollama Local LLM Server?

Mount /root/.ollama to a persistent Docker volume and connect Vexlo Cloud's automated S3 / Cloudflare R2 backup scheduler to snapshot your database daily or weekly.

More 1-Click Docker Templates

View all 25 templates →