$ ssh root@your_droplet_ip
ssh root@your_droplet_ip
ssh root@your_droplet_ip
-weight: 500;">apt -weight: 500;">update && -weight: 500;">apt -weight: 500;">upgrade -y
-weight: 500;">apt -weight: 500;">install -y -weight: 500;">curl -weight: 500;">wget -weight: 500;">git build-essential
-weight: 500;">apt -weight: 500;">update && -weight: 500;">apt -weight: 500;">upgrade -y
-weight: 500;">apt -weight: 500;">install -y -weight: 500;">curl -weight: 500;">wget -weight: 500;">git build-essential
-weight: 500;">apt -weight: 500;">update && -weight: 500;">apt -weight: 500;">upgrade -y
-weight: 500;">apt -weight: 500;">install -y -weight: 500;">curl -weight: 500;">wget -weight: 500;">git build-essential
-weight: 500;">curl https://ollama.ai/-weight: 500;">install.sh | sh
-weight: 500;">curl https://ollama.ai/-weight: 500;">install.sh | sh
-weight: 500;">curl https://ollama.ai/-weight: 500;">install.sh | sh
ollama --version
ollama --version
ollama --version
-weight: 500;">systemctl -weight: 500;">start ollama
-weight: 500;">systemctl -weight: 500;">enable ollama
-weight: 500;">systemctl -weight: 500;">start ollama
-weight: 500;">systemctl -weight: 500;">enable ollama
-weight: 500;">systemctl -weight: 500;">start ollama
-weight: 500;">systemctl -weight: 500;">enable ollama
-weight: 500;">curl http://localhost:11434/api/tags
-weight: 500;">curl http://localhost:11434/api/tags
-weight: 500;">curl http://localhost:11434/api/tags
ollama pull llama2:13b-chat-q4_K_M
ollama pull llama2:13b-chat-q4_K_M
ollama pull llama2:13b-chat-q4_K_M
ollama pull llama2:13b
ollama pull llama2:13b
ollama pull llama2:13b
ollama pull neural-chat
ollama pull neural-chat
ollama pull neural-chat
-weight: 500;">curl http://localhost:11434/api/tags
-weight: 500;">curl http://localhost:11434/api/tags
-weight: 500;">curl http://localhost:11434/api/tags
{ "models": [ { "name": "llama2:13b-chat-q4_K_M", "modified_time": "2024-01-15T10:23:45.123Z", "size": 7365591424, "digest": "abc123..." } ]
}
{ "models": [ { "name": "llama2:13b-chat-q4_K_M", "modified_time": "2024-01-15T10:23:45.123Z", "size": 7365591424, "digest": "abc123..." } ]
}
{ "models": [ { "name": "llama2:13b-chat-q4_K_M", "modified_time": "2024-01-15T10:23:45.123Z", "size": 7365591424, "digest": "abc123..." } ]
}
-weight: 500;">curl http://localhost:11434/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "What is the fastest way to learn Rust?", "stream": false
}'
-weight: 500;">curl http://localhost:11434/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "What is the fastest way to learn Rust?", "stream": false
}'
-weight: 500;">curl http://localhost:11434/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "What is the fastest way to learn Rust?", "stream": false
}'
{ "model": "llama2:13b-chat-q4_K_M", "created_at": "2024-01-15T10:25:30.123Z", "response": "The fastest way to learn Rust is to...", "done": true, "total_duration": 850000000, "load_duration": 50000000, "prompt_eval_count": 12, "eval_count": 87
}
{ "model": "llama2:13b-chat-q4_K_M", "created_at": "2024-01-15T10:25:30.123Z", "response": "The fastest way to learn Rust is to...", "done": true, "total_duration": 850000000, "load_duration": 50000000, "prompt_eval_count": 12, "eval_count": 87
}
{ "model": "llama2:13b-chat-q4_K_M", "created_at": "2024-01-15T10:25:30.123Z", "response": "The fastest way to learn Rust is to...", "done": true, "total_duration": 850000000, "load_duration": 50000000, "prompt_eval_count": 12, "eval_count": 87
}
-weight: 500;">apt -weight: 500;">install -y nginx
-weight: 500;">systemctl -weight: 500;">start nginx
-weight: 500;">systemctl -weight: 500;">enable nginx
-weight: 500;">apt -weight: 500;">install -y nginx
-weight: 500;">systemctl -weight: 500;">start nginx
-weight: 500;">systemctl -weight: 500;">enable nginx
-weight: 500;">apt -weight: 500;">install -y nginx
-weight: 500;">systemctl -weight: 500;">start nginx
-weight: 500;">systemctl -weight: 500;">enable nginx
nano /etc/nginx/sites-available/ollama
nano /etc/nginx/sites-available/ollama
nano /etc/nginx/sites-available/ollama
server { listen 80; server_name _; client_max_body_size 50M; location / { proxy_pass http://127.0.0.1:11434; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "-weight: 500;">upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; }
}
server { listen 80; server_name _; client_max_body_size 50M; location / { proxy_pass http://127.0.0.1:11434; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "-weight: 500;">upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; }
}
server { listen 80; server_name _; client_max_body_size 50M; location / { proxy_pass http://127.0.0.1:11434; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "-weight: 500;">upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300s; }
}
ln -s /etc/nginx/sites-available/ollama /etc/nginx/sites-enabled/
nginx -t
-weight: 500;">systemctl reload nginx
ln -s /etc/nginx/sites-available/ollama /etc/nginx/sites-enabled/
nginx -t
-weight: 500;">systemctl reload nginx
ln -s /etc/nginx/sites-available/ollama /etc/nginx/sites-enabled/
nginx -t
-weight: 500;">systemctl reload nginx
-weight: 500;">curl http://your_droplet_ip/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "Hello!", "stream": false
}'
-weight: 500;">curl http://your_droplet_ip/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "Hello!", "stream": false
}'
-weight: 500;">curl http://your_droplet_ip/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "Hello!", "stream": false
}'
-weight: 500;">apt -weight: 500;">install -y apache2-utils
htpasswd -c /etc/nginx/.htpasswd apiuser
-weight: 500;">apt -weight: 500;">install -y apache2-utils
htpasswd -c /etc/nginx/.htpasswd apiuser
-weight: 500;">apt -weight: 500;">install -y apache2-utils
htpasswd -c /etc/nginx/.htpasswd apiuser
server { listen 80; server_name _; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; # ... rest of config
}
server { listen 80; server_name _; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; # ... rest of config
}
server { listen 80; server_name _; auth_basic "Restricted"; auth_basic_user_file /etc/nginx/.htpasswd; # ... rest of config
}
-weight: 500;">systemctl reload nginx
-weight: 500;">systemctl reload nginx
-weight: 500;">systemctl reload nginx
-weight: 500;">curl -u apiuser:yourpassword http://your_droplet_ip/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "Test", "stream": false
}'
-weight: 500;">curl -u apiuser:yourpassword http://your_droplet_ip/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "Test", "stream": false
}'
-weight: 500;">curl -u apiuser:yourpassword http://your_droplet_ip/api/generate -d '{ "model": "llama2:13b-chat-q4_K_M", "prompt": "Test", "stream": false
}' - Latency: 800-1200ms per 100-token response (CPU)
- Throughput: ~15 requests/minute on a single Droplet
- Uptime: 99.7% (no GPU driver crashes)
- Monthly cost: $12 + storage - A DigitalOcean Droplet running Ollama (the LLM runtime)
- Llama 3.2 11B GGUF model loaded and ready
- A simple API endpoint you can call from anywhere
- Monitoring so you know when something breaks
- A backup plan (I'll show you OpenRouter as a fallback) - Image: Ubuntu 24.04 LTS
- Size: Basic, 2 vCPU / 2GB RAM ($12/month)
- Region: Pick one close to your users (NYC3, SFO3, etc.)
- Authentication: SSH key (non-negotiable for security) - Deploy your projects fast → DigitalOcean — get $200 in free credits
- Organize your AI workflows → Notion — free to -weight: 500;">start
- Run AI models cheaper → OpenRouter — pay per token, no subscriptions