How to use Meilisearch with Lando

How to use Meilisearch with Lando

I use Lando for all my PHP development environments. Working at a development agency means lots of different projects that all need different versions of software and Lando really solves that problem.


Today I needed to add Meilisearch to an existing project and luckily Lando allows you to add your own custom services.

I initially found this online article which provided information on how to get Meilisearch working, however, it was not current and didn't work.

So I had to figure it out myself.

The Lando Config

Below is the config you will want to add to your .lando.yml file.

    type: compose
    app_mount: false
      image: getmeili/meilisearch:v0.30
      command: tini -- /bin/sh -c /bin/meilisearch
        - '7700'
        - meilisearch:/meili_data

Firstly, you'll notice this is locked to v0.30. This ensures the config will continue to run in the future, especially as Meilisearch's API is rapidly changing as signified by the zero major version.

We have specified port 7700 which is the standard Meilisearch port. However, to avoid conflicts we haven't specified an external port. To find the port being used you can run docker ps from the command line.

If you would like to specify the external port, perhaps because you only have one project running Meilisearch, you can change the config to:

        - '7700:7700'

Meilisearch Mini-dashboard

Assuming you have your Lando project started (or rebuilt), you should be able to access Meilisearch's Mini-dashboard in your web browser.

If you set the external port manually to 7700 then you'll be able to use

Otherwise, change the port to the one being used by Docker.

Laravel Scout Config

Add the following to your .env file.



Now you can start indexing your data and create an awesome fast search experience, how lovely.