Key takeaways
- Ollama's local base URL is http://localhost:11434; the OpenAI-compatible base URL is http://localhost:11434/v1.
- Change where Ollama listens with the OLLAMA_HOST environment variable, and use the container or server name when calling from Docker or another machine.
- A base URL is the common prefix of every endpoint in an API; clients add paths such as /api/chat to it.
- ollama ps shows which models are loaded, their memory use, and whether they run on GPU or CPU.
- Update Ollama with the installer or app on Windows and macOS, and by re-running the install script on Linux.
The Ollama base URL is http://localhost:11434 on the machine where Ollama runs; its native API lives under /api, such as /api/chat, and its OpenAI-compatible API under /v1. You change it with the OLLAMA_HOST setting or by calling a different host. This page explains how to find the base URL in different setups, the cloud URL, what a base URL is, the essential Ollama commands including ollama ps, how to update, what ollama.exe is, a good setup for development, and when Ollama launched.
What is the Ollama base URL?
By default, Ollama listens on http://localhost:11434. Tools that use Ollama's native API need that base URL; tools that speak the OpenAI API format use http://localhost:11434/v1.
Also asked as: what is ollama base url
Examples of where you enter it:
- LangChain:
ChatOllama(base_url="http://localhost:11434", model="llama3.2"). - OpenAI SDK:
OpenAI(base_url="http://localhost:11434/v1", api_key="ollama"). - Web UIs and editor extensions: an "Ollama URL" or "API base" setting.
Test it by opening http://localhost:11434 in a browser; it replies "Ollama is running" when the server is up. If it does not, start the Ollama app or run ollama serve.
Where do I find the Ollama base URL?
It is http://localhost:11434 unless someone changed it. If Ollama runs elsewhere, the base URL is that machine's address and port: a server's IP, a Docker service name, or a custom host set with OLLAMA_HOST.
Also asked as: where to find ollama base url
Common setups:
- Same machine:
http://localhost:11434. - Docker Compose:
http://ollama:11434, using the service name from another container. - From a Docker container to Ollama on the host:
http://host.docker.internal:11434on Docker Desktop. - Another computer on your network:
http://<server-ip>:11434, after settingOLLAMA_HOST=0.0.0.0on the server.
Opening Ollama to the network exposes an API with no login, so restrict access with a firewall, VPN or authenticated reverse proxy.
What is the Ollama cloud base URL?
For Ollama's hosted cloud models, the API is served from ollama.com, and requests need an API key from your Ollama account. Alternatively, sign in your local Ollama and keep using localhost:11434, which forwards cloud-model requests for you.
Also asked as: what is ollama cloud base url
Direct calls look like requests to https://ollama.com/api/chat with an Authorization: Bearer <key> header and a cloud model name. Using the local app as a gateway is simpler for development, because your code does not change between local and cloud models except for the model name. Keep the key in an environment variable. Check Ollama's documentation for the current cloud endpoints, as the service is still evolving.
What is a base URL in an API?
A base URL is the common starting part of every request to an API: the scheme, host, port and sometimes a version path. Each endpoint adds its own path to it.
Also asked as: what is base url in api
For example, with a base URL of http://localhost:11434, the chat endpoint is http://localhost:11434/api/chat and the model list is http://localhost:11434/api/tags. For OpenAI-style clients the base URL includes /v1, and the client adds /chat/completions. Keeping the base URL in configuration, such as an environment variable, lets the same code talk to a local server in development and a hosted service in production. Many integration bugs come from a missing or extra /v1 or a trailing slash, so check that first.
What are the main Ollama commands?
The commands you will use most are ollama run, pull, list, ps, stop, rm, show, create and serve.
Also asked as: what are ollama commands
ollama run llama3.2 # chat with a model (downloads it first if needed)
ollama pull qwen2.5:7b # download or update a model
ollama list # installed models and sizes
ollama ps # models loaded in memory, CPU or GPU
ollama stop llama3.2 # unload a model to free memory
ollama rm llama3.2 # delete a model from disk
ollama show llama3.2 # details, parameters, template
ollama create mymodel -f Modelfile # build a custom model
ollama serve # start the server manually
Inside a chat, /bye exits and /set changes options. ollama help lists everything for your version.
What does ollama ps do?
ollama ps lists the models currently loaded in memory, with their size, how much runs on GPU versus CPU, and when each will be unloaded. It is the quickest way to diagnose slow responses.
If the processor column shows 100% GPU, the model fits in video memory and runs fast. A split such as 40% CPU and 60% GPU means part of the model did not fit, which slows responses sharply; try a smaller model or quantisation, or reduce the context size. Models stay loaded for a few minutes after the last request so follow-ups are quick, then unload automatically. Use ollama stop <model> to unload one immediately, for example before running another memory-hungry program.
How do I update Ollama?
On Windows and macOS, the app checks for updates and offers to restart into the new version; you can also download and run the latest installer. On Linux, re-run the official install script. In Docker, pull the new image and recreate the container.
Also asked as: how ollama update
curl -fsSL https://ollama.com/install.sh | sh # Linux
docker pull ollama/ollama # Docker, then recreate the container
Updating Ollama does not update your models. To refresh a model to its latest version, run ollama pull <model> again; only changed layers download. Check the version with ollama --version. After major updates, read the release notes, because defaults such as context length or engine behaviour can change.
What is ollama.exe?
ollama.exe is the Ollama program on Windows: the command-line tool and server that run local language models. It is legitimate when installed from ollama.com and located in your user's Ollama install folder.
When the Ollama app runs, ollama.exe serves the local API on port 11434 and loads models into memory, so it can use significant RAM or GPU memory while a model is active. That is expected. To stop it, quit Ollama from the system tray. If you find ollama.exe on a computer where you never installed Ollama, or in an unusual folder, treat it as suspicious and scan the system, since malware can use familiar names.
What is the best Ollama setup?
For development, run Ollama natively with GPU support, keep two or three models you actually use, store models on a drive with space, raise the context size when you need it, and connect a chat UI and your code to the same local server.
A practical setup:
- Models: a general 7B or 8B instruct model, a coding model, and an embedding model for RAG.
- Storage: set
OLLAMA_MODELSto a large drive. - Interface: Ollama's app or a web UI for chat; LangChain or plain HTTP for code.
- Docker: for servers, run the official image with a persistent volume and GPU access.
- Security: keep the API on localhost unless protected by authentication.
Check ollama ps regularly to confirm models run on the GPU.
When did Ollama launch?
Ollama launched in 2023, first for macOS, then expanded to Linux and later Windows. It grew quickly as open-weight models such as Llama made local language models practical on ordinary hardware.
Since launch, it has added a large model library, an OpenAI-compatible API, support for vision and embedding models, tool calling, a desktop app interface and optional cloud models. It is open source under the MIT licence, built on the GGML ecosystem that also powers llama.cpp. Its simple ollama run experience is a large part of why running models locally became common among students and developers.





