Run LLM on DigitalOcean — GPU Droplet Setup Guide
Step-by-step guide to running large language models on DigitalOcean GPU Droplets. Set up Ollama, deploy your first model, and keep cloud costs under control.
DigitalOcean GPU Droplets give you access to powerful GPUs with the same simple interface you're used to. This guide walks you through setting up Ollama and running large language models on DigitalOcean.
Why DigitalOcean?
- Familiar interface if you already use DO
- Reliable infrastructure with good uptime
- Predictable billing through your existing DO account
- Good documentation and support
Available GPUs
| GPU | VRAM | Price/hr | Best For |
|---|---|---|---|
| A100 40GB | 40 GB | ~$1.10 | Models up to 30B |
| H100 80GB | 80 GB | ~$2.93 | Models up to 70B |
DigitalOcean doesn't offer consumer GPUs like the RTX 4090. If you need cheaper GPU options, consider Runpod.
Step 1: Create a GPU Droplet
- Log in to your DigitalOcean account
- Click Create → Droplets
- Under Choose Image, select Ubuntu 22.04
- Under Choose Plan, select GPU Droplets
- Choose your GPU:
- A100 40GB for models up to 30B parameters
- H100 80GB for models up to 70B parameters
- Select a data center region
- Add your SSH key
- Click Create Droplet
Wait 2-3 minutes for the Droplet to provision.
Step 2: Install NVIDIA Drivers
Connect via SSH and install the GPU drivers:
# Update system
sudo apt update && sudo apt upgrade -y
# Install NVIDIA drivers
sudo apt install -y nvidia-driver-535
sudo rebootAfter reboot, verify the GPU:
nvidia-smiYou should see your A100 or H100 listed with available VRAM.
Step 3: Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Verify
ollama --versionStep 4: Download and Run Models
# For A100 40GB — run models up to 30B
ollama pull llama3.1:8b
ollama pull qwen2.5:14b
ollama pull deepseek-r1:8b
# For H100 80GB — can run 70B models
ollama pull llama3.1:70b
ollama pull qwen2.5:32b
# Start chatting
ollama run llama3.1:8bStep 5: Expose the API (Optional)
To access Ollama from external applications:
# Set Ollama to listen on all interfaces
sudo systemctl edit ollama
# Add:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
# Restart
sudo systemctl restart ollamaSet Up Firewall
# Allow HTTP/HTTPS
sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 11434
sudo ufw enableSet Up Nginx Reverse Proxy (Recommended)
For production use, put Ollama behind Nginx with HTTPS:
sudo apt install -y nginx certbot python3-certbot-nginx
# Create Nginx config
sudo tee /etc/nginx/sites-available/ollama << 'EOF'
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:11434;
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;
# Required for streaming
proxy_buffering off;
proxy_read_timeout 300s;
}
}
EOF
sudo ln -s /etc/nginx/sites-available/ollama /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
# Add HTTPS
sudo certbot --nginx -d your-domain.comStep 6: Add Open WebUI (Optional)
docker run -d -p 3000:8080 \
-e OLLAMA_BASE_URL=http://localhost:11434 \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:mainAccess at http://your-droplet-ip:3000.
Cost Management
Tips to Keep Costs Low
- Power off when not in use — you only pay while the Droplet is running
- Use snapshots — create a snapshot before powering off to restore quickly
- Start with A100 — it's cheaper than H100 and sufficient for most models
- Monitor usage — set up billing alerts in the DO dashboard
Cost Estimates
| GPU | Usage | Monthly Cost |
|---|---|---|
| A100 40GB | 2 hrs/day | ~$66 |
| A100 40GB | 4 hrs/day | ~$132 |
| H100 80GB | 2 hrs/day | ~$176 |
| H100 80GB | 4 hrs/day | ~$352 |
DigitalOcean is more expensive than Runpod per hour. The trade-off is reliability, support, and ecosystem integration.
DigitalOcean vs Runpod
| Aspect | DigitalOcean | Runpod |
|---|---|---|
| Cheapest GPU | $1.10/hr (A100) | $0.20/hr (RTX 4000) |
| GPU Selection | Limited (A100, H100) | Wide (consumer to enterprise) |
| One-Click Templates | No | Yes |
| Support | Ticket-based | Community |
| Reliability | High | Good |
| Best For | DO users, enterprise | Most users, best value |
If cost is your primary concern, Runpod is significantly cheaper. If you value DO's reliability and ecosystem, GPU Droplets are a solid choice.
Summary
DigitalOcean GPU Droplets work well for running LLMs, especially if you're already in the DO ecosystem. Setup takes about 30 minutes including drivers, Ollama, and optional Nginx configuration. Costs are higher than Runpod, but you get DO's reliability and support.
Next Steps
- Best GPU Cloud for LLM — compare all providers
- Runpod Beginner Guide — cheaper alternative
- Cheapest Way to Run LLM — cost optimization
Author

Categories
More Posts
Open WebUI vs AnythingLLM — Which Local AI Interface Is Right for You?
ComparisonOpen WebUI and AnythingLLM both add chat interfaces to local AI, but serve very different needs. Compare features, RAG capabilities, and ease of use.

How to Run Qwen Locally — Alibaba's Powerful Multilingual Model
TutorialRun Qwen 2.5 models on your own computer — one of the best open models for coding, multilingual tasks, and general use. Works on devices with 8GB RAM or more.

Run Open WebUI on Runpod — Cloud ChatGPT in 10 Minutes
TutorialDeploy Open WebUI with Ollama on Runpod for a private, ChatGPT-like experience on cloud GPU. Access your AI assistant from any device with a web browser.
