Run Ollama on a Cloud GPU with a Public HTTPS API in Two Minutes

Step by step: rent an RTX 4090 or 5090 by the minute, get Ollama running with a public OpenAI-compatible endpoint on cloudgpu.app, and call it from curl, Python or Cursor. Explains what happens under the hood.

CloudGPU··6 min read
Run Ollama on a Cloud GPU with a Public HTTPS API in Two Minutes

Ollama is the easiest way to run open models, and a rented GPU is the easiest way to run Ollama when your laptop cannot. The annoying part has always been the last step: getting a URL you can call from somewhere else. This guide gets you from zero to curl https://…/api/chat in about two minutes, and explains what is happening so you can debug it when something is off.

Everything below was run on 6 September 2026 on cloudgpu.app. Times are what we measured that day.

What you need

  • A cloudgpu.app account with a small balance. A small top-up covers this whole guide on a 4090 many times over.
  • Nothing else. No CLI, no SSH key, no Docker.

Not sure which card to pick? See choosing a GPU for Ollama.

Step 1: Deploy the Ollama template

Go to Deploy, choose Ollama, choose a card, click Deploy.

Which card:

Card Good for
RTX 3090 (24 GB) 7B to 13B models
RTX 4090 (24 GB) 7B to 14B at full speed, 32B at 4-bit tightly
RTX 5090 (32 GB) 32B at 4-bit with room for context, fastest FP8

Per-minute rates for each card are on the pricing page.

The template ships with Ollama already running and a small model (qwen2.5:0.5b) pre-pulled so you can test the pipe before pulling something big.

Step 2: Wait about 2 minutes

The dashboard shows the instance as starting, then running. In our test both the RTX 4090 and the RTX 5090 were running and reachable in about 2 minutes.

When it flips to running you get two things on the instance row: an SSH command, and an API endpoint that looks like

https://5a18f8b218351513-i.cloudgpu.app

That endpoint is your Ollama server. It is only reachable while the instance runs, and the id is random, so keep it private.

Step 3: Call it

List models:

curl https://5a18f8b218351513-i.cloudgpu.app/api/tags

Chat (non-streaming):

curl https://5a18f8b218351513-i.cloudgpu.app/api/chat -d '{
  "model": "qwen2.5:0.5b",
  "stream": false,
  "messages": [{"role": "user", "content": "Say hello in five words."}]
}'

The first call after deploy takes a while. Ollama loads the model into VRAM on first use; for the 0.5B test model that was about 80 seconds in our run, and it scales with model size. Every call after that is fast. In our test a short chat completion round-tripped through Cloudflare in about one second.

If you want the first token immediately instead of waiting for the whole answer, stream:

curl https://5a18f8b218351513-i.cloudgpu.app/api/generate -d '{"model":"qwen2.5:0.5b","prompt":"hi","stream":true}'

Step 4: Use it from your tools

Ollama exposes an OpenAI-compatible endpoint at /v1, so anything that talks to OpenAI can talk to your box.

Python (openai SDK):

from openai import OpenAI

client = OpenAI(
    base_url="https://5a18f8b218351513-i.cloudgpu.app/v1",
    api_key="ollama",  # Ollama ignores the key but the SDK requires one
)
r = client.chat.completions.create(
    model="qwen2.5:0.5b",
    messages=[{"role": "user", "content": "Explain LoRA in one sentence."}],
)
print(r.choices[0].message.content)

Cursor / Cline / Continue: set the provider to OpenAI-compatible, base URL https://<your-id>-i.cloudgpu.app/v1, any non-empty API key, model name as listed by /api/tags.

Step 5: Pull the model you actually want

The test model is there to prove the pipe works. Pull a real one either from the dashboard (Pull model) or over SSH:

ssh root@<host> -p <port>
ollama pull qwen3:32b        # ~20 GB, fits a 5090 at 4-bit
ollama pull deepseek-r1:14b  # fits a 4090 comfortably

Download speed from the data centres we use is typically 100 to 200 MB/s, so a 20 GB model is about two to three minutes.

Step 6: Stop it

Click Destroy on the dashboard when you are done. Billing is per minute and the unused part of the pre-authorised hour goes back to your balance. There is no idle shutdown by default; if you want the box to live for a week, it can, as long as the balance covers it. You get emails six hours and one hour before the balance runs out.

What is actually happening

This part is for people who like to know why it works, and it is the reason the guide exists at all.

Most affordable GPU suppliers only expose one thing to the internet: JupyterLab on port 8888. Ollama’s port 11434 is unreachable from outside. Worse, the instances sit behind the supplier’s transparent HTTP proxy, so even outbound curl to arbitrary hosts on ports 80 and 443 fails or hangs.

When your instance boots, our backend logs in over SSH and installs a 16 MB reverse-tunnel client (frpc) that connects out on a high port to our server and forwards only the template’s API port. On our side, the tunnel is published as https://<id>-i.cloudgpu.app behind Cloudflare. Three things keep this from being a liability:

  • The id is 16 random hex characters. Ollama has no authentication, so unguessable is the minimum.
  • Our tunnel server asks our backend before accepting any tunnel, and only accepts the exact domain we registered for that instance. A token leaked from one instance cannot register a different name.
  • Each tunnel is capped at 3 MB/s. Plenty for tokens, useless as a file mirror. Big downloads go through JupyterLab or SSH on the supplier’s own network.

JupyterLab, SSH and file transfers stay on the supplier’s URL. Only the API port rides our tunnel, which keeps our bandwidth bill boring and your model downloads fast.

Costs for this guide

Running through every step took us 11 minutes on an RTX 4090 and 12 minutes on an RTX 5090; the per-minute rates are on the pricing page. A small top-up covers it many times over; top up on the billing page.

Troubleshooting

  • The API endpoint is missing on the instance row. The tunnel install is best-effort. If it failed, the instance still works over SSH; use ssh -L 11434:127.0.0.1:11434 root@<host> -p <port> and call http://localhost:11434. Tell us on the contact page with the instance id so we can look at the log.
  • 504 on the first call. The model is still loading. Retry, or use streaming.
  • 404 with a Cloudflare page. The instance has been destroyed or the tunnel dropped; check the dashboard.
  • Slow first token on a big model. That is VRAM loading. A 20 GB model takes roughly 10 to 20 seconds on a 5090’s PCIe 5 link once the weights are on local disk.

Questions or a template you would like added? Contact us.

Try cloudgpu.app — no credit card required

No credit card required. Per-minute billing, deploy in about 2 minutes.