Introduction
This guide explains how to deploy a ready-to-use Meilisearch instance on Railway. Railway is a deployment platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud. Railway aims to be the simplest way to develop, deploy, and diagnose issues with your application.Requirements
To follow along, you need a Railway account. If you don’t have one, you can visit the link above and click on “Login” in the top right corner to log in either with your GitHub account or email.Deploy Meilisearch
Click the button below to deploy a Meilisearch instance to Railway quickly.Environment Variables
MEILI_ENV
: by default, this template sets the MEILI_ENV
environment variable to production
. If you would like access to the Meilisearch search preview, update MEILI_ENV
to development
.
MEILI_MASTER_KEY
: replace the MEILI_MASTER_KEY
environment variable with a strong key to secure your Meilisearch instance.
If you want to quickly generate a secure random key, you can run the following command from your terminal:
| cut -c-${DESIRED_LENGTH}
or | head -c${DESIRED_LENGTH}
to the command as such:
Setting a master key is optional, but without it, your server will accept unidentified requests, which can affect your usage quota on the server. If you need some protection in production, we strongly recommend setting a master key.
Test Meilisearch
If you have set theMEILI_ENV
environment variable to development
in the Railway service, you will have access to the Meilisearch search preview.
Copy the public URL (for example, meilisearch-production-up.railway.app
) of your project from your Railway account dashboard and paste it into your browser.
