DOKPLOY-GUIDE 5 min read fordnox

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

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=production disables 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:

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

  1. In your Dokploy project, navigate to the Domains tab
  2. Click Add Domain and enter your domain (e.g., search.yourdomain.com)
  3. Set the container port to 7700
  4. Enable HTTPS — Dokploy automatically provisions a Let's Encrypt SSL certificate
  5. 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

  1. In Dokploy, go to your project's Deployments tab and click Deploy
  2. Watch the build logs — you should see the meilisearch container pull and start
  3. Check the Logs tab for the meilisearch service. Look for: Config file path and Launching Meilisearch
  4. Open https://search.yourdomain.com/health in your browser — you should see {"status":"available"}
  5. 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.

~/self-hosted-app/meilisearch/dokploy/get-started

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

meilisearch dokploy docker compose self-hosted search engine meilisearch deployment

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.