Skip to content

Web hosting (Kubernetes) ​

MeiliOps can also run as a web app in a container, next to your Meilisearch servers. Your team opens it in a browser, signs in with your organization's account (for example Microsoft Entra ID), and the Meilisearch API keys stay in the cluster.

Browser ──▶ Gateway / ingress ──/meiliops──▶ MeiliOps pod ──key added──▶ Meilisearch
   ▲                                            │
   └────────── sign-in (OpenID Connect) ────────┘
               Entra ID or another provider
  • MeiliOps signs users in itself, with OpenID Connect, the same way Temporal UI does with its TEMPORAL_AUTH_* settings. You register an app with your identity provider and give MeiliOps its client ID and secret.
  • The pod's keys stay in the pod. It reads them from its environment (a Secret) and adds them to each request it forwards. The browser only sees server names.
  • API key management is off by default. Meilisearch's /keys routes return keys in plain text, so a user who could open them could copy a key, use it without MeiliOps and keep it after losing access. Turn them on with MEILIOPS_ALLOW_KEY_MANAGEMENT=true only if your users may manage keys anyway.
  • Every change is logged with the signed-in user, and with MEILIOPS_AUDIT=all every search and document read too.

Sign-in can't be turned off. MeiliOps does not trust user headers from a proxy in front of it; if your cluster has an SSO proxy such as oauth2-proxy, it can stay in front, but MeiliOps still signs each user in itself (silently, when they already have a session with the provider).

Configure ​

Meilisearch servers ​

Each server is a group of environment variables. <ID> is any name in capitals, digits and _.

Variable
MEILIOPS_SERVER_<ID>_URLRequired. The in-cluster URL, e.g. http://meilisearch.search.svc.cluster.local:7700
MEILIOPS_SERVER_<ID>_KEYThe API key MeiliOps uses for that server. Take it from a Secret
MEILIOPS_SERVER_<ID>_READONLY_KEYOptional. The key used for read-only users instead, so Meilisearch refuses their changes too
MEILIOPS_SERVER_<ID>_NAMEDisplay name (default: the ID)
MEILIOPS_SERVER_<ID>_COLORDot color, e.g. #ef4444
MEILIOPS_SERVERSOptional comma-separated IDs, to set the order

Admins all use the same key for a server. To limit what they can do, give it an API key scoped to the actions and indexes they need rather than the master key. Leave out the keys.* actions unless key management is on.

With one server configured, MeiliOps connects to it on load. With several (for example one per shard), users pick one.

Sign-in ​

Variable
MEILIOPS_AUTH_ISSUER_URLThe provider's issuer. Entra ID: https://login.microsoftonline.com/<tenant-id>/v2.0
MEILIOPS_AUTH_PROVIDER_URLWhere to read .well-known/openid-configuration, if not the issuer
MEILIOPS_AUTH_CLIENT_IDThe app registration's client ID
MEILIOPS_AUTH_CLIENT_SECRETIts client secret. Take it from a Secret
MEILIOPS_AUTH_CALLBACK_URLhttps://<host><public path>/auth/callback, registered as a redirect URI on the app
MEILIOPS_AUTH_SCOPESDefault openid,profile,email
MEILIOPS_AUTH_ADMIN_GROUPSComma-separated group object IDs or app role values. Their members are admins. (MEILIOPS_AUTH_ALLOWED_GROUPS, the older name, still works)
MEILIOPS_AUTH_READONLY_GROUPSComma-separated group object IDs or app role values. Their members can only read
MEILIOPS_SESSION_SECRET32+ random characters. Changing it signs everyone out
MEILIOPS_SESSION_HOURSSession length. Default 1, at most 8

MeiliOps uses the authorization-code flow with PKCE, checks the ID token's signature against the provider's published keys, its issuer, audience, expiry and nonce, and then keeps a signed session cookie. It doesn't keep access or refresh tokens: it only needs to know who you are. When a session ends, the next action takes you through sign-in and back, which is silent while you're still signed in to the provider.

Roles ​

RoleWhoCan
AdminMembers of an admin groupEverything the server's key allows
Read onlyMembers of a read-only group (and no admin group)Browse and search: indexes, documents, settings, tasks, stats. A Read only label shows in the title bar
-Anyone elseRefused at sign-in

With neither variable set, everyone your provider signs in is an admin.

For read-only users the MeiliOps server refuses every request that changes something (creating, updating, deleting, dumps, snapshots, exports, swaps), the API key routes and the MCP endpoint. The app follows suit: buttons and menus that change something are hidden, editors (settings, documents, webhooks, rules) open read-only, the Export, Logs and API keys screens are gone from the sidebar, and the API console lists only read operations. Set MEILIOPS_SERVER_<ID>_READONLY_KEY to a key with only read actions and Meilisearch enforces it as well.

A session keeps the role it was given at sign-in. Moving someone between groups, or removing them, takes effect when their session ends: within MEILIOPS_SESSION_HOURS. Signing out ends the session at once, including any copy of its cookie. That list is kept in the pod's memory, which is one reason MeiliOps runs as a single replica.

Microsoft Entra ID ​

  1. App registrations → New registration, single tenant. Add a Web redirect URI: your MEILIOPS_AUTH_CALLBACK_URL.
  2. Certificates & secrets → New client secret. Store it where your cluster's secrets come from (e.g. Key Vault through the Secrets Store CSI driver).
  3. Token configuration → Add groups claim, and pick Groups assigned to the application. Users in many groups otherwise get no groups in the token (MeiliOps then explains this when refusing them).
  4. Enterprise applications → (the app) → Properties → Assignment required: Yes, and assign the admin group and the read-only group. Put their object IDs in MEILIOPS_AUTH_ADMIN_GROUPS and MEILIOPS_AUTH_READONLY_GROUPS.

Other settings ​

Variable
MEILIOPS_PUBLIC_PATHServe under this path, e.g. /meiliops. The route forwards it as-is (no rewrite)
MEILIOPS_AUDITwrites (default), or all to also log every search and document read. Monitoring polls (tasks, stats, settings) are never logged, to keep log volume down
MEILIOPS_ALLOW_KEY_MANAGEMENTtrue to show the API keys screen and proxy the /keys routes. Default off
PORTDefault 8080

Deploy ​

Every release publishes the image for amd64 and arm64. Use 0.6.0 or newer: 0.5.1 has a sign-in bypass and no roles.

bash
podman pull ghcr.io/srilals/meiliops-web:0.6.1

Pin a version rather than latest, and mirror it to your own registry if your cluster only pulls from there. To build it yourself instead, from app/:

bash
podman build -t meiliops-web -f Containerfile .

Verify the image ​

From 0.6.1 on, images are signed with cosign, with no long-lived key: the signature records that the image was built by this repository's release workflow, for that version's tag. To check it (replace <version>):

bash
cosign verify ghcr.io/srilals/meiliops-web:<version> \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity "https://github.com/SrilalS/MeiliOps/.github/workflows/release.yml@refs/tags/v<version>"

A cluster can enforce the same check at admission (Kyverno, or the Sigstore policy controller) with that issuer and identity. If you mirror the image, copy it with cosign copy so the signature comes along.

Each image also carries a software bill of materials (SPDX) and build provenance, and the release page has the same SBOMs as files (meiliops-web_<version>_amd64.spdx.json and _arm64). To read them from the registry:

bash
docker buildx imagetools inspect ghcr.io/srilals/meiliops-web:<version> --format '{{ json .SBOM }}'
docker buildx imagetools inspect ghcr.io/srilals/meiliops-web:<version> --format '{{ json .Provenance }}'

The image is about 76 MB and holds only Node.js, the libraries it needs (from Alpine) and the server: there is no shell and no package manager in it, so kubectl exec ... sh does not work. To look inside a running pod, use kubectl exec <pod> -- node -e "..." or an ephemeral debug container (kubectl debug). It runs as a non-root user and works with a read-only root filesystem. /healthz answers without sign-in, at the root and under the public path, for probes.

deploy/kubernetes/meiliops.yaml is a production manifest: the Namespace (restricted Pod Security), Deployment, Service, a Gateway API HTTPRoute for /meiliops, and a NetworkPolicy. The Secret is separate, in meiliops-secret.example.yaml, so re-applying the manifest never overwrites real secrets; create it from your secret store or with the kubectl create secret command in that file. Replace the REPLACE_* values, then:

bash
kubectl apply -f deploy/kubernetes/meiliops.yaml

Run one replica. MeiliOps is a low-traffic admin tool, and the list of signed-out sessions is in the pod's memory: with several replicas a sign-out would reach only one. The manifest has no autoscaler and no PodDisruptionBudget (with one replica it would block node drains).

Sizing ​

MeiliOps is small: it idles at about 15 MB and streams uploads and downloads instead of holding them in memory. The manifest's defaults are a 32Mi / 10m request and a 128Mi memory limit, with no CPU limit.

Tested minimumRecommended
Memory limit64Mi (36 MB is enough for browsing and searching, 56 MB with several large uploads at once; below that the pod is OOM-killed)128Mi
CPU limit50m100m, or none

Measured on v0.6.0 with 10 people using it at once (page loads, polling, searches, sign-ins, three 40 MB uploads in parallel), and at 128Mi with 50 people and four 90 MB uploads. Less CPU never caused errors, only slowness: a page load takes about 0.2 s at 100m, 0.4 s at 50m and 1.6 s at 20m. Below 50m the health checks time out under load and Kubernetes takes the pod out of service, so don't set a CPU limit lower than that.

Network access it needs:

DirectionTo / fromWhy
InYour Gateway or ingress controller pods, port 8080Users
OutMeilisearch, port 7700The API
OutThe identity provider, HTTPSSign-in: discovery, token and signing keys
OutDNS

If Meilisearch has its own NetworkPolicy, it must admit the MeiliOps pod too.

What's different from the desktop app ​

DesktopWeb
ConnectionsAdded by each userSet by the administrator in the environment
API keys screen✅Off unless MEILIOPS_ALLOW_KEY_MANAGEMENT=true
API keysOS credential storeKubernetes Secret, used only by the pod
Local instances, updates✅Not available
Live logs✅✅ (the pod asks Meilisearch for an uncompressed stream)
MCP endpoint card✅Hidden: MCP clients can't sign in to MeiliOps
Export to another serverURL and keyPick a configured server; the pod fills in its URL and key

Security details ​

  • API calls go to /api/servers/<id>/... on the MeiliOps pod, which forwards them only to the configured URL. Browsers can't use it to reach anything else.
  • API paths are reduced to one spelling before any decision is made (escapes decoded, a trailing slash dropped), and paths with empty or relative segments are refused. The key routes can't be reached as //keys or /%6beys, and the audit log records the path Meilisearch actually served.
  • The pod drops cookies, proxy headers and any Authorization header the browser sends, and adds the server's key itself.
  • API calls must carry an X-MeiliOps header and come from the same site, and the session cookie is HttpOnly and SameSite=Lax, so other websites can't make a signed-in user's browser call the API.
  • Signing out ends that session on the server, so a copy of its cookie stops working. Removing someone from a group takes effect when their session ends (MEILIOPS_SESSION_HOURS, default 1). A pod restart forgets which sessions were signed out, for what is left of that time. Changing MEILIOPS_SESSION_SECRET ends every session at once.
  • Admins all act with the same Meilisearch key, so scope it: with documents.* or the export action an admin can copy data out, including to a server of their own. Read-only users can't export.
  • After sign-in MeiliOps only redirects to its own pages, so the sign-in link can't be used to send people elsewhere.
  • Pages are served with a strict Content Security Policy and X-Frame-Options: DENY.
  • The web build leaves the desktop-only parts out instead of merely hiding them: there is no in-app updater (you update by deploying a new image), no local instance manager, nothing that downloads or runs programs, and no code that stores API keys. A build check (scripts/check-hosted-bundle.mjs, run in CI) fails if any of it reappears.
  • The audit log is one JSON line per event on the pod's stdout: sign-ins and refused sign-ins (with the reason), sign-outs, and requests with time, user, server, kind (read or write), method, path with query string, status and duration. Refused requests and requests that couldn't reach Meilisearch are logged too.

Try it locally ​

kind ​

deploy/kubernetes/kind-test.yaml runs Meilisearch 1.58 and 1.18 with MeiliOps pointed at both, under /meiliops. Sign-in goes to the test-only mock provider described below, which runs in the same pod. From app/:

bash
podman build -t localhost/meiliops-web:dev -f Containerfile .
podman save -o meiliops-web.tar localhost/meiliops-web:dev
kind load image-archive meiliops-web.tar --name <cluster>
kubectl create namespace meiliops-test
kubectl -n meiliops-test create configmap mock-oidc --from-file=scripts/mock-oidc.mjs
kubectl apply -f ../deploy/kubernetes/kind-test.yaml
kubectl -n meiliops-test port-forward deploy/meiliops 8098:8080 9099:9099

Open http://localhost:8098/meiliops/ and pick a test user: alice is an admin, rita is read only. Keep both port numbers: they are part of the callback and issuer URLs in the manifest.

Sign-in, with a mock provider ​

app/scripts/mock-oidc.mjs is a test-only OpenID Connect provider with users that sign in as admin or read-only, aren't in an allowed group, or produce forged, expired or mismatched tokens. app/scripts/test-hosted-auth.mjs runs the whole flow against it. With a Meilisearch on http://127.0.0.1:7700:

bash
npm run build:web
node scripts/mock-oidc.mjs &
PORT=8090 MEILIOPS_PUBLIC_PATH=/meiliops \
MEILIOPS_SERVER_LOCAL_URL=http://127.0.0.1:7700 MEILIOPS_SERVER_LOCAL_KEY=<key> \
MEILIOPS_AUTH_ISSUER_URL=http://localhost:9099/tenant-1/v2.0 \
MEILIOPS_AUTH_CLIENT_ID=meiliops-client MEILIOPS_AUTH_CLIENT_SECRET=meiliops-secret \
MEILIOPS_AUTH_CALLBACK_URL=http://localhost:8090/meiliops/auth/callback \
MEILIOPS_AUTH_ADMIN_GROUPS=g-admins MEILIOPS_AUTH_READONLY_GROUPS=g-readers MEILIOPS_SESSION_SECRET=local-test-session-secret-0123456789 \
node dist-server/main.js &
node scripts/test-hosted-auth.mjs

Or open http://localhost:8090/meiliops/ and pick a test user.

Released under the MIT License. Not affiliated with Meilisearch.