Sovereign and air-gapped AI with Mattermost

Keep Mattermost Agents inside your boundary with self-hosted model backends, per-bot access controls, PostgreSQL-hosted vector search and an air-gapped deployment, planned before the build starts.

On this page

Keeping Mattermost Agents AI inside your boundary

A regulated or security-sensitive team that wants AI help in Mattermost needs to know exactly where every prompt, file and vector travels before anything is switched on. Sovereign AI in this context means that every component in the Agents path runs inside infrastructure your organization controls: the Mattermost server, its PostgreSQL database, the file store, the LLM backend, any MCP tool servers and the embedding and vector search layer. Air-gapped means the same path also works with no outbound internet connection, so model weights, plugin packages and updates must be carried across the boundary by a controlled process. Mattermost lists air-gapped deployment in its Enterprise Advanced plan, according to the Mattermost pricing page, which lists no public prices and directs buyers to contact sales. Confirm with Mattermost which plan covers each component you intend to use, including air-gapped support, before you design the architecture around it.

The boundary has to be checked at each hop, not assumed from the platform. Start by listing every outbound destination the Agents setup would contact, including the LLM endpoint, any hosted model API, hostname allowlists and any outbound proxy, and confirm that each one resolves to a service you run. The Agents plugin is preinstalled, but the model backend is your choice, so a hosted provider endpoint can quietly reintroduce an external dependency. Ask the team that owns the model backend to document where inference runs, where logs and cached prompts are stored, and whether any telemetry leaves the network. For local runtimes such as Ollama, the Ollama FAQ states that a local instance does not see your prompts or data, and that cloud features can be disabled with OLLAMA_NO_CLOUD=1. Treat that as a claim to verify in your own network capture, not as a substitute for the test.

Once the boundary is drawn, the decisions that matter most are per-bot and per-model. Each bot can be pointed at a different backend, so a bot for internal engineering can run on a local model while another bot stays off-limits to sensitive channels, and each bot's tool access and data sources should be reviewed separately. Plan the model artifacts and plugin packages the same way: record their source, checksums and approval, and define who can move them across the air gap. Your compliance team will likely ask how this maps to supply chain controls such as NERC CIP-013-2, which concerns verifying the integrity and authenticity of vendor software and patches. Before work starts, ask DeployOpen or your own architects for a written inventory of components, outbound destinations, and the owner for each bot, so the approval conversation with security and compliance happens against a concrete design.

Which components must stay inside the boundary

Sovereign AI holds only if every component that touches a prompt, a file or a vector stays under your control. The cards below cover the parts that carry data and the parts that bring code or models across the boundary, with the checks to run on each before go-live.

Mattermost server and PostgreSQL

Mattermost runs as a single Linux binary backed by PostgreSQL, and that database holds the channel history, user records and agent conversations your AI features read. Confirm that both the server and the database run on hosts you operate, that database backups are encrypted and stored inside the boundary, and that outbound network rules block any destination the Agents configuration does not explicitly allow. Check the plan level that includes air-gapped deployment before you commit to an architecture.

Deployment planning docs

Model backend and inference hosts

The model backend is where prompts and responses are processed, so it is the component most likely to leave the boundary by accident. Self-hosted Ollama or vLLM keeps inference on hardware you manage, while a provider reached through an approved route must be checked for data residency, retention and network path. Confirm which backend each bot uses, that no fallback sends requests to a public endpoint, and that cloud features are disabled where your policy requires it.

Ollama repository

Vector store and embeddings

Semantic search over channel history creates embeddings and a vector index, and both are derived from sensitive conversation content. Keeping the vector store in your own PostgreSQL means the index inherits the same backup, access and retention controls as the message data. Confirm where the embedding model runs, whether it is self-hosted, and that vectors are deleted when the source messages are deleted or retention rules apply.

MCP tool servers

MCP servers give agents access to internal systems such as ticketing, source control or document stores, so each server is a data path and a permission boundary. Confirm that every MCP server runs inside your network, that it authenticates with service credentials scoped to the tools it exposes, and that tool approval and call limits are set for each agent. Record which systems each server can read or write, because that list defines what an agent can reach.

Package and model update path

A disconnected environment still needs patches, container images and model weights, and each one crosses the boundary through a transfer step. Define who downloads artifacts, how their integrity and authenticity are verified against vendor-published checksums or signatures, and who approves them before import. Confirm the internal registry or mirror that serves Mattermost releases and model files, and document how the transfer is logged so the update history can be reviewed.

How the parts fit inside the trust boundary

The walk starts with users in the browser or desktop client reaching the Mattermost server, where the Agents plugin handles each request. The server reads conversation context from PostgreSQL, including pgvector embeddings kept in the same database, and sends prompts only to a model backend on the internal network. Any MCP tool server is called from inside the boundary as well. The check that matters most is the egress boundary: confirm that outbound traffic is blocked and that packages and model files enter only through the offline import path, where each artifact's integrity is verified before it is loaded.

Components, data hand-offs and the offline import path inside an air-gapped Mattermost Agents deployment.

Choosing a self-hosted model backend

Ollama is an open source runtime for running large language models locally. It is written in Go with a llama.cpp backend, is licensed under MIT, and runs on macOS, Windows, Linux and Docker. It is a practical starting point when you want models on hardware you control with little setup, but its defaults assume a trusted host, so the network posture needs deliberate work. Ollama exposes a REST API on port 11434 with OpenAI compatibility, and the local API does not require authentication.

  • Default binding: Ollama listens on 127.0.0.1 port 11434 by default. Changing the bind address with the OLLAMA_HOST variable exposes the API to other hosts, so place it behind a reverse proxy that enforces authentication and TLS.
  • Cloud features: Set OLLAMA_NO_CLOUD=1 or the equivalent server configuration entry to turn off cloud features, so inference stays on your hardware.
  • Model storage: Models live in a default directory per operating system. Use OLLAMA_MODELS to move them to storage you manage and back up.
  • Concurrency: OLLAMA_NUM_PARALLEL defaults to 1 request per model, OLLAMA_MAX_LOADED_MODELS defaults to three times the GPU count (or 3 on CPU), and OLLAMA_MAX_QUEUE defaults to 512 queued requests. Agents with several bots compete for these limits.
  • Paid cloud plans: Running models on your own hardware is unlimited, but the paid cloud tiers and their Enterprise access controls are separate purchases that an air-gapped design does not need.

Confirm the bind address, proxy and firewall rules, and per-model concurrency against the Agents features and user load you plan to run.

Configuration options and when each fits

This table compares the configuration choices that set where Mattermost Agents sends prompts, which bots can reach which models and data, and how far the deployment reaches beyond your network. Read each row as a decision: the option, what it controls, when it fits, and what it costs you in flexibility or effort. Most organizations settle the egress and model backend questions first, then decide how far to split bots and retrieval.

OptionWhat it controlsWhen it fitsTrade-off
One bot per LLM backendAssigns each Agents bot to a single model service, so a user's choice of bot determines where their prompts go.Teams with one approved model per data class, such as a self-hosted model for regulated records and a hosted model for public material.Users must understand which bot to pick, and each backend needs its own credentials, allowlist entries and monitoring.
Multiple bots on different modelsLets one Mattermost server offer several bots, each with its own model, instructions and tool set.Departments with different needs, such as engineering on a code-tuned local model and legal on a model inside the boundary.More configuration to review at each upgrade, and more places where a misconfigured bot can expose data.
Per-bot access and tool permissionsLimits which users and channels can reach a bot and which MCP tools it may call.Bots that touch internal systems, where a read-only research bot should not share permissions with a bot that can change records.Permission design must be done for each bot, and gaps appear when channel membership changes faster than the bot settings.
OllamaServes models on a single host through a REST API on port 11434 with an OpenAI-compatible interface, and keeps model files on local disk.Smaller teams, pilots, and workloads where one host with moderate concurrency is enough and simple administration matters more.Concurrency defaults are conservative, and high-throughput use needs tuning of parallel requests and loaded model limits.
vLLMServes models as a high-throughput inference engine with an OpenAI-compatible server and an offline documentation option for air-gapped use.Several concurrent users or larger models that need accelerator capacity planned and validated in advance.Requires more setup, accelerator sizing and model compatibility testing than a single-host runtime.
pgvector on the existing PostgreSQLStores embeddings in the same PostgreSQL database Mattermost already uses, so vectors stay in one controlled database.Organizations that already operate PostgreSQL with backup and access controls and want one data store to review.Vector workloads share database resources and backup windows with chat data, so capacity planning and tuning must include both.
Separate vector storePlaces embeddings in a dedicated service, separate from the Mattermost database.Large retrieval workloads, or teams that already run a vector service with its own access model and sizing practices.Adds another service to secure, back up and document, and another data flow to show an assessor.
Fully offlineBlocks all outbound connections from the Mattermost server and the model host, so every model and package is loaded from inside the boundary.Air-gapped networks and environments where any outbound path is a control failure.Models, updates, plugin packages and security patches must be imported through an approved process, which slows upgrades.
Controlled egress allowlistPermits outbound calls only to named hostnames, such as an approved hosted model endpoint, through an outbound proxy if one is used.Networks that allow specific approved providers under contract and need a documented, reviewable list of destinations.Each allowed hostname is a data flow to justify, and the list must be reviewed whenever a provider or endpoint changes.

Setting up a sovereign AI deployment in order

This sequence takes Mattermost Agents from plan to a tested, egress-blocked deployment in which every model call, vector and log stays inside your boundary. Each step closes with a check, so a failed gate stops the work before the next component depends on it.

  1. Confirm the plan and deployment target

    Your architecture owner and security lead confirm the Mattermost plan, the deployment target (Kubernetes, Linux or containers) and whether the environment is air-gapped. Air-gapped deployment is listed under the Enterprise Advanced plan on Mattermost's pricing page, so confirm the plan level with Mattermost sales before any build starts. Record the approved model providers, the data classes each bot may see and the network zones involved. Done when the plan, target and boundary diagram are signed off in writing.

  2. Build and stage the Mattermost server and database

    Your platform team installs the Mattermost server and PostgreSQL inside the boundary, using the deployment planning guidance for your chosen target. For an air-gapped build, stage the binaries, container images and packages through an approved transfer process and verify their integrity before they enter the network. Confirm that the server starts, the database connection works and an administrator can sign in. Done when the server reports healthy and a test user can post in a channel with no outbound internet access.

  3. Stand up the model backend and test its API locally

    Your AI platform team installs the model runtime on an internal host, such as Ollama or vLLM, and loads the approved models from internal storage. Ollama listens on 127.0.0.1 port 11434 by default, so confirm the bind address and expose it only to the Mattermost server through an internal proxy or firewall rule. Send a test request to the OpenAI-compatible endpoint from the Mattermost host and confirm a response. Set OLLAMA_NO_CLOUD=1 so cloud features stay off. Done when the model answers from the Mattermost server's network segment and the request log shows no outbound call.

  4. Configure the Agents plugin with an internal endpoint

    A Mattermost administrator enables the preinstalled Agents plugin and points its LLM service at the internal model endpoint, using the API URL and the /v1 path for Ollama or the equivalent for vLLM. Add only the internal hostnames to the hostname allowlist and set the outbound proxy setting if your network requires one. Remove any default provider entries that point to external services. Done when a test prompt returns a response through the plugin and the allowlist contains no external hostname.

  5. Create one bot per model with its own access rules

    The AI governance owner defines which channels, teams and user groups each bot may access, then an administrator creates one bot per model so that a sensitive-data bot can run on a local model while a lower-risk bot uses a different approved backend. Assign each bot only the tools and data it needs, and record the mapping from bot to model to permitted audience. Confirm the access rules with a non-administrator test account in each channel. Done when a user outside a bot's audience receives no response from it and each bot logs to the expected model.

  6. Enable pgvector in your own PostgreSQL

    The database team installs the pgvector extension in your own PostgreSQL instance, inside the boundary, and grants the Mattermost database role only the privileges the feature requires. Confirm the extension version against your PostgreSQL major version and the Mattermost semantic search prerequisites, then configure the embedding settings to use the internal model endpoint. Confirm that embeddings and vectors are written only to your database. Done when a permission-aware search returns results for a user who has access to a channel and returns none for one who does not.

  7. Test the deployment with egress blocked

    The security team blocks outbound traffic from the Mattermost server, model host and database to the internet, then runs scripted test cases covering normal prompts, bot access boundaries, attempts to reach external model hosts and plugin configuration changes. Capture logs from the proxy, firewall and Mattermost for each case. Include a prompt injection test if an MCP tool or file access is enabled. Done when every test passes, no external connection attempt succeeds and the evidence package is filed for the compliance review.

How packages, models and updates cross the boundary

Everything that enters an air-gapped AI deployment arrives on media or through a controlled transfer host, and each artifact class needs its own intake step. Kubernetes can be prepared without internet access: kubeadm documents pulling control plane images in advance with kubeadm config images list and kubeadm config images pull, then pointing kubeadm init at a private registry through --image-repository. Mattermost server packages, container images, plugin bundles including the Agents plugin, Ollama or vLLM images, and model weights all follow the same pattern: staged on a connected side, moved across, loaded into an internal registry or file store, and only then consumed. Security Onion and Wazuh both document offline update paths (Security Onion's airgap mode updates from newer ISO media, and Wazuh publishes an offline installation guide), so the team can use those patterns as a reference when designing its own media workflow. Confirm the exact update procedure for each product version you run.

NERC CIP-013-2 is a useful benchmark for the verification step. It asks that supply chain procurement processes address verification of software integrity and authenticity for vendor software and patches, which is the control behind checking every package before it crosses an isolated boundary. In practice, the team should verify checksums or signatures published by each vendor, record the hash of every Mattermost binary, container image, plugin and model file in an intake log, and scan artifacts before they reach the internal registry. Model weights need the same treatment as software, including confirming the source, license and file hashes of each model you load into Ollama or vLLM. Confirm with each vendor how it publishes signatures for its artifacts, since the supplied facts do not describe them.

Update cadence drives how often this intake runs. Mattermost releases a new server version in binary form on the 16th of each month, and v11.11 (released 2026-09-16) has support ending 2026-12-15, while v11.7 is an Extended Support Release with support ending 2027-05-15. Teams running monthly releases will push the full verification cycle roughly every month, so they should decide whether they follow monthly versions or stay on an ESR and plan the move between them. The supported window of each version is the planning constraint: confirm current end-of-support dates on the Mattermost server releases page before scheduling a transfer, and keep a tested rollback image for each release you approve.

Security and operational risks to control

Self-hosted AI keeps data inside your network only if the model endpoints, credentials, stored content, tool permissions, bot configuration and model versions are each controlled. The cards below cover the risks that most often break that boundary, and what to check before the bots reach real channels.

Unauthenticated local model APIs

Ollama binds to 127.0.0.1 on port 11434 by default, and its local API does not require authentication. If you change the bind address with OLLAMA_HOST or place a proxy in front of it, anyone who can reach that address can send prompts to the model. Confirm the listening address on every model host, restrict the port at the network layer, and put authentication and access logging in front of any endpoint that Mattermost Agents or other clients can reach. Regulated operators examine remote access paths in a similar way, for example under NERC CIP-005-7, which requires encrypted access through an intermediate system with multi-factor authentication.

Ollama FAQ

Cloud API keys leaving the boundary

Direct cloud inference at ollama.com requires an API key sent as a Bearer token, so a misconfigured bot or client can send prompts outside your network without any change to the Mattermost server. Keep the cloud endpoints unreachable from the Mattermost and model hosts that should stay in the boundary, and decide whether OLLAMA_NO_CLOUD=1 belongs in every configuration. Store keys in a secrets manager, rotate them, and review egress logs for requests to external model hosts. Mattermost Agents also uses hostname allowlists, so confirm the list matches the endpoints you approved.

Ollama API authentication

Prompts and vectors in logs and backups

Prompts, retrieved channel history and embeddings can persist in application logs, reverse proxy logs, database backups, and the PostgreSQL tables used for semantic search. A backup that contains vectors built from private channel content carries the same sensitivity as the messages themselves. Decide which logs record request bodies, set retention for each store, and restrict who can read backups. Ask your vendor and auditor how each component handles prompt content before you define the retention schedule.

Tool permissions reaching internal systems

MCP tools let a bot act on internal systems, so a tool that can read tickets, query a database or change configuration becomes part of the attack surface. Risk grows when tools are enabled for every agent, when automatic tool calls skip human approval, or when a prompt injected through a channel message steers the model toward a privileged call. Grant tools per agent, require approval for write operations, set tool-call limits, and test each MCP server with its service account rather than an administrator account.

Per-bot access drift

Multiple bots on different models, with different tools and channel scopes, drift over time as teams add bots, copy configurations and grant access for short-term projects. A bot that was reviewed for one channel can later answer in another, and its model may point to a different backend than the one the security team approved. Keep an inventory of each bot with its model endpoint, tools, channels and owner, and review that inventory on the same schedule as user access reviews.

Model update governance

Model files, runtime versions and plugin releases change independently. Ollama publishes frequent releases, including pre-releases, so a runtime that updates without review can change behavior, API surface or default settings. Pull models only from sources your team has approved, record the model name, digest and runtime version for each bot, and test a new version against your prompts and tool permissions before it replaces the current one. Confirm how your air-gapped process verifies package integrity, since NERC CIP-013-2 expects vendor software and patches to be verified in procurement.

Ollama releases

Questions buyers ask before hiring help

What drives the cost of a sovereign AI deployment with Mattermost?

The main drivers are the Mattermost plan, the hardware for model inference, the number of models and bots you need, the number of systems the agents connect to, and the amount of testing you require. Mattermost sells Professional, Enterprise and Enterprise Advanced as prepaid annual subscriptions by seat count, and its pricing page lists no public prices, so ask Mattermost sales for the subscription terms. Air-gapped deployment is listed in Enterprise Advanced, so that plan level is a cost question before it is a technical one. Model hardware is usually a one-time purchase or capacity commitment, while subscriptions and support recur. Ask any partner for a quote that separates one-time build work from recurring upgrades, testing and support.

Can our own team deploy Mattermost Agents with a local model alone?

A capable team can do it alone if it already runs Linux servers, PostgreSQL, a reverse proxy and GPU or CPU capacity, and has time to learn the Agents plugin settings. The work is less about installing software and more about the combination: a self-hosted model runtime, per-bot access rules, outbound allowlists, vector search on your own database and a method for moving packages across an isolated boundary. Teams that lack one of those skills often spend their time on the integration rather than the model. A useful test is whether someone on the team can explain every outbound path the system uses and who approves a change to it. If not, a scoped engagement can cover the gap while your team keeps ownership of the system.

What do we need to provide for an air-gapped AI engagement?

You need to provide network design decisions, change approvals and named data owners before the build starts. Network design covers which hosts can reach the Mattermost server, the database, the model runtime and any MCP servers, and which paths stay closed. Approvals cover how software packages and container images are checked and brought across the boundary, which matters for supply chain controls such as the one in NERC CIP-013-2 if your sector uses that standard. Data owners decide which channels, files and records agents may read, how long vectors are kept and who can see which bot. Give your partner access to the environment and a test identity early, because most delays come from waiting on these inputs.

How long does a sovereign AI engagement take?

Duration depends on scope, and the main variables are the number of bots and models, whether the environment is fully air-gapped, how many integrations and MCP tools are connected, and how many approval cycles your organization runs. A single Agents plugin configured against one self-hosted model is a much smaller piece of work than several bots on different backends with vector search and tool approvals. Approval and network lead times often exceed the technical work, so ask for a timeline that lists those dependencies separately. Engagements are normally fixed-scope, and DeployOpen agrees scope, deliverables and timelines in writing before work starts, so the timeline will reflect the scope you approve.

Can a self-hosted model match hosted model quality for our tasks?

It can match hosted quality for some tasks and fall short on others, so the answer must be confirmed per task rather than assumed. Open-weight models served through Ollama or vLLM vary widely in reasoning, summarization, tool calling and context length, and the Mattermost Agents plugin may not support every feature with every model. Test the exact prompts, channel histories and tool calls your teams use, score the answers against an agreed rubric, and compare the results with the hosted option you would otherwise use. Compute sizing follows from the model you choose, so the quality test and the hardware decision should happen together.

How is an AI engagement scoped and agreed in writing?

Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. For a sovereign AI build, the written scope should name the Mattermost plan and deployment target, the model backends and bots, the access rules per bot, the vector search database, the MCP tools in scope, the testing included and the acceptance criteria. It should also state what the client provides, such as access, approvals and data owner decisions. Ask for a list of deliverables you can check at handover, and for any recurring work such as upgrades or retesting to be priced separately. Ongoing support and continuous testing are available as retainers.

Does DeployOpen certify that our AI setup meets compliance requirements?

No. DeployOpen prepares systems, controls and evidence for compliance assessments, but independent auditors and certification bodies issue audit reports, attestations and certifications. A sovereign AI build can support a review by documenting data flows, outbound allowlists, access controls per bot, audit logging and package verification. Whether those controls satisfy your obligations depends on your sector and your assessor, so confirm the applicable requirements with them before the design is fixed. Ask your partner to map each control to the evidence you will hand to the assessor.

How DeployOpen scopes and delivers sovereign AI deployments

DeployOpen plans, implements, hardens and documents self-hosted Mattermost Agents inside your own infrastructure, including air-gapped networks. Each engagement starts with a written scope that fixes the model backends, bot access rules, data stores and evidence your security and compliance teams need before anything is built.

How we scope

  • Inventory which Mattermost Agents features are in scope and which LLM backends each bot will use
  • Map where prompts, embeddings and channel history are stored, and which boundary each one stays inside
  • Confirm the Mattermost plan level, plugin version and PostgreSQL setup needed for the chosen features
  • Agree deliverables, timelines and exclusions in writing before work begins, since engagements are fixed-scope

How we build

  • Deploy the self-hosted model backend and configure per-bot access so each bot reaches only approved models
  • Configure SSO, access control and audit logging so your compliance team can review the AI access path
  • Set up pgvector search on your own PostgreSQL if permission-aware search is in scope, with embedding settings documented
  • Prepare the air-gapped package path, including how packages and model files are checked before they cross the boundary

How we hand over

  • Test prompt injection, tool permissions, data exposure and credential handling against the agreed scope
  • Deliver configuration records, network and data-flow diagrams, and evidence prepared for your independent assessors
  • Document the runbook for adding a model, rotating keys, updating the plugin and recovering the service
  • Walk your platform and security teams through the setup and the retest results before sign-off

How we support

  • Plan upgrades around the Mattermost release cadence and the support windows your organization chooses
  • Review each new model, tool or plugin change against the agreed controls before it reaches production
  • Offer ongoing support, upgrades and continuous testing as a retainer, priced from the written scope
  • Ask for the support scope, response expectations and retest terms to be stated in the quote

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.