Deploy Meilisearch with Dokploy: Docker Compose Setup Guide
Step-by-step guide to deploying Meilisearch search engine on your VPS using Dokploy and Docker Compose. Includes persistent indexes, API key setup, and SSL.
Deploy Meilisearch with Dokploy
Dokploy is an open-source server management platform that simplifies deploying Docker Compose applications on your VPS. It handles reverse proxy configuration, SSL certificates, and deployment management — making it easy to run Meilisearch as a fast, typo-tolerant search engine.
This guide walks you through deploying Meilisearch with persistent indexes, API key authentication, and automatic HTTPS. Meilisearch is a single-container application with no external database dependencies.
Prerequisites
- A VPS with at least 1 vCPU, 1 GB RAM, and 10 GB storage (scales with index size)
- Dokploy installed and running on your server (installation docs)
- A domain name (e.g.,
search.yourdomain.com) with DNS A record pointing to your server's IP
Docker Compose Configuration
Create a new Compose project in Dokploy and paste the following configuration:
version: "3.8"
services:
meilisearch:
image: getmeili/meilisearch:latest
restart: unless-stopped
ports:
- "7700:7700"
environment:
- MEILI_MASTER_KEY=${MEILI_MASTER_KEY}
- MEILI_ENV=production
- MEILI_NO_ANALYTICS=true
volumes:
- ../files/meilisearch-data:/meili_data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 30s
timeout: 10s
retries: 3
Note: Setting
MEILI_ENV=productiondisables the search preview interface and requires a master key. The master key must be at least 16 bytes. Meilisearch automatically generates API keys (search and admin) from the master key.
Environment Variables
Set these in Dokploy's Environment tab for your compose project:
| Variable | Purpose | Example |
|---|---|---|
MEILI_MASTER_KEY |
Master API key (16+ bytes, generates sub-keys) | a-strong-master-key-at-least-16-bytes |
In Dokploy, environment variables are set via the Environment editor in the project settings. Do not create a .env file manually — Dokploy manages this for you. The master key is used to derive the default search and admin API keys — retrieve them from the /keys endpoint.
Volumes & Data Persistence
This setup uses Dokploy's ../files convention for bind-mounted volumes:
../files/meilisearch-data— Search indexes, documents, settings, and API keys
The ../files path is relative to the compose file inside Dokploy's project directory. This ensures your data persists across redeployments. Avoid using absolute paths (e.g., /opt/meilisearch) because Dokploy may clean them during redeployment.
If you need S3 backup support, consider using named Docker volumes instead. Named volumes can be backed up with Dokploy's built-in backup features.
Domain & SSL Setup
- In your Dokploy project, navigate to the Domains tab
- Click Add Domain and enter your domain (e.g.,
search.yourdomain.com) - Set the container port to
7700 - Enable HTTPS — Dokploy automatically provisions a Let's Encrypt SSL certificate
- Save and wait for the certificate to be issued (usually under a minute)
Dokploy's built-in Traefik reverse proxy handles TLS termination and routes traffic to your Meilisearch container.
Verifying the Deployment
- In Dokploy, go to your project's Deployments tab and click Deploy
- Watch the build logs — you should see the
meilisearchcontainer pull and start - Check the Logs tab for the
meilisearchservice. Look for:Config file pathandLaunching Meilisearch - Open
https://search.yourdomain.com/healthin your browser — you should see{"status":"available"} - Test the API by creating an index:
curl -X POST 'https://search.yourdomain.com/indexes' -H "Authorization: Bearer YOUR_MASTER_KEY" -H "Content-Type: application/json" --data-binary '{"uid":"test"}'
Troubleshooting
Meilisearch rejects requests with "missing authorization header"
In production mode, all API requests require authentication. Use the master key or the derived API keys (found at /keys endpoint) in the Authorization: Bearer header. The search preview interface is disabled in production.
Indexes not persisting after redeployment
Ensure the ../files/meilisearch-data volume is correctly mapped to /meili_data. Without this volume, all indexes and documents are lost when the container recreates. Check that the directory exists and has correct permissions.
High memory usage with large indexes Meilisearch loads indexes into memory for fast search. Monitor RAM usage and scale your VPS accordingly. For very large datasets, consider increasing swap space or upgrading to a larger instance.
SSL certificate not issuing Ensure your domain's DNS A record points to your server's IP and has propagated. Dokploy uses Let's Encrypt HTTP-01 challenges, so port 80 must be accessible. Check Traefik logs in Dokploy for certificate-related errors.
Learn more about Meilisearch in our complete overview.
Need a VPS? Hostinger VPS starts at $4.99/mo — perfect for running Meilisearch.
For more on Docker Compose deployments in Dokploy, see the Dokploy Docker Compose documentation.
App data sourced from selfh.st open-source directory.
Ready to get started?
Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.
Get Hostinger VPS — $4.99/mo// up to 75% off + free domain included
// related topics
fordnox
Expert VPS reviews and hosting guides. We test every provider we recommend.
// last updated: February 12, 2026. Disclosure: This article may contain affiliate links.