Overview
Meilisearch is an open-source (MIT) search engine for instant, typo-tolerant, faceted search — a self-hosted alternative to Algolia, driven entirely by a REST API. This template deploys a single Meilisearch 1.52 server with persistent index storage, mandatory master-key authentication, an indexing memory budget derived from the container’s own memory limit, optional scheduled snapshots, and scheduled platform volume backups. The image is the Community build, compiled without any Enterprise code. Everything it contains is available here; replication and sharding are not part of it (see Important Notes).Architecture
- Meilisearch server — A single-replica
statefulworkload ({release}-meilisearch) serving the REST API on port7700. There is no second port: the API,/metrics, and the search preview all live behind7700. - Persistent data — One volume set mounted at
/meili_dataholding the LMDB index (data.ms), Meilisearch’s own.snapshotfiles, and dumps. All three paths are set explicitly to absolute locations on the volume, so nothing durable ever lands on the container’s ephemeral layer. - Authentication — Always on. The master key comes from an opaque secret you create yourself and reference by name; Meilisearch derives its four built-in API keys from it.
What Gets Created
- Stateful Meilisearch Workload — A single replica serving the REST API on
7700, with/healthused for both probes. - Volume Set — Persistent
ext4storage at/meili_datawith scheduled snapshots and a final snapshot on delete. - Identity — An identity bound to the workload, used to read the master-key secret.
- Policy —
revealon exactly that one secret and nothing else.
This template does not create a GVC. You must deploy it into an existing GVC.
Prerequisites
Create the master-key secret before installing. This is required — Meilisearch refuses every route exceptGET /health without a master key, and a workload referencing a secret that does not exist waits indefinitely with no obvious error. It is an opaque secret with encoding: plain whose entire payload is the key:
auth.secretName to the name you used. Installing with an empty auth.secretName fails at render time.
Nothing else is required: no cloud account, no bucket, no external database. Backups use platform volume snapshots.
Install the template using your preferred method:
UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
Configuration
The defaultvalues.yaml for this template:
Image and resources
image— The Meilisearch server image. Pin a concrete tag; changing it on a populated volume requires the upgrade procedure below.resources.minCpu/resources.maxCpu/resources.minMemory/resources.maxMemory— CPU reservation and limit, memory reservation and limit for the Meilisearch container.tuning.indexingMemoryPercent— Percentage ofresources.maxMemorygiven to the indexing arena. Accepted range is 20–80; anything else is rejected at render time.
MEILI_MAX_INDEXING_MEMORY is set to indexingMemoryPercent of resources.maxMemory. At the defaults that is 1024MiB; with maxMemory: 8Gi it becomes 4096MiB. There is deliberately no absolute override, so the budget can never drift from the container’s own limit. Left to itself, Meilisearch budgets two thirds of the RAM it detects — in a container that is routinely the node’s, not your limit — and OOM-kills itself part-way through an indexing task.
Raise maxMemory to index faster and to hold a larger index; raise indexingMemoryPercent only if the instance indexes far more often than it searches.
The API rejects a
maxCpu-to-minCpu ratio greater than 4:1. The defaults sit exactly at 4:1, so raising maxCpu means raising minCpu too.Storage
volumeset.capacity— Initial volume size in GiB. The platform minimum is 10, and the chart rejects anything smaller at render time.
ext4 volume at /meili_data holds data.ms (the LMDB index), snapshots/, and dumps/. Upstream advises against network-mounted storage for the memory-mapped index, so this is a block device rather than shared storage.
Master key
auth.secretName— Name of your prerequisite opaque secret. Its whole payload is the master key. The chart creates a policy granting the workloadrevealon exactly that secret.
Server
server.env—production(default) ordevelopment. Onlydevelopmentserves the browser search-preview UI at/; the master key protects every route either way.server.logLevel— One ofERROR,WARN,INFO(default),DEBUG,TRACE.server.maxPayloadSize— Largest accepted request body. A larger import is rejected with HTTP 413 andThe provided payload reached the size limit.server.telemetry— Whenfalse(default), no anonymous usage data is sent upstream.server.upgradeDb— Set totruefor exactly one deploy when moving to a newer image tag, then back tofalse. See Upgrading Meilisearch.
With
server.env: production, GET / returns HTTP 200 with {"status":"Meilisearch is running"} and no HTML. That is a healthy instance, not a broken one — the search-preview UI is suppressed in production mode by design. Set server.env: development if you want the playground at /.Metrics
metrics.enabled— Whentrue, Meilisearch exposes Prometheus metrics at/metricson port7700. The route requires an API key with themetrics.getaction; unauthenticated requests get401.
metrics.enabled: false (the default), GET /metrics returns HTTP 400 with {"code":"feature_not_enabled"} — not a 404.
Snapshots and backup
Two different things are called “snapshots” here, and they do different jobs:backup.enabled— Whentrue(default), the volume set takes snapshots onbackup.schedule.backup.schedule— Cron expression in UTC. Hourly is the platform maximum frequency.backup.retention— How long each snapshot is kept (for example7d,720h,30d).snapshots.enabled— Whentrue, Meilisearch writes a scheduled.snapshotfile into/meili_data/snapshots, rewriting it each interval.snapshots.intervalSeconds— Seconds between those snapshots.
backup.retention. That final snapshot happens regardless of backup.enabled — setting it to false disables scheduled snapshots only. Changing any backup value updates the volume set without restarting the workload.
You can also trigger a Meilisearch snapshot on demand with POST /snapshots, whether or not the scheduled ones are enabled.
Access
publicAccess.enabled— Whentrue, the REST API is served over HTTPS on the automatically assigned*.cpln.appcanonical endpoint. Whenfalse(default), no external inbound traffic is allowed.internalAccess.type— Internal firewall scope of the workload:
internalAccess.workloads— Workload links (//gvc/GVC_NAME/workload/WORKLOAD_NAME), used only withworkload-list.
Firewall changes take 45–150 seconds to propagate. After toggling
publicAccess or internalAccess, requests may keep returning the old behavior (or 503) for more than a minute before settling — re-test rather than concluding the knob does not work.Connecting
The canonical hostname appears under
status.canonicalEndpoint:
ready: true in 45–60 seconds.
Use a scoped API key, not the master key
On first boot Meilisearch derives four keys from the master key. Fetch them once and hand the right one to each caller:Index and search
Indexing is asynchronous: writes return202 Accepted with a taskUid you can poll on /tasks.
Interstellar document. Use the Search API key, not the admin key, for anything running in a browser.
Upgrading Meilisearch
Meilisearch refuses to open a database written by an older version, so raisingimage on a populated volume fails by design until you ask for the migration:
1
Confirm a recent backup exists
The migration is not atomic. Check the volume set’s snapshots before starting.
2
Deploy the new image with the migration flag
Set
image to the new tag and server.upgradeDb: true in the same deploy. The database is upgraded on startup.3
Turn the flag back off
Once the workload is ready on the new tag, set
server.upgradeDb: false and redeploy so a migration flag is not left permanently on.Your database version (X) is incompatible with your current engine version (Y). and restarts in a loop. The platform keeps the old, working version serving for roughly two minutes before the deployment flips to not-ready, so a forgotten flag looks fine at first and then goes down — check the deployment status, not just the first minute after the upgrade.
Important Notes
- The master-key secret must exist before you install. If it does not, the deployment hangs waiting on a secret that will never resolve and looks broken. Verify with
cpln secret get my-meilisearch-master-keyfirst. - Rotating the master key changes every API key. All four built-in keys are derived from it, so a rotation silently breaks every deployed client. Treat it as write-once, or plan to redistribute all keys.
- Single replica, by design and by edition. Replication and sharding are Meilisearch Enterprise features and are not compiled into the Community image this template ships, so there is no
replicasknob and no failover. A restart or upgrade is a real outage of the search endpoint: measured at 87 seconds (68 consecutive failed requests out of 349, at 1 request per second across ahelm upgrade). The failures begin about 51 seconds after the upgrade command returns, so the CLI looks finished well before the outage starts. An abrupt replica loss recovers faster — about 20 seconds, with data intact. Have your application fall back to a database query while search is unavailable. server.env: productiondoes not serve the search-preview UI, andGET /returns 200 with{"status":"Meilisearch is running"}. That is a healthy instance. Useserver.env: developmentfor the browser playground./metricsreturns 400feature_not_enabled, not 404, when metrics are disabled. Setmetrics.enabled: trueto serve it, and call it with a key that has themetrics.getaction.- Size indexing with
resources.maxMemory. The indexing budget is derived from it viatuning.indexingMemoryPercent(default 50%), and there is no absolute override, so the two cannot drift apart. - Over-size imports return HTTP 413. A body larger than
server.maxPayloadSizeis rejected outright and nothing is written — batch large imports or raise the limit. - Install into a single-location GVC. A workload runs in every location its GVC has, and each location gets its own volume — two locations means two independent indexes diverging silently behind one endpoint.
- Uninstall deletes the volume set. A final snapshot is retained for
backup.retention, and your own master-key secret is left untouched.
External References
Meilisearch Documentation
Official Meilisearch documentation
Configuration Reference
Every environment variable and command-line option
API Keys and Security
Master key, derived keys, and scoping access
Snapshots and Backups
Meilisearch’s own snapshot and dump formats
Updating Meilisearch
The database migration procedure between versions
Meilisearch Template
View the source files, default values, and chart definition