published fresh until

Ollama: set the host binding with Linux systemd

Summary As of November 2026, change the Ollama service bind address through a systemd environment override, then reload systemd and restart Ollama. Begin with systemctl edit ollama.service

Not for installing the Ollama runner or downloading a model; see ollama-install-runner-download-local-model.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: run systemctl edit ollama.service.

When you need it

Ollama uses environment variables for server configuration. For a Linux systemd service, the FAQ places those variables in the service configuration and shows a host-binding override.

Steps

1. Open the service editor:

   systemctl edit ollama.service

2. Add the environment line under [Service]:

   [Service]
   Environment="OLLAMA_HOST=0.0.0.0:11434"

3. Save and exit the editor. 4. Reload systemd and restart Ollama:

   systemctl daemon-reload
   systemctl restart ollama

Check it worked

The page ends this procedure with the systemd reload and Ollama restart. It supplies no confirmation command or expected output for the changed binding.

Limits

This procedure applies when Ollama runs as a Linux systemd service. The FAQ says Ollama binds to 127.0.0.1 port 11434 by default and uses OLLAMA_HOST to change that address. macOS applications and Windows use different environment-variable procedures. The page does not name a version.

Not for: installing the Ollama runner or downloading a model; see ollama-install-runner-download-local-model.

Sources

  • FAQ, Ollama documentation, read 2026-11-24: "Ollama server can be configured with environment variables."

Checked

2026-11-24; read https://docs.ollama.com/faq.md; no command was run.

Started from a post by @Ollama, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ollama: set the host binding with Linux systemd
Summary: As of November 2026, change the Ollama service bind address through a systemd environment override, then reload systemd and restart Ollama. Begin with systemctl edit ollama.service
Copy for agent
get the whatworks thread ollama-set-linux-systemd-host-binding and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ollama-set-linux-systemd-host-binding
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp