Ollama model management platform with API gateway.
2.1K
š Comprehensive Docker deployment guide for Ollama Remote Management Platform
This guide provides detailed instructions for deploying Ollama Remote Management Platform using Docker. The platform is designed for remote Ollama model management with secure API access and comprehensive compatibility.
Perfect for connecting to existing Ollama servers with minimal resource usage.
# Pull the latest standalone version
docker pull longkeyy/ollama-ui:0.0.1
Includes both the management platform and Ollama runtime for single-server deployment.
# CUDA/CPU version
docker pull longkeyy/ollama-ui:0.0.1-0.11.8
# AMD ROCM version
docker pull longkeyy/ollama-ui:0.0.1-0.11.8-rocm
Perfect for users who already have Ollama running elsewhere:
# Basic standalone deployment
docker run -d \
--name ollama-remote \
-p 8083:8083 \
-v ollama-data:/app/data \
longkeyy/ollama-ui:0.0.1
# Connect to remote Ollama server
docker run -d \
--name ollama-remote \
-p 8083:8083 \
-e OLLAMA_API_BASE_URL=http://your-ollama-server:11434 \
-e API_KEY_REQUIRED=true \
-v ollama-data:/app/data \
longkeyy/ollama-ui:0.0.1
Recommended for new users who want everything in one container. The All-in-One version exposes the web interface on port 11434, making it a drop-in replacement for standard Ollama:
# CPU version
docker run -d \
--name ollama-complete \
-p 11434:11434 \
-v ollama-models:/root/.ollama \
-v ollama-data:/app/data \
longkeyy/ollama-ui:0.0.1-0.11.8
# GPU version (NVIDIA CUDA)
docker run -d \
--name ollama-complete-gpu \
--gpus all \
-p 11434:11434 \
-v ollama-models:/root/.ollama \
-v ollama-data:/app/data \
longkeyy/ollama-ui:0.0.1-0.11.8
# AMD ROCM version
docker run -d \
--name ollama-complete-rocm \
--device=/dev/kfd --device=/dev/dri \
--security-opt seccomp=unconfined \
-p 11434:11434 \
-v ollama-models:/root/.ollama \
-v ollama-data:/app/data \
longkeyy/ollama-ui:0.0.1-0.11.8-rocm
version: '3.8'
services:
ollama:
image: ollama/ollama:latest
container_name: ollama-server
ports:
- "11434:11434"
volumes:
- ollama-models:/root/.ollama
environment:
- OLLAMA_HOST=0.0.0.0:11434
restart: unless-stopped
ollama-ui:
image: longkeyy/ollama-ui:0.0.1
container_name: ollama-remote-ui
ports:
- "8083:8083"
volumes:
- ollama-data:/app/data
environment:
- OLLAMA_API_BASE_URL=http://ollama:11434
- API_KEY_REQUIRED=true
- DEFAULT_MODEL=llama2:7b
depends_on:
- ollama
restart: unless-stopped
volumes:
ollama-models:
ollama-data:
version: '3.8'
services:
ollama-complete:
image: longkeyy/ollama-ui:0.0.1-0.11.8
container_name: ollama-complete
ports:
- "11434:11434" # Single port for both API and Web UI
volumes:
- ollama-models:/root/.ollama
- ollama-data:/app/data
environment:
- OLLAMA_HOST=0.0.0.0:11434
- OLLAMA_UI_PORT=11434 # WebUI also uses port 11434
- API_KEY_REQUIRED=true
restart: unless-stopped
# GPU support (uncomment for NVIDIA GPU)
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
volumes:
ollama-models:
ollama-data:
All configuration options can be set via environment variables with the WEBUI_ prefix:
| Variable | Default | Description |
|---|---|---|
WEBUI_SERVER_PORT | 8080 (standalone) / 11434 (AIO) | Web interface port |
WEBUI_SERVER_HOST | 0.0.0.0 | Server listening address |
WEBUI_OLLAMA_URL | http://localhost:11434 | Ollama API endpoint |
WEBUI_OLLAMA_TIMEOUT | 300s | Ollama request timeout |
| Variable | Default | Description |
|---|---|---|
WEBUI_AUTH_USERNAME | admin | Default login username |
WEBUI_AUTH_PASSWORD | admin123 | Default login password (ā ļø Change immediately!) |
WEBUI_AUTH_JWT_SECRET | your-secret-key-change-in-production | JWT secret key |
WEBUI_AUTH_TOKEN_EXPIRE | 3600 | Token expiration time (seconds) |
| Variable | Default | Description |
|---|---|---|
WEBUI_DOWNLOADS_MAX_CONCURRENT | 3 | Max concurrent downloads |
WEBUI_DOWNLOADS_QUEUE_SIZE | 10 | Download queue size |
WEBUI_DOWNLOADS_RETRY_ATTEMPTS | 3 | Retry attempts on failure |
WEBUI_DOWNLOADS_RETRY_DELAY | 5s | Delay between retries |
| Variable | Default | Description |
|---|---|---|
WEBUI_LOGGING_LEVEL | info | Log level (debug, info, warn, error) |
WEBUI_LOGGING_FORMAT | json | Log format (json, text) |
WEBUI_LOGGING_FILE | ollama-webui.log | Log file path |
In the All-in-One version, Ollama runs internally and is not exposed:
| Variable | Default | Description |
|---|---|---|
OLLAMA_HOST | 127.0.0.1:11435 | Ollama internal address (protected) |
OLLAMA_MODELS | /root/.ollama/models | Model storage directory |
OLLAMA_PRELOAD_MODELS | (optional) | Comma-separated models to preload |
/root/.ollama: Ollama models and configuration (All-in-One version)/app/data: Platform data, user settings, API keys, chat history/var/log/supervisor: Service logs (All-in-One version)# Backup platform data
docker run --rm -v ollama-data:/source -v $(pwd):/backup alpine \
tar czf /backup/platform-data-backup.tar.gz -C /source .
# Backup models (All-in-One version)
docker run --rm -v ollama-models:/source -v $(pwd):/backup alpine \
tar czf /backup/models-backup.tar.gz -C /source .
# Restore platform data
docker run --rm -v ollama-data:/target -v $(pwd):/backup alpine \
tar xzf /backup/platform-data-backup.tar.gz -C /target
# Restore models
docker run --rm -v ollama-models:/target -v $(pwd):/backup alpine \
tar xzf /backup/models-backup.tar.gz -C /target
Access the Platform:
http://localhost:8083http://localhost:11434Default Login Credentials:
adminadmin123ā ļø IMPORTANT: Please change the default password immediately after first login!
Change Default Password:
# Set new credentials via environment variables
docker run -d \
-e AUTH_USERNAME=your_username \
-e AUTH_PASSWORD=your_secure_password \
# ...other parameters
Or via configuration file config.yaml:
auth:
username: "your_username"
password: "your_secure_password"
API Key Setup: Configure API keys for remote access
Model Management: Install your first models
OpenAI Compatible:
GET /v1/models - List available modelsPOST /v1/chat/completions - Chat completionsPOST /v1/embeddings - Text embeddingsClaude Compatible:
POST /v1/claude/messages - Claude-style messagingGET /v1/claude/models - Claude model list# OpenAI-style chat
curl -X POST http://localhost:8083/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"model": "llama2:7b",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": false
}'
# Claude-style messaging
curl -X POST http://localhost:8083/v1/claude/messages \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"model": "llama2:7b",
"messages": [{"role": "user", "content": "Hello!"}]
}'
1. Cannot access the web interface
# Check container status
docker ps -a
docker logs ollama-remote
# Verify port accessibility
netstat -tulpn | grep :8083
2. API authentication failures
# Check API key configuration
docker exec ollama-remote cat /app/data/config.yaml
# Verify API key in requests
curl -H "Authorization: Bearer your-key" http://localhost:8083/v1/models
3. Ollama connection issues
# Test Ollama connectivity (All-in-One)
curl http://localhost:11434/api/version
# Test external Ollama (Standalone)
docker exec ollama-remote curl $OLLAMA_API_BASE_URL/api/version
4. Model download problems
# Check available disk space
docker exec ollama-remote df -h
# Monitor download progress
docker logs -f ollama-remote
Memory Management:
# Limit container memory
docker run -d --memory=8g --memory-swap=12g \
# ... other parameters
CPU Allocation:
# Limit CPU usage
docker run -d --cpus=4.0 --cpu-shares=2048 \
# ... other parameters
GPU Optimization:
# Check GPU availability
docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
# Monitor GPU usage
docker exec ollama-complete nvidia-smi
# Platform health check
curl -f http://localhost:8083/health || echo "Platform unhealthy"
# API health check
curl -f http://localhost:8083/v1/models || echo "API unhealthy"
# Ollama service health (All-in-One)
curl -f http://localhost:11434/api/version || echo "Ollama unhealthy"
# View platform logs
docker logs -f ollama-remote
# View specific service logs (All-in-One)
docker exec ollama-complete supervisorctl status
docker exec ollama-complete tail -f /var/log/supervisor/ollama.log
# Stop current container
docker stop ollama-remote
docker rm ollama-remote
# Pull latest image
docker pull longkeyy/ollama-ui:0.0.1-0.11.8
# Restart with same configuration
docker run -d \
--name ollama-remote \
# ... same parameters as before
longkeyy/ollama-ui:0.0.1-0.11.8
# Export current configuration
docker exec ollama-remote cat /app/data/config.yaml > config-backup.yaml
# Import to new version
docker cp config-backup.yaml ollama-remote:/app/data/config.yaml
# Enable load balancing across multiple Ollama instances
docker run -d \
--name ollama-gateway \
-p 8083:8083 \
-e OLLAMA_BACKENDS="http://ollama1:11434,http://ollama2:11434" \
-e LOAD_BALANCE_STRATEGY="round_robin" \
longkeyy/ollama-ui:0.0.1
# Explicitly pull for specific architecture
docker pull --platform linux/amd64 longkeyy/ollama-ui:0.0.1-0.11.8
docker pull --platform linux/arm64 longkeyy/ollama-ui:0.0.1-0.11.8
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ollama-allinone Container ā
ā ā
ā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāā ā
ā ā Ollama (Internal) āāāā WebUI (Public) ā ā
ā ā 127.0.0.1:11435 ā ā 0.0.0.0:11434 ā ā
ā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāā ā
ā ā ā ā
ā āāāāā Protected āāāāāāāā ā
ā ā
ā Supervisor Process Manager ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
External Access: Port 11434 Only
āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā
ā ollama ā ā ollama-ui ā
ā Container āāāāāāā Container ā
ā :11434 ā ā :8083 ā
āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā
š” Ready to deploy? Start with our recommended All-in-One deployment for the complete experience!
Content type
Image
Digest
sha256:72e7f4bccā¦
Size
1.1 GB
Last updated
about 1 year ago
docker pull longkeyy/ollama-ui