Running Ollama as a production service on Linux

A shared Ollama server on Linux needs a deliberate install method, a dedicated service user, environment overrides, a working GPU driver and model storage on the right disk. This page covers each decision and the checks that confirm the service is ready for a team.

On this page

Running Ollama as a production service on Linux: what the team gets and when to use it

A systemd-managed service on a dedicated Linux GPU host is the usual pattern when a team wants one shared model server instead of separate Ollama installs on each laptop. The host runs Ollama as a background service, starts it at boot, keeps models in one place and gives every client the same REST API on port 11434. The service is the shared resource, so the host, its disk and its network exposure become decisions for the team to own.

Ollama is an open source runtime that loads and serves language models on the machine where it runs. Per the Ollama FAQ, it binds to 127.0.0.1 on port 11434 by default and stores models on local disk, so a model pulled once is available to any client that can reach that server. The API has no built-in authentication. Anyone who can reach the port can send prompts and pull models, which means a shared server needs a network boundary and an access layer in front of it, covered in the security section. A workstation install suits one person testing models on their own hardware. A central server suits a team that needs one GPU pool, one model inventory and one place to apply access rules, logging and patching.

Before you commit to this setup, confirm three things with your own environment rather than assuming them: which GPU models and driver versions your target hosts support, how much disk your model library will need, and whether your clients can reach the server through your internal network. Check the Ollama FAQ for the current environment variables and bind behavior before you write the unit file. Ask whoever will own the host to agree on who applies updates, who manages the ollama service account and who reviews logs, because those owners decide whether a shared server stays healthy after the first week.

Configuration options for a shared Ollama service and when each fits

This table compares the settings that shape a shared Ollama server on Linux, from install method to bind address, model storage, concurrency and cloud features. Read each row for the condition under which the setting fits and what it costs in exposure, disk or throughput. Confirm current defaults in the Ollama FAQ before you write them into a unit file.

OptionWhen it fitsTrade-off
Official install scriptSingle GPU server where the vendor script can install the binary, the ollama user and the systemd unit in one passLess control over file layout and upgrade timing; review what the script changes before running it on a production host
Manual installHosts with an internal package channel, strict change control or a non-standard layout that must be reproduced exactlyYou own the unit file, the dedicated user and every upgrade step, so drift and missed updates are your responsibility
OLLAMA_HOST (default 127.0.0.1:11434)Keep the default when only local processes or a reverse proxy on the same host call the APIBinding to 0.0.0.0 or another interface exposes an API that has no built-in authentication, so a proxy with access control must come first
OLLAMA_MODELS (default /usr/share/ollama/.ollama/models)Move models to a dedicated volume when the system disk is small or model sizes will grow across several large weightsThe ollama user needs read and write access to the new path, and the path must survive upgrades and reboots
OLLAMA_NUM_PARALLEL (default 1)Keep at 1 for predictable latency on a single GPU; raise it only after load testing shows memory headroom for extra contextsHigher values share the loaded model across more requests but increase VRAM use and slow each individual response
OLLAMA_MAX_LOADED_MODELSSet when several teams load different models on one server and you need a cap on how many stay in memoryA higher cap keeps more models warm but can exhaust VRAM and force unloading; default depends on GPU count, so confirm in the FAQ
OLLAMA_MAX_QUEUE (default 512)Lower the queue when you prefer fast rejection over long waits during a burst of requestsA large queue hides overload behind rising latency, while a small queue returns errors to clients that must handle retries
OLLAMA_NO_CLOUD=1Set on any server that handles internal data and must not use cloud model features or outbound cloud callsUsers lose cloud-hosted models on this server, so communicate the change and confirm the setting in the FAQ and server config file

How to set up the Ollama service on a Linux GPU server

This sequence takes a bare Linux GPU host to a running Ollama service that a team can reach on a controlled address, with models stored on a dedicated disk and a verified local API. Each step ends with a check, so a failed step is found before the next one begins.

  1. Confirm the host and GPU driver work

    Before installing Ollama, the platform engineer confirms the server boots with the intended NVIDIA or AMD driver loaded and that the GPU is visible to the operating system. On NVIDIA hosts, run nvidia-smi as root and check that the driver version and GPU memory appear. On AMD hosts, confirm the ROCm tools list the device. Check the driver and CUDA or ROCm version against the current Ollama Linux documentation and the GPU vendor's support matrix, since requirements change between releases. Done means the GPU reports its full memory and no driver errors appear in the kernel log.

  2. Install Ollama using the chosen method

    Choose between the official install script and a manual install of the binary and service files. The install script is quicker for a single host, while a manual install suits teams that need to pin a version, mirror artifacts through an internal channel or keep changes under configuration management. Whichever you pick, record the exact version installed. Confirm the install command and package locations against the current Ollama documentation before running them. Done means the ollama binary reports a version when run from a shell.

  3. Verify the ollama user and service unit

    Check that the installer created a dedicated ollama system user and a systemd unit for the service. Run id ollama to confirm the account exists and is not a login user, then run systemctl cat ollama to see the unit file path and its contents. Note the ExecStart line and any existing Environment entries, because the next step layers changes on top of them rather than editing the vendor file. Done means the unit is loaded, the user exists and you know the path of the unit file.

  4. Add a drop-in override for host and concurrency

    Create a systemd drop-in override with systemctl edit ollama so your settings survive package upgrades. Set OLLAMA_HOST to the address the team should reach, using a private interface address rather than all interfaces unless a reverse proxy with authentication sits in front. Add OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE only if your load tests call for them. The defaults are 1 parallel request per model, 3 times the GPU count (or 3 on CPU) for loaded models, and 512 queued requests. Done means systemctl cat ollama shows the override file alongside the base unit.

  5. Move model storage to a dedicated disk

    Mount a disk with enough free space for the models you plan to hold, then set OLLAMA_MODELS in the same override to point at that directory. Create the directory, set ownership to the ollama user and group, and confirm the path is not on the root filesystem. The default Linux location is /usr/share/ollama/.ollama/models, so the service account must be able to write there and the mount must survive reboots through fstab. Confirm the exact directory and permission model against the Ollama FAQ and your storage team's standards. Done means the directory is owned by ollama and a test write as that user succeeds.

  6. Restart the service and check the bind address

    Reload systemd, restart the ollama service and confirm it is active with systemctl status ollama. Check the listening socket with ss -ltnp and confirm the process is bound to the address and port 11434 you set. Review journalctl -u ollama for GPU detection messages so you know the GPU was used and not silently skipped. Done means the service is active, the port is bound to the intended address and the log shows the GPU detected.

  7. Call the local API on port 11434

    From the server itself, send a request to the local API with curl to and check for the version response returned by the service. The local API does not require authentication, so this check tests the service and not access control. If you bound the service to a non-loopback address, repeat the call from another machine on the same network to confirm reachability, then restrict that path with firewall rules. Done means the version call returns a JSON response from the service you configured.

  8. Pull a test model and confirm GPU use

    Pull a small test model with ollama pull, then run a short prompt with ollama run or a single API generate call. While the request runs, check nvidia-smi or the ROCm equivalent to confirm the model is loaded into GPU memory and that the model files landed in your OLLAMA_MODELS directory. Choose a test model that fits your GPU memory, and confirm model names and availability against the Ollama library. Done means the model responds, the GPU shows memory use during inference and the files appear on the dedicated disk.

Driver installation for NVIDIA and AMD GPUs on the service host

On an NVIDIA server, the service depends on the proprietary NVIDIA driver and the CUDA runtime that matches it. Install the driver using the method your distribution or NVIDIA supports for your kernel, then confirm that the host sees the card before you touch Ollama. The check is simple: the nvidia-smi command should list every GPU, its memory and the driver version without errors. If the command fails after a kernel update, the module was usually not rebuilt for the new kernel, so treat that as a blocker. Confirm the driver branch against NVIDIA's Linux support matrix for your exact GPU model and operating system release, and confirm the CUDA compatibility rules before you choose a version.

  • Driver source: Prefer the packaged driver from your distribution or NVIDIA's repository, and avoid mixing installer methods on the same host.
  • Kernel headers: Install headers that match the running kernel so the driver module builds, and record the kernel version in your change log.
  • Secure Boot: If Secure Boot is enabled, plan for module signing or enrolling the key, otherwise the module will not load.
  • Persistence and power settings: Check whether your team needs the persistence daemon or fixed power limits, and document any non-default setting.
  • Container runtime support: If the service will later run in containers, confirm the NVIDIA container toolkit is a separate step with its own version check.

Before you move on, confirm with NVIDIA's current support matrix and your distribution's notes that the driver, kernel and GPU model are listed together.

How the parts of a shared Ollama service connect

Requests start on team clients inside the internal network and pass through an optional reverse proxy that enforces authentication. The proxy forwards them to the Ollama systemd service, which listens on its bind address, normally 127.0.0.1 on port 11434 unless OLLAMA_HOST is changed. The service uses the GPU driver layer for inference and reads model files from a directory on a separate data disk. The trust boundary sits between the internal network and the server. Check that port 11434 is reachable only from the proxy, not from the wider network, because the local API has no authentication of its own.

Client requests reach Ollama only through an authenticated proxy on the server.

Security risks of exposing the Ollama API on a shared server

The Ollama API is built for trusted local use, so the risks of a shared server come from how the service is reached, who can touch its files, and which features send traffic out. Each card below is a decision or check that the systemd setup on this page has to get right before other teams connect.

No authentication on the local API

The local Ollama API at localhost:11434 does not require authentication. Ollama binds to 127.0.0.1 by default, so the API is only reachable from the host itself. If you set OLLAMA_HOST to a wider address, any machine that can reach the port can run models and read responses. Put an authenticating reverse proxy such as Nginx in front of the service, keep the Ollama listener on loopback, and confirm with a test from another host that an unauthenticated request is refused.

Ollama FAQ

Dedicated service user and model permissions

On Linux, models default to /usr/share/ollama/.ollama/models under the service account. If you move them with OLLAMA_MODELS, the new directory must be readable and writable by the ollama user and not by general login accounts. Otherwise any local user can read, replace or delete model weights. Keep the unit running as its own account, restrict the model directory to that account, and check ownership after every model pull or path change.

Cloud features and OLLAMA_NO_CLOUD

Ollama states that local runs do not expose your prompts or data, but cloud features can route requests off the host. On a server handling internal data, decide before go-live whether cloud models are allowed. Set OLLAMA_NO_CLOUD=1 in the unit's environment or in the server configuration file, then verify that cloud model names are refused. Record the setting in change control so later edits do not silently re-enable it.

API keys apply only to direct cloud calls

API keys are needed only when a client calls ollama.com/api or ollama.com/v1 directly, where the key is sent as a Bearer token. They do not protect the local API on your server. Teams sometimes assume a key on the server secures the endpoint, which it does not. Store any cloud key in a secrets manager or a restricted environment file, limit who can read that file, and rotate keys when staff change.

Ollama API authentication

Patching and release tracking

Ollama ships frequent releases, and pre-releases are published alongside stable tags. Track the GitHub releases page, read changelogs for security fixes, and test a new version on a staging unit before updating production. Pin the installed version so an install script rerun or package update does not change the runtime without a review. Schedule a recurring check so an unpatched server does not stay in service unnoticed.

Release cited
v0.40.5
Ollama release notes

Log access and who can read them

Service logs record requests, model names and errors, and they can reveal which teams use the server and when. Under systemd these logs sit in the journal, which is readable by privileged groups on many distributions. Limit journal access to administrators, decide how long logs are kept, and confirm whether your policy treats request metadata as personal data. Test that a standard user account cannot read the journal entries for the service.

How concurrency and queueing shape what users experience

Three settings decide how many requests an Ollama server runs at once, how many stay loaded in GPU memory, and how many wait in line before new requests are turned away: OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE. The published defaults are 1 parallel request per model, 3 times the number of GPUs (or 3 on CPU) for loaded models, and 512 queued requests. These defaults suit a single developer on a workstation. A team sharing one GPU server will feel them quickly, because a second user asking the same model during an active generation simply waits in the queue, and the queue is what the team will see as latency.

Each value has to be sized against two limits: the GPU memory available for model weights and context, and the number of people or applications that will send requests at the same time. Raising OLLAMA_NUM_PARALLEL lets more requests share a loaded model, but each parallel slot consumes memory for its own context, so a higher value can push the server into unloading models or failing to load them. Raising OLLAMA_MAX_LOADED_MODELS keeps several models warm, but every additional model competes for the same VRAM. Before rollout, the team should load its real models at realistic context lengths, run a representative burst of concurrent requests, and record memory use and response times. Confirm with the hardware guidance and your own tests rather than assuming a value from another server.

The queue setting is a decision about what users see when demand exceeds capacity. A large OLLAMA_MAX_QUEUE keeps requests waiting for a long time before anything fails, which can look like a hung service to a user and tie up client connections. A small one fails fast, which pushes the handling of errors back to applications and users. Choose the behavior deliberately, document it for the teams that call the API, and plan for the overload checks, log signals and alerting covered in the operations section. Ask your team to define which models and user groups get priority when the queue fills, because Ollama's concurrency settings do not establish per-user fairness on their own.

Limits to confirm in your environment before go-live

A Linux GPU server running Ollama for a team depends on a few limits that the software does not manage for you. Confirm the GPU and driver pairing, the disk that holds models, how updates restart the service, and who can reach the port before users depend on it.

GPU and driver support for your card

Ollama's GPU support depends on the exact card, driver and runtime on the host, so a server that works in a test can fall back to CPU in production. Record the GPU model, driver version and the output of your GPU tool before go-live, and confirm that Ollama detects the card in its startup logs. Do not assume that a newer or older card in the same family will behave the same way. Ask your hardware vendor and check Ollama's supported hardware list for the version you plan to run.

Ollama FAQ

Model directory disk size and growth

Models are stored in /usr/share/ollama/.ollama/models on Linux unless you move them with OLLAMA_MODELS. Each pulled model adds files to that directory, and older versions stay on disk until someone removes them. Put the directory on a volume with room for the models you expect, plus headroom for updates, and set an owner for who prunes unused models. Monitor free space as an alert, not as a one-time check.

Ollama FAQ

Service restart behavior after updates

Replacing the Ollama binary and restarting the systemd unit stops any model that is loaded and ends in-flight requests. Ask your team how long clients can tolerate an interruption and schedule updates in a window they accept. Confirm that the unit restarts on failure and that your monitoring notices when it does not come back. Test a restart on a staging host before the first production update.

Release cadence and upgrade testing

Ollama ships frequent releases. v0.40.5 was released on 14 October 2026, and v0.40.6 was published as a pre-release on 16 October 2026. A pre-release is not a stable release, so pin the version you tested and do not let the install script pull the newest build into production. Run your own model set and client applications against each candidate before you upgrade, and keep the previous binary available for rollback.

Ollama releases

Network exposure rules

Ollama binds to 127.0.0.1 on port 11434 by default. Changing OLLAMA_HOST to expose it on a network interface makes the API reachable by anything that can route to that address. Decide which subnets or services may connect, enforce that with host firewall rules or network policy, and document the rule with the change record. If you publish the service through a reverse proxy, keep the proxy as the only path to the port.

Ollama FAQ

No built-in accounts or usage limits

The local API at localhost:11434 does not require authentication, and it has no user accounts, per-user quotas or per-team usage caps. Anyone who reaches the port can run any model the server holds. Plan the access layer in front of the service, such as a proxy with authentication and logging, and decide how you will attribute usage to people or applications. Ask your security team to confirm that design before go-live.

Ollama API authentication

Questions teams ask before running Ollama as a shared service

Does Ollama cost money to run on our own hardware?

No licence fee applies to running models on your own hardware. Ollama's pricing page states that running models on your own hardware is always unlimited, and the project is released under the MIT licence. Paid plans apply only 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 the server, GPUs, storage, power, and the staff time to install, secure and maintain it. Check whether your team wants any cloud models at all, and confirm current plan terms on the Ollama pricing page before budgeting.

How long does a shared Ollama server take to set up?

The duration depends mostly on the state of the host and how many controls you need. A clean Linux GPU server with working driver access and an agreed network path is quick to bring up. Time grows with driver installation and GPU detection problems, storage layout for large model files, reverse proxy and authentication design, logging, and start-up testing across reboots. Ask any partner for a duration tied to a written scope that lists these items, and confirm the assumptions about your hardware, OS version and network rules before work starts.

What does our team need to provide before the work starts?

Plan to provide the following before any installation begins:

  • Root or sudo access on a Linux GPU host, plus a change window for driver installs and reboots
  • Someone who knows your GPU vendor, kernel and driver policy
  • Written network rules: which subnets may reach port 11434, and any outbound proxy or certificate requirements
  • A storage location for models with enough free space and an owner for it
  • A named owner for identity, access and log retention decisions

Missing any of these usually moves time into the engagement, so list them in the scope.

Can our in-house platform team run this without outside help?

Yes, if your team already administers Linux services, manages GPU drivers and has time to test restarts and upgrades. Ollama's install script and a systemd unit are straightforward for an experienced operator. The harder parts are the ones that recur: a dedicated service user, environment overrides for bind address and model paths, controlled exposure behind an authenticated proxy, and a documented process for upgrading. Ask whether the people doing the work have run GPU servers in production before, and whether they can keep the setup current after the first deployment.

What does a DeployOpen fixed-scope engagement cover for Ollama?

Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. For a shared Ollama server, the scope typically covers planning the host and storage layout, installing Ollama in your infrastructure, configuring the service user, environment settings and model directory, setting up the access path in front of the API, and documenting start-up and health checks. Confirm each deliverable, the environments covered and the acceptance checks against the written scope. DeployOpen does not publish a price list, so a quote follows from that scope.

How are Ollama upgrades handled on a production server?

Ollama ships frequent releases, so upgrades need a deliberate process rather than ad hoc installs. Pin the version you deploy, read the release notes for each candidate, test it against your models and client applications on a staging host, then schedule the change and keep the previous binary available for rollback. Ollama publishes releases and pre-releases on its GitHub releases page, so decide in advance whether pre-releases are allowed. Ask any partner whether upgrades, testing and rollback are included in the fixed scope or sold as a retainer.

Does Ollama require authentication, and what does that mean for our network?

The local Ollama API at localhost:11434 does not require authentication, and Ollama binds to 127.0.0.1 by default. Making it available to other machines means changing the bind address with OLLAMA_HOST and placing an authenticated proxy in front of it, such as Nginx, as the Ollama FAQ describes. Plan this before go-live, because an open port on a shared GPU server can be used by anyone who can reach it. Confirm your network segmentation and access rules with your security team.

How DeployOpen scopes and delivers a shared Ollama service

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure, and for a shared Ollama server that means the GPU host, its dedicated service account, the systemd unit, the model directory, the network exposure and the start-up checks all run on servers your organization controls. Most engagements are fixed-scope, with the scope, deliverables and timelines agreed in writing before work starts. For a service like this, the written scope should name the target distribution and Ollama version, the driver and CUDA stack, the path to the model directory and its disk, the bind address and any reverse proxy in front, the concurrency settings you intend to use, and the evidence you need at handover, such as the unit file, the environment overrides and a record of the start-up checks.

Ask for a quote that follows from that written scope. DeployOpen does not publish a price list, so the cost depends on what the scope contains: how many hosts and GPUs are involved, whether the work includes an authentication layer in front of the API, how many model sources must be validated, and how much knowledge transfer your team needs. Ask the quote to separate one-time work (installation, hardening, documentation and initial testing) from any recurring items, and to state which party handles driver and Ollama upgrades after handover. Ongoing support, upgrades and continuous testing are available as a retainer, which suits teams that expect new Ollama releases to be applied on a regular cadence rather than only when something breaks.

Before you sign, confirm with DeployOpen who owns each decision in the scope, including the choice of who can pull or delete models and where audit records are kept. Confirm also what handover looks like: a runbook your operations team can follow, the restore steps for the model directory, and a rollback path if a new Ollama release changes behavior. DeployOpen prepares systems and evidence for compliance reviews, but it does not issue audit reports, attestations or certifications, so any assurance your auditors need must come from them. Partner or certification claims are not part of this engagement, and you should not accept them as a reason to skip your own review of the written scope.

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.