Why upgrading Ollama needs a pinned version and a change process
Controlled upgrades and version pinning keep a shared Ollama server stable for the people who depend on it. When many users, applications or scripts call one server, a new release can change model behavior, API responses or startup settings without warning them. Ollama ships releases often. The GitHub releases page shows v0.40.5 released on 14 October 2026, followed two days later by v0.40.6, which was published as a pre-release on 16 October 2026. Two releases in one week is a useful signal: if you update whenever a new tag appears, you will be changing production every few days.
Pre-releases should not reach production by default. Treat them as material for a test server, where you can run your own prompts, your API clients and your model list against the candidate version. Record which tag is running on each server, and make a pinned version the standard state. Before you choose a target, check the Ollama GitHub releases page for the release notes and whether the tag is marked as a pre-release. Confirm the current release status on the day you plan the change, since release labels and notes can change after publication.
The practical step is a change process with three parts: a named owner who approves each version change, a staging server that mirrors production's model set and settings, and a written rollback path that names the previous version to reinstall. Ask your team to confirm who receives Ollama security advisories and who checks them, because a pinned version still needs regular review. The sections that follow cover how to install a specific version, how container tags work and how to roll back a bad release.
How install method changes the upgrade path
On Linux, the usual route is to re-run the official install script. It places the Ollama binary and service files on the host, so an upgrade uses the same command as the first install. The version on the server is whatever the script resolved at run time, which means nothing is pinned unless the operator adds a pin of their own. Confirm the exact script behavior, including where it places files and whether it changes the service definition, in the official documentation.
- Re-running is the upgrade: running the script again replaces the binary, and the service restarts, so schedule a maintenance window.
- The version is implicit: the host reports what it installed, but the decision to install that version lives in your change record, not in the script.
- Custom settings need checking: confirm that service overrides and the
OLLAMA_MODELSpath survive a re-run on your distribution. - Rollback is manual: keep a copy of the previous binary or record the exact version to reinstall.
Run ollama --version before and after each upgrade and record both results in the change log.
Setting OLLAMA_VERSION tells the install script which release to fetch, which turns the version into an explicit input to your automation. Teams use this to run the same build on several hosts or to hold a release back while they review it. The operator owns the version list from that point on. Confirm the accepted format of the variable, including whether a leading v is expected, and whether it applies to every install path, in the official install documentation. Release notes and pre-release status are listed on the Ollama GitHub releases page.
- Version as configuration: store the pinned version in your configuration management so every host receives the same build.
- Pre-releases need a separate lane: a pre-release such as v0.40.6, published on 16 October 2026, should go through a test host before any production decision.
- Stage before production: pin the candidate on a non-production host and run your own API checks before changing shared servers.
- Drift detection: compare installed versions across hosts on a schedule so a manual install does not go unnoticed.
Before relying on the pin, confirm the exact OLLAMA_VERSION syntax and test that a re-run installs the requested version and nothing else.
In containers, the version is carried by the image tag, and the runtime uses whatever image it pulls. A floating tag such as latest can change the build the next time a container is recreated, so the change happens during a restart rather than during a planned upgrade. Pinning a specific tag, and preferably recording its digest in your own registry, gives you a fixed artifact to approve and roll back to. Confirm which tags are published for the official image and what each one contains before you write them into manifests.
- Avoid floating tags in production: a pod or container restart can pull a different build without a change record.
- Mirror and record digests: copy the approved image into your registry and store its digest, so you know the exact bytes that ran.
- Model data must persist: the model directory has to live on a volume that survives the container being replaced, or each upgrade starts with a full re-pull.
- GPU runtime compatibility: a new image can depend on host drivers or the container runtime configuration, so test GPU detection before rollout.
After each rollout, compare the running image digest with the digest in your approved record.
On macOS, Windows and individual Linux workstations, the installed application or installer typically manages its own updates for the person using it. Automatic updates can move people to different versions without a change record, which matters when several users call the same models or share prompts and tooling. Operators need a policy that states who may update, how versions are reported and whether automatic updates can be turned off in their environment. Confirm the update behavior of each installer and its management options in the official documentation.
- User-driven updates: the person running the app decides when to update unless your policy and tooling say otherwise.
- Version inventory is your job: endpoint management tools need to collect the installed version, because the shared server's records do not cover workstations.
- Mixed fleets behave differently: users on different versions can see different responses from the same workflow, which complicates troubleshooting.
- Local model storage is separate: models pulled to a workstation are not covered by the server's upgrade or backup record.
Before allowing workstation use for production work, confirm the update settings and how the installed version can be reported through your endpoint management tool.
Version pinning options and when each fits
This table compares five ways to set the Ollama version on a server, from following the latest release to holding back pre-releases. Read each row for when the option fits, what it risks and what to verify before you commit to it.
| Option | When it fits | Risks | Verify before choosing |
|---|---|---|---|
| Follow latest by re-running the install script | Single developer workstations or test hosts where a fast fix matters more than repeatable builds | Each run can pull a different release, so two servers installed on different days may behave differently and a bad release lands without review | Which release the script installs on your platform, and whether your team tests each change before it reaches shared servers |
| Pin a specific release with OLLAMA_VERSION | Shared production servers where you want a known version, a staged rollout and a clear rollback target | You must track releases yourself and move the pin deliberately, so security fixes wait until someone schedules the change | That the pinned version exists in the release list, that your installer reads OLLAMA_VERSION in the way your deployment expects, and that the same version is recorded in your change log |
| Pin a container image by version tag | Containerized deployments managed by an orchestrator or compose files, where image digests and tags are reviewed like code | A floating tag such as latest changes under you on the next pull, and a pinned tag still needs an update process for patches | Which tags the image publishes, whether your registry mirrors them, and whether you pin by digest for stricter control |
| Hold back pre-releases | Any server that serves users, so that release candidates and pre-release builds do not reach production | A pre-release can carry fixes you need, so holding back too long delays patching, and a pre-release may still reach you if the install path does not filter it | How the release page marks pre-releases (v0.40.6 was published as a pre-release), and whether your install method can exclude them |
| Track security advisories and patch on a schedule | Every production server, regardless of which pinning method you choose | A pin without a review of advisories can leave a known issue in place for months | The GitHub security advisories for the repository, your agreed patch window and who approves moving the pin |
Running a controlled Ollama upgrade on a shared server
This sequence turns an Ollama upgrade from an improvised install into a recorded, reversible change, so users of a shared server see a known version, known models and a confirmed API before the maintenance window closes.
Record the current version and state
The server administrator runs
ollama --versionon the production host and saves the output with the date, the host name and the install method (install script, package manager, or container image tag). They also runollama psand list installed models so the pre-upgrade baseline is on record. This entry is the version you will return to if the upgrade goes wrong. The step is done when the baseline sits in your change ticket and someone other than the administrator can read it.Read the release notes and known issues
Before choosing a target, the administrator reads the release notes for every version between the current one and the target on the Ollama GitHub releases page, noting changes to API behavior, environment variables, GPU support and model handling. Pre-releases are flagged there and should be treated as test candidates rather than production targets. Confirm whether any change affects the models, client tools or bind address your users depend on. The step is done when the target version and a short list of items to verify are written into the change ticket.
Test on a staging host with matching hardware
The team installs the target version on a staging host that matches production as closely as possible: the same GPU vendor and driver stack, the same operating system or container runtime, and the same model files. They load the models that real users call most often and run a few representative prompts, including one with a long context if users rely on it. Compare load times and output against the baseline recorded earlier. The step is done when staging shows the expected models loading on the expected GPU, with no new errors in the logs.
Back up the model directory and configuration
Before touching production, the administrator copies the model directory (the path set by
OLLAMA_MODELS, or the platform default such as/usr/share/ollama/.ollama/modelson Linux) and the service configuration, including any systemd override files and environment settings such asOLLAMA_HOST,OLLAMA_NUM_PARALLELandOLLAMA_NO_CLOUD. Store the copy on separate storage and confirm the size matches the source. Model files can be large, so ask the infrastructure team how long the copy takes and how much free space it needs before scheduling. The step is done when a restore location is named and a test listing of the backup matches the source.Apply the upgrade in a maintenance window
During an agreed maintenance window, the administrator stops active use, then applies the target version. On a host installed with the install script, this means re-running the script with
OLLAMA_VERSIONset to the exact tag; for containers, it means changing the image tag to the pinned version and recreating the container. Warn users in advance, since in-flight requests and loaded models are affected. The step is done whenollama --versionreports the target version on the production host and the service starts without errors in the logs.Check loaded models and running state
After the service restarts, the administrator runs
ollama psto confirm the server is running and to see which models are loaded and whether they sit on the GPU or partly on the CPU. Compare the result with the staging host and the pre-upgrade baseline. If a model that should use the GPU shows CPU placement, stop and investigate before users return. The step is done when the loaded state matches the baseline and no unexpected offload appears.Load a representative model and test the API
The administrator sends a request to a representative model through the API, then confirms the server answers on the expected bind address and port, for example
127.0.0.1:11434by default or the address set inOLLAMA_HOST. Test from a client machine too, through any reverse proxy in front of the server, so the path users take is verified. Check that the response arrives and that the logs show a clean model load. The step is done when the test returns a valid answer from both the server and a remote client, and the results are attached to the change ticket.Pin the version and record the outcome
The administrator pins the confirmed version in the install method so a later reinstall or package update does not move it silently, for example by keeping the
OLLAMA_VERSIONvalue in configuration management or the container image tag in the deployment file. They then record the final version, the test results, the rollback point and any issues in the change ticket, and notify users that the upgrade is complete. Keep the backup until the team has agreed that the release has run cleanly. The step is done when the pinned version and outcome are documented and the rollback point is still available.
How a release moves from advisory to production
The path starts when an Ollama release or a GitHub security advisory is published, so the team reads the release notes and advisory first. The release then goes to a staging server that mirrors production, where the team runs its own API checks and model loads. An approval gate decides whether the pinned version in the production configuration changes. After the upgrade, health checks confirm the API answers and models still load; if they fail, the rollback branch returns the server to the previous pinned version. Check each hand-off before moving to the next step.
Release flow from advisory to production, with the approval gate and rollback branch.
Patching risks and what to watch after an upgrade
An upgrade changes more than the binary. Advisories, the unauthenticated local API, the bind address and the version record all decide whether a patch actually closes exposure. Each card below is a check to run before and after the change.
Follow advisories and release notes
Subscribe to the GitHub security advisories for the Ollama repository and read the release notes for every version between your current build and the target. Security fixes can land in a release without a prominent headline, so compare the notes rather than relying on the version number alone. Record which advisories affect your build and which release closes them. Confirm the pre-release status of any build you consider, since pre-releases are published before a stable release is.
Ollama releasesPatch the proxy and host too
The local Ollama API at localhost:11434 does not require authentication. If you place a reverse proxy in front of it, the proxy's TLS settings, authentication and upstream headers are part of the security boundary, so they need patching and review on the same schedule as Ollama. Patch the host operating system, the GPU driver and the container runtime in the same window, and confirm that each component still starts after the change.
Ollama API authenticationVerify the bind address after the change
Ollama binds to 127.0.0.1 port 11434 by default, and the OLLAMA_HOST variable changes that. Installers, service files and container images can reset or override this setting during an upgrade. After each change, check which address and port the server listens on and confirm that it is not reachable from networks it should not reach. Repeat the check from a second host.
Confirm cloud features are still off
If your policy requires that no inference leaves your environment, check the cloud setting after upgrading. The OLLAMA_NO_CLOUD variable, or the equivalent entry in the server configuration file, can be lost when a service unit or compose file is rebuilt. Send a test request and confirm it is served locally, and confirm that no API key is configured for direct cloud calls.
Keep a version record for audits
Record the Ollama version, the install method, the host and container image tags, and the date of each change for every server. Keep the record with the change ticket and the advisory that prompted the change, so an auditor can match a finding to the build that was running at the time. Ask your assessor which evidence format they expect before you define the record's fields.
Watch model behavior and resources
After an upgrade, confirm that the models you approved still load, that GPU detection still works and that ollama ps shows the expected models. Compare response behavior against a fixed test prompt set from before the change. Keep the rollback path ready until these checks pass, since a release can change loading or memory behavior even when the API still answers.
Rolling back a bad release without losing models
Rolling back means reinstalling a version you already trust. On a Linux server, re-run the install script with OLLAMA_VERSION set to the release you ran before the upgrade, then restart the service and confirm the binary reports that version. Release numbers and their notes are listed on the Ollama GitHub releases page, so select your target there and check whether it is marked as a pre-release before you use it in production. In containers, redeploy the earlier image tag you recorded. Models are normally kept apart from the program files. By default on Linux they sit in /usr/share/ollama/.ollama/models, or in whatever path OLLAMA_MODELS names, so replacing the binary usually leaves them in place.
Model files surviving does not prove the older release will run them, so confirm compatibility before you rely on the rollback. Read the release notes for the target version and test every model your users call, especially any model pulled or built after the older release was published, since a newer model format may fail to load on an older build. Then compare your configuration against that release's documentation. Settings such as OLLAMA_HOST, OLLAMA_MODELS, OLLAMA_NUM_PARALLEL and OLLAMA_NO_CLOUD can behave differently across versions, and a service file that worked under the newer build may need adjusting. Check the Ollama FAQ for current settings, and confirm any open questions with your own vendor contact before changing production.
Treat the rollback as a change in its own right and rehearse it on a copy of the server first, using the same model directory and a set of representative prompts. After reinstalling in production, run ollama list to confirm the models are present, ollama ps to see what loads, and one request per model against the API on port 11434 to confirm it responds. Record the version installed, the install command, the models present and the configuration file in use, and keep the failed build's package or image tag so you can return to it if the older release has its own fault. Tell the teams whose models were affected, and keep watching release notes so the next upgrade is scheduled on evidence rather than urgency.
Limits to confirm in your environment
Several parts of an Ollama upgrade depend on details that change by release and by host, so they should be checked rather than assumed. The cards below cover the questions a change owner should answer in a test environment before any production server is touched.
Model file compatibility across releases
Confirm whether the target release reads model files and manifests written by your current version, and whether any model needs to be pulled again after the upgrade. Test your most important models on a copy of the server first, then check that each one loads and returns expected output. Release notes on the GitHub releases page are the first place to look for storage or format changes, but treat them as a starting point for your own test rather than a guarantee.
Ollama releasesHow the install script treats existing services
Before re-running the install script on a Linux host, confirm what it does to the existing systemd service, the service user, and any drop-in overrides that set variables such as OLLAMA_HOST or OLLAMA_MODELS. Overrides that live outside the default unit file can survive or be lost depending on how the script runs, so inspect the effective configuration after the upgrade. Record the exact command and version you ran so the change can be repeated or reversed.
Support status of older versions
Ask whether the version you are pinned to still receives fixes, and whether a security patch will be issued for it. Ollama publishes frequent releases, so a pinned build can fall behind quickly, and the project does not provide a support window for each version in the sources reviewed here. Confirm the policy with the vendor or the project maintainers before you commit to staying on an older build for a long period.
GPU driver stack changes
Confirm whether the new Ollama release requires a different NVIDIA or AMD driver, CUDA or ROCm runtime, or container toolkit version than the one now running. A runtime upgrade on the host can affect every service that uses the GPU, not only Ollama, so plan it as a separate change with its own rollback. After any driver or Ollama change, run ollama ps and check that models still load on the GPU rather than the CPU.
Container image tags and digests
If Ollama runs in Docker, confirm which tag your deployment pulls and whether a tag such as latest moves under you on restart. Pinning a specific version tag or image digest makes an upgrade a deliberate edit to the compose file or manifest, and it makes a rollback a known previous value. Check that your registry mirror in a restricted network carries the exact tag you intend to use.
Questions buyers ask about upgrading and pinning Ollama
Does upgrading Ollama cost money?
Upgrading the Ollama software itself does not carry a license fee for running models on your own hardware, because Ollama's pricing page states that running models on your own hardware is always unlimited. Paid plans apply to cloud models: Pro at $20 per month ($200 per year), Max at $100 per month, Team at $500 per month and Enterprise at custom pricing. Your real costs are internal staff time, staging hardware, and any partner fee, which follows from a written scope. Ask any partner to quote the staging, testing and rollback work separately so you can see what recurs and what is one-time.
How much internal effort does a controlled Ollama upgrade take?
Effort depends on how many servers run Ollama, how many applications call its API, and whether you pin versions in scripts, containers or configuration management. A single workstation takes little effort, while a shared server with several consuming applications needs a staging copy, a test of your model list and API calls, a change window and a written rollback step. Ask your team to inventory the installed version, the install method and every client that depends on the API before estimating. Ollama ships frequent releases, so the inventory and test steps repeat often unless they are scripted.
Can our own team upgrade and pin Ollama without a partner?
Yes, most teams with Linux or container experience can re-run the install script, install a specific version with OLLAMA_VERSION, or change an image tag in a container. The harder part is the surrounding process: confirming that models still load, that GPU detection still works, and that API consumers still respond after the change. A partner is most useful when you lack staging hardware, need evidence for an assessment, or want the process written as a repeatable runbook. Decide this by comparing your team's capacity against the number of servers and the uptime your users expect.
How often should we upgrade Ollama?
Set the cadence by your risk tolerance and by security advisories, not by release announcements alone. Ollama publishes frequent releases on its GitHub releases page, and some are pre-releases, so pin production to a tested stable version and review new releases on a fixed schedule. Follow the GitHub security advisories for the repository and treat a published advisory affecting your exposure as a priority to test quickly. Document the cadence in your change policy so auditors and application owners know when to expect changes.
What does a partner deliver for an Ollama upgrade or pinning engagement?
Under a fixed-scope engagement, DeployOpen agrees the scope, deliverables and timeline with you in writing before work starts. Typical deliverables for this kind of work include a version pinning standard, an upgrade runbook, a staging test plan covering model loads and API calls, a documented rollback procedure, and a summary of configuration changes. Ongoing upgrades and patch testing can run under a retainer. Ask for the exact list of artifacts in the written scope, and confirm how each one will be handed over and maintained.
What do we need to provide for an Ollama upgrade project?
You need to supply staging hardware or a staging environment that matches production closely enough to load your models, a list of models and the applications that call the API, and access to the servers, container registry or install channel. You also need named owners who can approve changes, and access windows for testing and for the production change. Confirm whether your staging hardware has the same GPU type, driver and memory as production, because GPU behavior can differ between environments. Provide your current version and install method at the start so the plan starts from the real setup.
How do we roll back a bad Ollama release?
Roll back by reinstalling the last known good version, which works because you pinned a specific version rather than taking the latest one. On Linux, re-run the install script with OLLAMA_VERSION set to the earlier version, and in containers, switch the image tag back to the version you tested. Keep a copy of the previous version and your configuration files before each change, and confirm that model files in your model directory still load after the rollback. Test the rollback in staging before you need it, because a rollback that has never been rehearsed often reveals missing steps under pressure.
How DeployOpen plans and supports Ollama upgrades
DeployOpen treats an Ollama upgrade as a planned change to a shared service, not a routine package update. We scope the target version, test it against your models and clients in your own environment, and document the pinned version and rollback path before anything changes on the production server.
How we scope
- Written scope lists the servers, containers and install methods covered by the upgrade and pinning work.
- We inventory current Ollama versions, how each host was installed, and which clients depend on the API.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- We stage the target version in a test environment and check model loading, GPU detection and API responses.
- We set the install method to a pinned version using OLLAMA_VERSION or a fixed container image tag.
- We review the GitHub security advisories and release notes that apply to your deployed version before each change.
How we hand over
- You receive a runbook covering the pinned version, the upgrade steps, the verification checks and the rollback procedure.
- We document which version is approved for production and who signs off on each future change.
- Your team practices a rollback on a test host so the procedure is known before it is needed.
How we support
- Ongoing upgrades, patch tracking and continuous testing are available as a retainer.
- Retainer scope should be confirmed in writing, including how new release candidates and advisories are reviewed.
- Ask for the notification path and response expectations in your quote before you commit to a retainer.

