Ollama model storage and disk planning

Model storage is the first capacity decision for a shared Ollama server, and the default paths are easy to outgrow. This page covers where Ollama keeps models, how to move them safely and how to plan and clean disk.

On this page

Ollama model storage and disk planning for a shared server

A team that needs a shared Ollama server should decide where model files live before anyone pulls a model. The answer is a dedicated directory on a disk sized for the models you plan to keep, set with the OLLAMA_MODELS variable. Ollama stores models locally by default, so every model pulled to the server consumes space on that host, and the directory you choose determines who can read and write those files, what your backups must cover and how much headroom you have before the disk fills.

Ollama's default model paths differ by operating system. On macOS, models sit in ~/.ollama/models. On Linux, the default is /usr/share/ollama/.ollama/models, which belongs to the service account when Ollama runs as a system service. On Windows, the default is the .ollama\models folder in the user's profile. The OLLAMA_MODELS variable moves the store to another directory. On a shared Linux server, that move is usually the first change made, because the system partition is rarely the right place for multi-gigabyte weights. Ollama states that running locally does not expose your prompts or data to Ollama, so the storage location is a question of capacity, access and recovery rather than of where data is sent. Confirm the exact behavior of your installed version against the Ollama FAQ before you write the variable into a service file.

Before you choose a path, settle three things: the service account must own the directory and be able to write to it, administrators must know it is the single source of model files for backups and cleanup, and the disk must have room for the models your team will keep plus growth. Model sizes vary from a few gigabytes to hundreds of gigabytes, so ask your model owners for a list of planned models and their size on disk, then keep a margin for new releases. Check the Ollama GitHub repository for current behavior, since storage handling changes between releases.

Default model paths by operating system and when to change them

This table compares where Ollama stores models by default on macOS, Linux and Windows, and which environments should move them with OLLAMA_MODELS. Read each row as a decision: the default works for a single user workstation, while a shared server usually needs a dedicated volume, backup scope and clear ownership by the service account.

Operating systemDefault model locationReason to change the default
macOS~/.ollama/modelsMove models off the system volume when a user's home folder is small, or when a shared Mac hosts models for several people
Linux/usr/share/ollama/.ollama/modelsMove to a dedicated data disk on a shared server so model growth does not fill the operating system partition
WindowsThe user's .ollama\models folderMove when the user profile sits on a small system drive, or when models should live on a separate disk for managed workstations
Linux server with a dedicated service userDefault path, owned by the ollama userChange the path and set ownership to the service account so the systemd unit can read and write models without broad permissions
Environments with scheduled backupsDefault path, outside the backup scopePoint OLLAMA_MODELS at a volume your backup job covers, or confirm with your backup owner whether model files need to be included
Air-gapped or pre-populated hostsDefault path, filled by manual copyUse a directory you control so that approved model files can be staged and verified before the server starts
Containers and KubernetesPath inside the container imageMount a persistent volume at the models path so models survive container restarts and image upgrades
Multi-user workstationsPer-user default folderKeep the default for single-user machines, but confirm with the team whether each user should download their own copy of large models

How to move Ollama models with OLLAMA_MODELS

This sequence moves the model store off the system disk onto a volume sized for shared use, so the Ollama service pulls and loads models from a path you chose and can verify. Each step ends with a check so you know the change took effect before you rely on it.

  1. Choose and prepare the model volume

    Pick a volume with enough free space for the models you plan to keep, plus headroom for pulls and updates, and mount it at a stable path such as a dedicated mount point. The systems administrator does this on the Linux host and records the mount in /etc/fstab so it survives a reboot. Done is confirmed when df -h on the new path shows the expected capacity and the mount persists after a reboot test in a maintenance window.

  2. Create the dedicated model directory

    Create a directory on that volume, for example a path such as /data/ollama/models, and keep it separate from the default location under /usr/share/ollama/.ollama/models. Use a name that tells operators what it holds, and avoid placing it in a home directory or a shared scratch area that other jobs clean up. Done is confirmed when the directory exists, is owned by the account that runs the Ollama service, and is listed on the volume with ls -ld.

  3. Grant the ollama service user access

    Give the account that runs the Ollama service read and write access to the new directory, typically by setting ownership to the ollama user and group with chown and applying permissions that allow only that account and approved administrators to write. Check the default install's service user and group first, because your install method determines the name. Done is confirmed by running sudo -u ollama touch on a test file inside the directory and then removing it, which should succeed without elevated rights.

  4. Set OLLAMA_MODELS in the service environment

    Add OLLAMA_MODELS with the new path to the service environment using a systemd drop-in override, not by editing the packaged unit file. Confirm the exact override method for your install (the Ollama documentation and your package version determine whether you use systemctl edit ollama or another mechanism), and check that SELinux or AppArmor policies on your distribution allow the service to read and write the new path. Done is confirmed when systemctl cat ollama shows the drop-in and the variable is present.

  5. Restart the service and confirm the variable is loaded

    Reload systemd, restart the Ollama service and read its startup log with journalctl -u ollama, looking for the model directory it reports at start-up. Confirm the process picked up the variable by checking its environment, for example with systemctl show ollama -p Environment. Done is confirmed when the service is active and the logged path matches the directory you created, with no permission errors in the log.

  6. Pull a test model into the new path

    Pull a small model with ollama pull and watch the disk on the new volume, not the system disk, for the blobs and manifests to appear. Run ollama list to confirm the model is registered and load it once with a short prompt so you know the runtime can read it back. Done is confirmed when the model files appear under the new directory, the system disk usage does not grow for that pull, and the model responds.

  7. Record the path and move any existing models

    If models already exist in the old location, stop the service and move them into the new directory with their ownership preserved, then restart and re-run ollama list. Document the final path, the override file location and the owner of the volume in your operations runbook so that future upgrades and reinstalls keep the setting. Done is confirmed when the old location is empty or retired, the list output matches what you expect, and the runbook entry has been reviewed by a second operator.

How much disk a shared Ollama server needs

Size the disk for the models you plan to keep on the server, not for the server's operating system. Model sizes vary widely, from a few gigabytes for small models to hundreds of gigabytes for the largest ones, and every pulled model and every variant occupies its own space. A quantized build of a model and a full-precision build are separate downloads, so a team that tries three sizes of the same family will store all three. Before you commit to a disk size, check the download size of each model on your shortlist in the Ollama model library, add the sizes together for your first-year plan, and then add headroom for new releases and for models your users will pull on their own.

Concurrency settings do not change what sits on disk. OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE control how many requests run at once, how many models stay in memory and how many requests wait, but none of them adds or removes files from the model directory. What they affect is how many distinct models your team uses at the same time, which matters for memory and GPU planning rather than storage. Keep these two questions separate in your design review: storage answers how many models you keep, and concurrency answers how many of them are active at once.

Confirm three things with your own environment before you buy or allocate disk. First, the free space and growth rate of the volume that will hold the model directory, since a full disk stops pulls partway through. Second, whether the directory will sit on a network or shared file system, because model loads read large files and latency on that path shows up as slow starts. Third, your cleanup policy, including who removes unused models and how often. Ollama's ollama rm command deletes a model from the local store, and the review should record which models are approved so that old variants do not accumulate silently.

Permissions and ownership for the ollama user

A shared Ollama server writes model blobs and manifests to disk during every pull, then reads them on every load. Ownership and permissions on the model directory decide whether that works for the service account and nobody else. The cards below cover the decisions and checks that connect the storage path to the account that runs the server.

Service account owns the model directory

On Linux, the Ollama service runs as a dedicated ollama user, and the default model store sits under that user's home directory. If you move models with OLLAMA_MODELS, the new directory must be owned by the account that runs the service, not by root or by your admin login. Check ownership with ls -ld on the directory and on its parent path. A mismatch often shows up only after a reboot, when the service starts under a different environment than your interactive shell.

Read and write access during pulls

A pull writes new layers before it finalizes the model, so the service account needs write access to the store, not just read access for inference. Removing a model also needs write access. Test a pull as the service account itself, for example with sudo -u ollama against the target path, rather than assuming your own user's rights carry over. Ask your platform team to confirm the same rule applies to any network file system you mount for the store.

Avoiding world-readable model stores

Model weights are large and may be licensed, fine-tuned or built on proprietary data, so a store that other local users can list or read is a data exposure risk. Set the directory to owner-only access for the service account and keep group access limited to a named group if administrators need it. Avoid broad chmod 777 fixes, which often appear when a first pull fails. Review access again after any change to umask or to the systemd unit.

Separate volumes with correct mount ownership

A dedicated volume or disk for models keeps large downloads from filling the operating system partition, but the mount itself needs ownership set for the service account. Fstab entries that mount before the service starts, with the right owner and permissions on the mount point, prevent Ollama from writing to an empty directory under the root filesystem. Confirm the mount is present at boot before the Ollama unit starts, and treat a missing mount as a failure to investigate.

Container volume permissions

In Docker or Kubernetes, the model path inside the container is owned by the user the image runs as, and a host bind mount or persistent volume may carry different numeric IDs. A volume created by root on the host can block pulls even when the container starts normally. Set the owner of the host directory to the container user's UID and GID, and verify the write with a test pull. Confirm the UID for your image tag, since it can differ between releases.

Checks when a pull fails with permission errors

When a pull fails with a permission error, check four things in order: the owner and mode of the store and its parents, the user the service process runs as, whether the disk is mounted read-only, and whether an antivirus or security agent is locking files. Read the server log for the exact path in the error. Record the fix in your runbook so the same ownership is restored after a reinstall or upgrade, which can reset the service user.

Ollama FAQ

Cleaning out unused models

How do I list the models installed on my Ollama server?

Run ollama list on the server to see every model stored locally, with its name, ID, size and last modified time. Run it as the account that owns the model directory, and with the same OLLAMA_MODELS setting the service uses, because a different user or path can show an empty or incomplete list.

  • Compare the list against the model names your teams actually request, using your access logs or a short survey.
  • Note that the list reflects what is stored on disk, so a model can appear here even when nobody has loaded it recently.
  • Confirm the output columns and any flags for your version in the Ollama FAQ and the CLI help before writing a script around them.
How do I remove a model from Ollama?

Use ollama rm followed by the model name and tag to delete that model from the local store. Stop any active requests that depend on it first, and confirm the exact syntax and any confirmation prompt for your version in the official docs. Removal affects only the model you name, so other installed models keep working.

Keep a record of the name and tag you removed. Restoring it later requires pulling it again, which needs the registry to host that tag and your network to allow the pull. On an air-gapped server, deleting the only copy of a model can mean losing it entirely unless the weight files are archived somewhere else.

What happens to shared layers when I delete a model?

Ollama stores model content as layers, and two models can reference the same layer. Deleting one model removes only the data that no remaining model still references, so the disk space is freed when the last model using a given layer is removed.

In practice, deleting a model may free less space than its listed size suggests. Two variants built on the same base model can keep most of the disk in use even after one is removed. Confirm how your version handles unreferenced data and whether it provides a cleanup step for it, since the docs and release notes are the authoritative source for that behavior.

How do I check free disk space after removing models?

Check free space on the filesystem that holds the model directory. Find that path in OLLAMA_MODELS or in the default location for your operating system, then run df -h against that path on Linux or macOS. Record the figure before removal and again afterward, allowing a short pause for the change to appear.

Two things commonly distort the result. The service account may lack permission to delete files it does not own, so nothing is freed even though the command succeeded. A separate mount point for the model directory can also make the root filesystem look unchanged. Check the directory's ownership and mount table if the number does not move.

How often should a team review installed Ollama models?

Review on a fixed schedule owned by a named person, using a short checklist: list the installed models, compare them with recent requests, record an owner and purpose for each, then keep, archive or remove. The right cadence depends on how quickly your teams change models, which you can measure from your own logs rather than assume.

Keep a model register with the name, tag, owner, approval status, license terms and the date each model was added. Check any model with license conditions against that register before deciding to remove it, so that approved models and their records stay consistent with what is on the server.

Should we automate deleting unused Ollama models?

Automate listing and reporting first, and add deletion only after it has been tested. Test on a copy of the model directory or on a non-production server, confirm the removal commands for your version in the documentation, and make the script log every model it removes along with the time and the account that ran it.

Automated deletion can remove a model that someone needs for an audit, an incident review or a pending approval. A safer pattern is a script that produces a candidate list, sends it to the model owner, and removes only models that stay unclaimed through a defined waiting period.

Can our own staff clean up Ollama storage, or do we need a partner?

Most organizations can handle routine cleanup with internal staff, provided someone has server access and the process is written down. The main cost is staff time for each review cycle, plus the time to test any automation. Costs rise when the model directory is part of a larger storage design, when the server holds regulated data, or when auditors ask for evidence of how models were approved and removed.

DeployOpen plans, implements and documents this kind of process inside infrastructure you control. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts. A quote follows from that written scope, and the questions to ask are which tasks are included, who holds the evidence, and what happens after handover.

Security and operational risks of model storage

Model directories hold more than downloaded files. They hold the weights your team chose, any fine-tuned or approved models you brought in, and the disk space every pull depends on. Each risk below pairs with a control you can set during planning, before the server is shared.

Models on shared or unencrypted volumes

The model directory is ordinary files on the volume you point OLLAMA_MODELS at. If that volume is shared with other services, or is not encrypted at rest, anyone with access to the volume or its snapshots can read the weights. Confirm who can mount the volume, whether it is encrypted at the storage layer, and whether the ollama service account is the only account that needs write access. Restrict the directory to that account and to a read-only backup role.

Fine-tuned weights on workstation drives

Custom or fine-tuned weights often exist first on a laptop or workstation, where they may be copied, synced to cloud folders or left behind after a project ends. Ollama's local storage does not track where copies came from. Decide which location is the system of record for proprietary weights, keep workstation copies out of sync folders, and remove local copies once the approved server holds the model. Confirm this with your data handling policy before the first import.

Missing backups of the model directory

Model files are large and can be re-pulled from a registry, but custom models, imported weights and their Modelfile definitions cannot always be recreated from the same source. A restore plan that only covers the operating system leaves those assets exposed. Back up the directory named by OLLAMA_MODELS along with the Modelfiles and import records that produced each custom model. Test a restore on a second host to confirm the models load before you rely on the backup.

Disk filling during a pull

A pull writes model layers into the model directory before it completes, so a large model can exhaust free space partway through. A full volume can also stall other services on the same host and corrupt in-progress downloads. Keep the model volume on its own partition or logical volume, set a free-space alert with headroom above your largest expected model, and schedule large pulls outside peak use. Confirm the sizes of the models you plan to host before you size the volume.

Unmanaged model deletions

Removing a model frees its disk space, but a deleted model that a team still depends on breaks every application that calls it by name. Deletions also happen silently when someone cleans up a shared server. Keep a written list of approved models and their owners, require a change record before removal, and use the Ollama command line to list installed models before each cleanup. Confirm which applications reference each model name before you remove it.

What does disk planning for Ollama cost and require?

What actually drives the cost of planning Ollama model storage?

The main drivers are how much model capacity you need, the type of volume you choose, how backups are handled, and how much staff time the change takes. Capacity depends on how many models you pull, their sizes, and how many versions you keep, so ask the team to list the models and the number of concurrent users before estimating space. Volume type affects both speed and price: fast local NVMe, network storage and object storage behave differently when several users load models at once. Backup scope is another cost component, because large model files are slow and expensive to copy repeatedly. Most of the spend is one-time planning and setup, with recurring costs for storage growth and any retained backups. Ask any quote to itemize these components separately.

Can our own team plan and move Ollama model storage without a partner?

Yes, a capable Linux administrator can usually do this in-house, because the core steps are small: choose a directory with enough free space, set OLLAMA_MODELS in the service environment, give the ollama user write access, and restart the service. The harder parts are sizing for growth, deciding how models are approved and removed, and making sure backups and monitoring cover the new path. Your team should decide whether it has time to test loading large models under real concurrency, since OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS affect disk and memory use. A partner is most useful when several teams share the server and the storage plan has to pass a security or compliance review.

How long does changing the Ollama model directory take?

The configuration change itself is short, but the elapsed time depends on the work around it: confirming capacity, preparing the new volume, copying or re-pulling existing models, and agreeing a change window with the users who depend on the server. Copying large model files can take much longer than the configuration edit, and the time grows with the total size of the model store. Your timeline should include a rollback step, a test load of at least one large model, and a check that the service starts cleanly after restart. Ask any provider to give a timeline tied to your model inventory and environment, and do not accept a generic figure.

What do we need to give a partner before storage work starts?

The work needs access to the Ollama host with appropriate administrator rights, a current inventory of installed models, and a written storage plan that names the target volume, its size, its performance class and its backup approach. You also need to agree a change window, because restarting the service interrupts every user and application connected to it. Provide the systemd unit or service configuration, any existing environment overrides, and the names of the people who approve changes. If the server must meet a internal control framework, share those requirements early so the storage design can show how each one is met.

What does a partner deliver for Ollama disk planning?

A partner would typically deliver a written storage design and a fixed-scope implementation plan agreed before work starts. In general terms, the deliverables cover the model inventory, the capacity and volume recommendation, the OLLAMA_MODELS configuration, file ownership and permissions for the ollama user, a model retention and cleanup procedure, and test results from loading representative models. Operational handover usually includes backup and monitoring notes and a rollback procedure. Confirm exact deliverables, acceptance criteria and any retest in the written scope, since these vary by environment.

Does running Ollama models on our own hardware carry a license fee?

Running models on your own hardware is free of usage charges according to Ollama's pricing page, which states that this use is always unlimited. Paid plans apply to cloud models, with Pro listed at $20 per month ($200 per year), Max at $100 per month, Team at $500 per month and Enterprise at custom pricing. Storage on your own disks is therefore a cost you control directly, not a fee paid to Ollama. Your budget should cover the hardware or cloud volumes, backup storage and staff time, and you should confirm the current pricing page before finalizing any budget.

What risks should we check before changing the Ollama storage path?

The main risks are a full disk during a model pull, a service that fails to start because the ollama user cannot write to the new directory, and models that disappear from view after a path change. Check that the new location has enough free space for growth, that ownership and permissions are correct, and that SELinux or AppArmor policies allow access if they are enabled. Also confirm that the service environment is set in the right place, since a value set only in a shell will not reach the systemd service. Test with a small model first, then a large one, and keep the old directory until the new one is verified.

How should we clean up unused Ollama models over time?

Cleanup should follow a written retention rule, not ad hoc deletion. Start by listing installed models and recording which teams or applications depend on each one, then decide how long unused models stay on disk. Removing a model with the Ollama CLI is the safest route, because it keeps the model store consistent. Review disk use on a regular schedule, and record each removal so that a user who needs a model again knows where it came from. Confirm the retention rule with the model owners before the first cleanup, since removing a model that an application still calls causes failures.

How the model directory fits into the server

The model directory is the piece of state that ties the Ollama service to the disk it runs on. The Ollama service reads model weights and manifests from that directory when a model is loaded and writes to it when a model is pulled or created. Every request that reaches the API on port 11434 is answered from whatever is stored there, so the directory's location, size and permissions shape how the server behaves long before any user sends a prompt. In a shared server, treat the model directory as a core part of the service rather than a folder that can be added later.

The API sits in front of that storage. By default Ollama binds to 127.0.0.1 on port 11434, and the local API does not require authentication. That means nothing in Ollama itself stops a process on the host from calling the API or reading files the service account can reach, so access to the storage volume is controlled at the host level: the operating system user that owns the model directory, the mount options on the volume, and who has shell access to the machine. Confirm which account runs the service, which accounts can read the directory, and whether any backup or sync job copies it to another system. If you later expose the API through a proxy, the storage controls still apply because the proxy does not change what the host can read.

The storage volume belongs inside your infrastructure, which is the point of running Ollama locally. Its placement is an architectural decision: a dedicated disk or mount point keeps model growth from filling the operating system volume, and it lets you size, back up and encrypt the model data separately from application data. Confirm with your platform team whether the volume sits on local disk, network-attached storage or a container volume, and whether the storage platform offers encryption at rest and snapshots. Ollama's own documentation covers where models are kept and how to relocate them, which is the next read once the layout is settled.

Where models live between the pull, the service and the volume

The diagram starts with client requests arriving at the Ollama API on port 11434 inside the host's trust boundary. The ollama service receives them and reads and writes model files at the path set by OLLAMA_MODELS, which should sit on a dedicated volume. The default path is shown as the alternative, and the backup target sits outside the host. Check that the service user can write to the chosen directory, that the volume is not the operating system disk, and that the backup copy is taken from the same directory the service uses.

Client requests reach the service, which stores models on a dedicated volume.

How DeployOpen plans model storage for your Ollama server

DeployOpen plans Ollama model storage before the server goes live, in the infrastructure you control. We size the model directory, set the OLLAMA_MODELS location, fix ownership for the ollama user and write down how unused models are removed. The result is a storage plan your platform and security teams can review.

How we scope

  • Engagements are fixed-scope, with the storage deliverables agreed in writing before work starts.
  • We confirm which models, model counts and model formats the server must hold, and the disk each one needs.
  • We record the default model path on each operating system in use and the directory you want instead.

How we build

  • We set OLLAMA_MODELS to a dedicated volume and confirm the service can read and write that location.
  • We set ownership and permissions for the ollama user so models load without exposing the directory to other accounts.
  • We test a model pull, load and removal on the new path before the server is handed over.

How we hand over

  • You receive a written storage design covering volume layout, the model directory path, and the permission model.
  • The handover includes a documented procedure for listing, removing and reclaiming space from unused models.
  • Your team gets a checklist for disk growth, backups of the models directory and changes to the storage path.

How we support

  • Ongoing support and upgrades are available as a retainer, including checks after Ollama version changes.
  • We can review disk usage and model inventory on a schedule you agree and advise on capacity changes.
  • Confirm with your team how model storage and backups fit your existing retention and change-control rules.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.