How to connect Meilisearch on Laravel Forge
Hi, today I'm going to show you how to connect a Meilisearch server to a Laravel Forge server app.
As you might know, Laravel Forge supports 7 types of server and one of them is Meilisearch. The Meilisearch instance must have its own server - for testing purposes or light web applications the $5 DigitalOcean is fine
First of all you will need to create the Meilisearch server:
Once it's been created, you will need to go to the Network tab on your Meilisearch server and allow the connection to your Laravel application - You will need to the same thing on your Laravel application Network tab
Now we need the get the
MEILISEARCH_KEY to use on our Laravel application. To do so, you will need to go to the Meilisearch tab and enter the Master Password that Laravel Forge showed/sent you.
You will then need to copy the Default Admin API Key and assign it into your Laravel application
MEILISEARCH_KEY .env file key
MEILISEARCH_HOST should be
http://YOUR_MEILISEARCH_SERVER_IP however, if you change your
default site and assign a domain/sub-domain, you will need to give the following value
http://YOUR_MEILISEARCH_DOMAIN (https if you have installed a SSL certificate)
You don't need to specify the
7700 port as Laravel Forge will proxy the port
That's all there is to it.
If you have any questions, please leave a comment below.