Mattermost Agents with local LLMs on Ollama or vLLM

Mattermost Agents can call a self-hosted model through the OpenAI-compatible option. This page covers the endpoint, the /v1 path, the Responses API toggle, security and sizing.

On this page

How Mattermost Agents connects to a model you run on Ollama or vLLM

If you want AI answers inside Mattermost without sending prompts to a public provider, point Mattermost Agents at a model you run on Ollama or vLLM through the OpenAI-compatible option, using an API URL that includes the /v1 path. On the Mattermost side, this is an LLM service configuration: you name the endpoint and the model, and Agents sends OpenAI-style requests to that URL. Everything behind the URL belongs to your team: the model server, the address it listens on, how callers authenticate, and the CPU or accelerator capacity that generates each answer. Make those decisions before the Mattermost configuration starts, because they determine how the setup behaves under daily use.

The bind address and authentication are where most exposure happens. Ollama listens on 127.0.0.1 port 11434 by default, so a Mattermost server on another host cannot reach it until you change the bind address with the OLLAMA_HOST variable, and its local API does not require authentication. Expose it only behind a proxy or network rule that limits access to the Mattermost server. vLLM serves /v1/chat/completions and /v1/responses through vllm serve, but its --api-key option does not protect /metrics or /health. The vLLM security documentation recommends a reverse proxy that allowlists only the endpoints your users need, so confirm exactly which paths Agents calls before you write that allowlist.

The Agents plugin itself, including its preinstalled status, server prerequisites, the default bot and hostname allowlists, is covered on the sibling page on setting up the Mattermost Agents plugin, so this page stays on the model side. Before you start, confirm three things with your infrastructure team: which host runs the model server, that the Mattermost server can reach the /v1 URL across your network path, and that the model you choose fits the accelerator memory you have. For vLLM, supported hardware includes NVIDIA CUDA, AMD ROCm and Intel XPU GPUs, along with several CPU architectures, so check the installation documentation for your platform. Then send one test request from the Mattermost host to the endpoint before you enter it in Mattermost.

What you need before pointing Agents at a local model

Pointing Mattermost Agents at a model you host takes four things to line up: a Mattermost server ready for AI, a model server on a pinned release, enough compute for the model you choose, and a network path between the two. Each card below covers one of these, so you can confirm each before you change any Agents settings.

Self-hosted Mattermost with Agents ready

Agents ships as a preinstalled plugin, but it only works once the server and database prerequisites on the Agents setup page are in place. Confirm that your Mattermost server version supports the Agents plugin you plan to run, that your PostgreSQL database meets the documented requirements, and that you have an admin account for the System Console. Check the server version against the release calendar before you start, because the Agents plugin follows the server release cycle.

Monthly binary release day
16th
Mattermost server releases

Model server pinned to a release

Ollama and vLLM both ship releases often, and the API behavior that Agents relies on can change between them. Pin one exact version of the model server and record it in your change log. For example, Ollama v0.40.5 was released on 14 October 2026 and vLLM v0.31.0 on 5 October 2026, but treat those as examples to confirm. Check the current release on each project's release page and test that version against your Mattermost server before you pin it.

Ollama releases

Accelerator or CPU capacity for the model

Model size, quantization and concurrent users decide the hardware, and no single figure fits every workload. vLLM runs on NVIDIA CUDA, AMD ROCm, Intel XPU, several CPU architectures and Apple silicon, so confirm that your chosen accelerator and driver stack is in the supported list for your version. Ollama's default of one parallel request per model also shapes sizing. Ask your team to benchmark the target model on the host before users depend on it.

vLLM installation

Storage for model files

Models are large, and their location affects backup scope and restore time. Ollama stores models in a default directory per operating system, and the OLLAMA_MODELS variable moves them elsewhere. Decide where weights live before the first pull, put that path on storage with enough free space for several model versions, and include it in your backup plan. Remember that models are not Mattermost data, so restore procedures for the chat database do not cover them.

Network route from Mattermost to the model host

Agents calls the model endpoint from the Mattermost server, so the server must reach the model host on the port your model server listens on. Ollama binds to 127.0.0.1 on port 11434 by default, so you must change its bind address deliberately and restrict who can reach it. Keep the model host on an isolated network segment, and confirm the route with a simple request from the Mattermost server before you configure the plugin.

Outbound proxy and hostname allowlist

If your Mattermost server reaches the model only through an outbound proxy, or sits behind an egress allowlist, add the model host to the allowed hostnames and set the proxy in the Agents configuration as the setup page describes. Ask your network team whether internal addresses bypass the proxy. Test the path from the same account and host that runs Mattermost, because a success from a workstation does not prove the server can connect.

Deployment planning docs

How a request moves from Mattermost to your model host

The request starts with a user in Mattermost, passes through the Agents plugin on the Mattermost server, and leaves the server through an outbound proxy or hostname allowlist. Inside your network, a reverse proxy receives the call on the /v1 path and forwards only the endpoints users need to the Ollama or vLLM server. Check three things: the URL the plugin calls includes the right /v1 path, authentication is enforced at the proxy because the local Ollama API does not require it, and the model server is reachable only from the proxy.

Request path from a Mattermost user to a self-hosted model server inside the organization's network.

Ollama or vLLM: choosing the backend for your environment

Ollama fits evaluation work and small teams that need a model running on one machine with little setup. It is open source under the MIT license, runs on macOS, Windows, Linux and Docker, and serves a REST API on port 11434. Ollama states that when it runs locally it does not see your prompts or data, which matters for review teams checking where text goes.

  • Default binding: Ollama listens on 127.0.0.1 port 11434 by default, and the bind address changes through OLLAMA_HOST. Any change to expose it beyond the host should go through a proxy you control.
  • No built-in authentication locally: The local API does not require a key, so network access to the host is the control that matters.
  • Cloud features: Cloud inference needs an API key, and cloud features can be switched off with OLLAMA_NO_CLOUD=1 or the server configuration file.
  • Concurrency limits: OLLAMA_NUM_PARALLEL defaults to 1 request per model, so plan for queueing when several users share the host.
  • Model storage: Models live in a default directory per operating system, and OLLAMA_MODELS moves them to a disk with enough space.

Confirm with the Ollama documentation which release you will run, since the project ships frequent updates. Check the concurrency settings against the number of people who will use the agent before you go live.

Configuring the OpenAI-compatible service in Mattermost Agents

This sequence connects Mattermost Agents to a model server you run yourself, either Ollama or vLLM, through the OpenAI-compatible option. It ends with a bot that answers in a channel and with checks you can rerun after any change. Each step names the check that confirms it is done.

  1. Prepare the model host and load a model

    The platform or infrastructure team installs Ollama or vLLM on a host that Mattermost can reach over the network, then loads one model. For Ollama, run ollama pull with the model you approved and run a local prompt. Ollama stores models in a directory that depends on the operating system, and the OLLAMA_MODELS variable moves them if the default disk is too small. For vLLM, start vllm serve with the model you chose, on accelerators that the installation docs support for your platform. The step is done when a local request returns generated text from the model.

  2. Bind the model server to a reachable address

    Ollama listens on 127.0.0.1 port 11434 by default, so the Mattermost server on another host cannot reach it. Set OLLAMA_HOST to an address on your private network segment, and set OLLAMA_NO_CLOUD=1 so cloud features stay off. For vLLM, pass the host and port you want to vllm serve. Restrict the port with firewall rules so only the Mattermost server and the proxy in the next step can connect. The step is done when this command returns a list that includes your model: curl http://<model-host>:11434/v1/models (run it from the Mattermost host).

  3. Add a reverse proxy in front of the server

    The local Ollama API does not require authentication, and the vLLM security docs say the --api-key option does not cover every endpoint, so they recommend a reverse proxy that allowlists only the endpoints users need. The network team places a proxy such as Nginx in front of the model server, terminates TLS, requires a credential at the proxy, and forwards only the OpenAI-compatible paths that Agents calls. The step is done when a request to an allowed path through the proxy succeeds and a request to an unlisted path, such as /metrics, is blocked.

  4. Enter the API URL with the /v1 path

    A System Console administrator opens the Agents plugin settings and selects the OpenAI-compatible service. In the API URL field, enter the proxy address with the /v1 path at the end, using the hostname your organization has issued to the model server. Confirm the exact field labels for your Mattermost version in the plugin settings, and make sure the hostname appears on the allowlist configured for the Agents plugin. Save the configuration. The step is done when the save succeeds and the server log shows no connection errors when the service is used.

  5. Decide the Responses API toggle

    The OpenAI-compatible option includes a Responses API toggle, and its setting should match what your model server supports. The vLLM online serving docs list a /v1/responses endpoint along with /v1/chat/completions, so vLLM can serve Responses API requests. For Ollama, check its OpenAI compatibility documentation for the version you run before turning the toggle on. If you cannot confirm support, leave the toggle off and rely on chat completions. The step is done when a test request to the endpoint the toggle selects returns a valid JSON response from the proxy.

  6. Select the model name the server reports

    The administrator enters the model identifier exactly as the server reports it. For Ollama, that is the name used when the model was pulled. For vLLM, it is the model the server was started with. Compare the value with the output of the models request from the earlier check, including tags or version suffixes. A name that does not match the server's list produces errors when the bot sends a request. The step is done when the identifier you entered appears character for character in the models response and the settings save without validation errors.

  7. Assign the default bot to the service

    In the Agents settings, the administrator assigns the default bot to the new OpenAI-compatible service. Keep the default bot on a backend that the organization has approved for the data its users will share. If different bots need different models, configure them separately, as the sovereign AI and per-bot access topic describes. The step is done when the bot's settings show the new service and model, and a direct message to the bot receives a reply.

  8. Test with a prompt in a channel

    A tester creates a test channel with only approved test users, mentions the bot, and posts a prompt with a known expected answer. The reply should appear in the channel, and the proxy and model server logs should show one matching request. Then stop the model server briefly and confirm that the bot returns an error message and that the failure appears in the logs. Repeat the curl checks after any change to the model, proxy or Responses API setting. The step is done when the expected reply appears, the logs match, and the failure test behaves as described.

Which settings map to which endpoint and model fields

This table maps each Mattermost Agents setting to the value the model server must expose, and shows how to confirm it from the Mattermost server host. Read it top to bottom when a bot does not answer. The main takeaway is that the model name must match exactly what the server reports, because a mismatch often fails silently without a clear error in Mattermost.

Mattermost settingWhere it is setModel-side valueHow to check it
API URLLLM service settings in the Agents plugin configurationOllama: base URL with port 11434 and /v1. vLLM: base URL with the port passed to vllm serve, plus /v1Run a GET to the base URL with /v1/models from the Mattermost server host and confirm a JSON response
/v1 pathSame API URL field as aboveBoth servers expose OpenAI-style paths under /v1, such as /v1/chat/completionsConfirm the chat completions path returns a response, not a 404, from the Mattermost server host
Model nameLLM service or per-bot model fieldOllama: the model tag as listed by ollama list, including the tag suffix. vLLM: the served model nameCompare the string character by character with the name returned by /v1/models; no extra spaces or case differences
Responses API toggleLLM service settings in the Agents plugin configurationEnable only if the server serves /v1/responses. vLLM documents this endpoint; confirm Ollama support for your versionSend a minimal request to /v1/responses and confirm success before turning the toggle on
Bot assignmentPer-bot LLM configuration in the Agents pluginThe bot must point to the service and model name you tested, since each bot can use a different backendSend a direct message to the bot with a short prompt and check the server logs for the model name used
Allowlisted hostnameHostname allowlist in the Agents plugin or server settingsExact hostname or IP of the model host, including any non-default portResolve the name and connect from the Mattermost server, not from a workstation, to confirm the match
Outbound proxyOutbound proxy settings for the Mattermost serverIf a reverse proxy fronts the model server, it must forward /v1 paths and the internal host must bypass the proxyRun the same curl request through the configured proxy and compare with a direct request
Listen address and portModel server: OLLAMA_HOST for Ollama, host and port flags for vLLMOllama defaults to 127.0.0.1 on port 11434, so remote access needs a changed bind addressOn the model host, check the listening socket and confirm it is reachable from the Mattermost server only
API keyLLM service key field, if the model server requires oneLocal Ollama has no authentication by default. vLLM --api-key protects /v1 paths but not every endpointRequest /v1/models without a key and confirm the expected 401 response when a key is required

Compute sizing and features that vary by model

Compute sizing for a local model is driven by four levers that interact: model size, quantization, context length and concurrency. Larger parameter counts need more memory, quantization reduces that footprint at some cost in output quality, longer context windows grow the memory held per request, and every additional simultaneous user adds load that competes for the same hardware. For Ollama, the concurrency settings decide how much of that load a single server accepts. OLLAMA_NUM_PARALLEL defaults to 1 parallel request per model, OLLAMA_MAX_LOADED_MODELS limits how many models stay in memory at once, and OLLAMA_MAX_QUEUE (default 512 queued requests) sets how many requests wait before new ones are refused. Agents traffic from several channels can reach these limits quickly, so confirm the values with a test run that mirrors your real usage. For vLLM, capacity comes from parallelism. Tensor parallelism splits a model across GPUs within one node, and pipeline parallelism spans nodes, which adds network latency and needs an isolated network between nodes.

Features do not behave the same across every model or server. Tool calling for MCP tools, structured or JSON response formats, the Responses API path and streaming can each work with one model and fail or degrade with another, and the same model can behave differently behind Ollama and vLLM. Treat each Agents feature as a separate test case and run it against the exact model name, quantization and server version you plan to use, not a similar model from the same family. Record the result for each feature, including malformed tool arguments, refusals and timeouts, and repeat the tests after any model or server upgrade. Sizing also needs a workload estimate covering expected users, requests per hour, typical prompt and response length and the number of bots. Your team or a partner should produce that estimate and use it to size hardware. Confirm the current hardware requirements for your chosen model with its publisher and the serving engine's documentation before buying capacity.

Securing the model endpoint before Agents calls it

Mattermost Agents sends prompts and channel context to whatever endpoint you configure, so that endpoint becomes part of your trust boundary. The four risks below sit at different layers: the local runtime, the serving engine, the network between its nodes, and the cloud credentials that some setups add. Check each one before you point the plugin at the model.

Ollama's local API has no authentication

The local Ollama API at localhost:11434 accepts requests without authentication, and Ollama binds to 127.0.0.1 by default. If you change the bind address with OLLAMA_HOST so that Mattermost or another host can reach it, the API is open to that network unless something in front enforces access. Place a reverse proxy such as Nginx in front of it, allow only the Mattermost server to connect, and confirm from another host that unauthenticated requests are refused.

Ollama FAQ

vLLM's API key covers only some paths

The --api-key option protects the /v1, /v2, /inference and /cohere endpoints, but not /invocations, /pause, /resume, /abort_requests, /metrics or /health. The vLLM docs warn against relying on the key alone and recommend a reverse proxy that allowlists only the endpoints your users need. Before you configure the Agents plugin, list every route the server exposes and confirm that the proxy blocks the rest.

vLLM security docs

Multi-node vLLM traffic is unprotected

The vLLM security docs state that communication between nodes in a multi-node deployment is insecure by default, with no authorization or encryption. Pipeline and tensor parallel traffic between GPU hosts therefore has to be isolated from user and application networks. Place inference nodes on a dedicated network segment that only they can reach, and keep the Mattermost server and users off it. Ask your platform team who owns that segment and how changes to it are reviewed.

vLLM parallelism docs

Cloud keys belong in a secrets store

Direct cloud inference at ollama.com/api and ollama.com/v1 requires an API key sent as a Bearer token. That key grants access to a paid account and its usage, so it should not appear in a configuration file, a shell history or a chat message. Store it in your organization's secrets manager, limit who can read it, and rotate it when people or systems change. If your policy forbids cloud inference, turn it off with OLLAMA_NO_CLOUD=1 so the key is never needed.

Ollama authentication docs

Metrics and prompts stay inside the boundary

vLLM serves Prometheus-format metrics at /metrics, including request counts, token throughput and KV cache use. Those figures reveal load patterns and can expose model and workload details, so keep that path off any network the Mattermost users can reach and restrict it to your monitoring server. Local Ollama states that it does not see your prompts when it runs locally, but the proxy and logs you add can still record them, so review what each component writes to disk.

Common failures when Agents cannot reach a local model

This table maps each common failure between Mattermost Agents and a local model server to its likely cause, fix and the check that confirms the fix. Work through the symptoms in order, since connection and routing problems hide the model and feature problems that appear later. Confirm each setting against the server version you run, because defaults and endpoints change between releases.

SymptomLikely causeFixCheck for
Connection refusedOllama bound to 127.0.0.1 on port 11434, or the URL points to another portSet OLLAMA_HOST for the interface Mattermost reaches, or place a proxy in front; correct the port in the API URLRequest to the API URL from the Mattermost server host returns a response
404 on the endpointAPI URL missing the /v1 path, or the route does not exist on that serverAdd /v1 to the OpenAI-compatible base URL; confirm the route the server exposesModel list or chat request succeeds with curl from the Mattermost host
Model not foundModel name in the bot configuration differs from the name the server reportsList installed models on the server and copy the exact name into the bot settingModel name matches the server listing character for character
Empty or truncated responsesContext limit reached, or OLLAMA_MAX_QUEUE filled with queued requestsReduce prompt size or channel history sent; raise limits only after sizing memoryServer logs show no queue rejection; full answers return for long threads
Slow replies under loadDefault OLLAMA_NUM_PARALLEL of 1 per model, or too few loaded modelsTune OLLAMA_NUM_PARALLEL and OLLAMA_MAX_LOADED_MODELS against available memory or acceleratorsLatency measured with several users active stays acceptable
401 or 403 from a proxyAPI key missing or wrong, or the proxy allowlist omits the path Agents callsSend the expected key header through the proxy; allowlist only the endpoints users needAuthenticated request succeeds and an unlisted path is refused
Tool or feature errors with a specific modelThe chosen model does not support tool calling or another requested featurePick a model that supports the feature, or disable that feature for the botTest the same prompt with the bot's model outside Mattermost
Responses API errorsResponses API toggle enabled for a server that does not expose /v1/responsesTurn the toggle off, or switch to a server build that serves the endpointEndpoint returns a valid response when called directly

Common questions before connecting Agents to a local model

What does it cost to run Mattermost Agents on a local model?

The model runtime itself has no license fee when it runs on your own hardware. Ollama's pricing page states that running models on your own hardware is always unlimited, and its paid plans apply to cloud models. vLLM has no paid edition, so its cost comes from accelerator capacity, the surrounding infrastructure and the people who operate it. Mattermost cost depends on the plan level in your quote, since Mattermost sells prepaid annual subscriptions by seat license and lists no public prices. Ask the quote to separate hardware, hosting, Mattermost licensing and implementation labor, and to state which items recur each year.

How long does setup take for a local LLM connection?

The duration depends on three things: whether the hardware is already provisioned, how quickly network rules allow Mattermost to reach the model server, and how long your security review takes. A connection that only proves the API works can be finished quickly on prepared hardware. Sizing for real concurrent use, testing permissions and completing review usually take longer than the connection itself. Ask for a timeline built from a written scope, and check which steps depend on your change process or on hardware delivery.

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

Plan to provide the following before the engagement begins:

  • Access to the GPU or CPU hosts where the model server will run, with operating system and driver details
  • Network rules that allow the Mattermost server to reach the model endpoint, and the hostnames it must allowlist
  • The list of models you want to evaluate and the licenses that cover them
  • Test prompts drawn from real workflows, including prompts that should be refused
  • A named owner for model choices, access decisions and sign-off

Without these inputs, the sizing and security tests cannot produce results you can act on.

Can our team connect Agents to a local model without outside help?

A small team with Linux and container experience can usually connect a single model for a pilot using the Agents settings and the OpenAI-compatible option, provided the hardware exists. The gaps that tend to need outside testing are capacity sizing under concurrent use, protecting the model endpoint, and checking which Agents features work with the chosen model. vLLM's security documentation warns that its API key option should not be the only control and recommends a reverse proxy that allowlists user-facing endpoints. Decide early which of those tests your team will run and which it will hand to a specialist.

Does Ollama send our prompts to the cloud?

When Ollama runs locally, its FAQ states that it does not see your prompts or data. Cloud features are a separate path: direct cloud inference at ollama.com uses an API key sent as a Bearer token, and the local API on port 11434 does not require authentication. To keep the runtime local, set OLLAMA_NO_CLOUD=1 or the equivalent in the server configuration file, then confirm the setting on the running server. Also confirm that the port is reachable only from the Mattermost server and not from user networks, because the local API has no built-in authentication.

Which versions should we pin, and how do we track releases?

Pin the Mattermost server to a version your organization has tested, and pin the model server and model files as well. Mattermost releases a new server version in binary form on the 16th of each month, and its Extended Support Releases carry longer support windows, so choose the track that matches your change cadence. Ollama and vLLM ship releases often, with vLLM publishing minor releases about every two weeks in 2026. Subscribe to the release pages, test each candidate against your prompt set and Agents features, then roll out on a schedule you control.

Which Agents features may not work with every local model?

Tool calling, structured output, the Responses API option and embeddings depend on what the model and the server implement, so no single list applies to every model. Confirm each feature you plan to use with the exact model and server version in a test environment before you enable it for users. vLLM exposes /v1/responses and /v1/chat/completions, while Ollama exposes an OpenAI-compatible API, but compatibility of individual features still varies. Record the results with the model name and version so that the next upgrade can be retested against the same list.

How DeployOpen scopes and delivers a local LLM integration for Mattermost

DeployOpen treats Mattermost Agents with local LLMs on Ollama or vLLM as a scoped integration inside your own infrastructure. We agree the models, endpoints, compute, bot access and feature list in writing, then build, test, document and hand over the setup so your team can review and run it.

How we scope

  • Inventory the Mattermost server version, the Agents plugin settings and which teams and bots will use a local model
  • Choose Ollama or vLLM per workload and record the OpenAI-compatible base URL, the /v1 path and the Responses API setting
  • Document which Agents features your chosen models must support, and confirm each one with a test before go-live
  • Agree compute sizing, concurrency targets and the network boundary in a written scope before work starts

How we build

  • Place the model runtime behind a reverse proxy that allowlists only the endpoints users need, not the full API surface
  • Configure the Agents LLM service, hostname allowlists and outbound proxy settings to match the approved endpoints
  • Test each bot against the model with prompt, permission and data exposure checks before users are onboarded
  • Set model storage, concurrency and loaded-model limits so resource use stays within the sized capacity

How we hand over

  • Deliver configuration records, endpoint and network diagrams, and a model compatibility matrix for your review
  • Provide a runbook covering model updates, runtime version checks, credential rotation and rollback steps
  • Walk your platform, security and compliance teams through the setup and the evidence they can use for review
  • Confirm the handover checklist in writing so ownership of each component is clear before the engagement closes

How we support

  • Engagements are fixed-scope, and ongoing support, upgrades and continuous testing are available as a retainer
  • Retesting covers model swaps, Ollama or vLLM upgrades, and Mattermost server upgrades that touch the Agents plugin
  • Monitoring guidance covers runtime metrics and logs so your team can spot capacity or availability problems early
  • Ask for a written quote that lists the scope, deliverables, retest scope and the hosting costs you will carry

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.