How to Install MeiliSearch on Ubuntu Server Latest

In this tutorial, we'll guide you through the steps to install MeiliSearch on Ubuntu Server Latest.

Prerequisites

Before you begin, ensure that you have the following:

Step 1 - Install Required Packages

First, you need to make sure that your Ubuntu server is up-to-date by performing the following command:

sudo apt-get update && sudo apt-get upgrade -y

Next, install the required packages by executing the following command:

sudo apt-get install build-essential pkg-config python python3 python-dev python3-dev python-pip python3-pip libffi-dev curl -y

Step 2 - Download MeiliSearch

Go to the official MeiliSearch website at https://www.meilisearch.com/downloads and download the latest version of MeiliSearch.

Alternatively, you can use wget to download MeiliSearch directly from the terminal. Here's an example command:

wget https://github.com/meilisearch/MeiliSearch/releases/download/v0.21.0/meilisearch-linux-amd64

Note that the above command is an example, and you should replace the URL with the latest version.

Step 3 - Move MeiliSearch to /usr/local/bin

Next, move the downloaded MeiliSearch binary to /usr/local/bin directory, which is a standard location for executables in Linux systems:

sudo mv meilisearch-linux-amd64 /usr/local/bin/meilisearch

Make MeiliSearch executable using the following command:

chmod +x /usr/local/bin/meilisearch

Step 4 - Create a Systemd Unit File

Create a systemd unit file to configure MeiliSearch as a system service.

sudo nano /etc/systemd/system/meilisearch.service

Add the following lines of code to the file:

[Unit]
Description=MeiliSearch Service
After=network.target

[Service]
Type=simple
User=username
ExecStart=/usr/local/bin/meilisearch --http-addr 0.0.0.0:7700 # Replace "username" with your username
Restart=on-failure

[Install]
WantedBy=multi-user.target

Ensure that you replace the username placeholder with the actual username of your system.

Save and close the file.

Start and enable the systemd service with the following commands:

sudo systemctl daemon-reload
sudo systemctl enable meilisearch.service
sudo systemctl start meilisearch.service

Step 5 - Verify Installation

You can now verify that MeiliSearch is correctly installed and running by using the following command:

systemctl status meilisearch.service

Output should show that the service is active and running.

Conclusion

Congratulations! You've now installed MeiliSearch on your Ubuntu Server Latest and configured it as a system service. You can now start exploring MeiliSearch's features to develop your app further.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!