The Ollama command-line client and background server can be updated at different times. Their version numbers reveal whether the installed client and the server answering requests are on the same release.

A newer binary on PATH does not replace a server that is already running. The version printed by the CLI normally comes from that server, with a separate client warning when the versions differ.

The CLI follows OLLAMA_HOST, while an HTTP request uses the address in its URL. Version comparisons are meaningful only when both requests target the same server.

Steps to check the Ollama version:

  1. Read the version reported by the Ollama CLI.
    $ ollama --version
    ollama version is 0.40.12

    The ollama version is line reports the server version. When the versions differ, an additional Warning: client version is ... line identifies the client version. Without that warning, the version strings match.
    Related: How to manage the Ollama service

    If no server is reachable, the CLI instead prints a connection warning and the client version, even though the command can exit successfully. That output does not establish a running server version.

    Warning: could not connect to a running Ollama instance
    Warning: client version is 0.40.12
  2. Read the local Ollama server version from the API.
    $ curl --fail --silent --show-error http://localhost:11434/api/version
    {"version":"0.40.12"}

    The JSON version value identifies the responding server and should match the CLI's server-version line for the same endpoint. If OLLAMA_HOST selects another host or port, the URL must use that same address for a comparison. A connection error supplies no server version; an HTTP error makes curl fail rather than treating an error page as version output.
    Related: How to start the Ollama server

Share this guide