A sample config for an Ollama listener on a public address
The environment variable and the two routes that matter once Ollama is bound on a public host.
Ollama reads the listen address from OLLAMA_HOST. The value is a host and port, not a URL path. 127.0.0.1:11434 stays on the machine. 0.0.0.0:11434 accepts connections on every interface. A systemd drop-in is the usual place to set it so a package upgrade does not wipe the choice.
After the process restarts, GET /api/tags is the check that does not require a prompt. Then POST /api/chat with stream set to false. The model field is a name the client chooses. This host reports llama3.2:latest from the tags route.
No API key is part of that configuration. Clients that add an Authorization header are still answered. Clients that omit it are answered too.
On this host
This host is already bound that way. The address is datattention.com (194.238.25.127), port 11434, with no API key.
# /etc/systemd/system/ollama.service.d/override.conf
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
curl http://datattention.com:11434/api/tags
The full list of ports and paths is on the endpoints page.