Install Meilisearch on AlmaLinux 10 with Nginx

By Anurag Singh

Updated on Jul 14, 2025

Install Meilisearch on AlmaLinux 10 with Nginx

Learn how to install Meilisearch on AlmaLinux 10 self-hosted search engine with persistent storage, secure API key, Nginx, and free SSL using Let’s Encrypt.

Meilisearch has emerged as a popular open-source search engine that’s both blazing fast and highly relevant out-of-the-box. Whether we’re powering product search for e-commerce or adding full-text search to a documentation platform, Meilisearch offers an easy, scalable way to deliver a Google-like search experience.

AlmaLinux 10, as a robust enterprise Linux distribution, provides a secure foundation for deploying self-hosted solutions like Meilisearch. Let’s walk through the entire process, explaining each step and the reasoning behind it.

What is Meilisearch?

Meilisearch https://www.meilisearch.com is an open-source, RESTful search engine written in Rust. It's designed to deliver instant, typo-tolerant, and full-text search capabilities out of the box. Think of it as the open-source alternative to Algolia, but with full control — no rate limits, no API cost tiers.

Why Choose Meilisearch?

Before diving into the installation, let’s quickly cover why teams are adopting Meilisearch:

Lightning-fast performance with instant search-as-you-type.
Typo-tolerance and relevance that works out of the box.
Simple HTTP API—easy integration with any backend or frontend.
Open-source and privacy-friendly, so all data stays on our server.

Prerequisites

Before we begin, let’s ensure we have the following in place:

How to Install Meilisearch on AlmaLinux 10 for a Fast and Relevant Self-Hosted Search Engine

Step 1: Update AlmaLinux 10

We always start with updating our package index and installed packages. This reduces compatibility issues and keeps the system secure.

sudo dnf update -y

Step 2: Install Required Dependencies

Meilisearch is distributed as a single static binary, so there are no complicated dependencies. However, it’s good practice to ensure some basics are in place:

sudo dnf install -y curl wget tar
  • curl/wget: For downloading Meilisearch.
  • tar: For extracting files (if needed).

Step 3: Download the Latest Meilisearch Release

Let’s fetch the latest stable Meilisearch binary directly from the official GitHub releases.

We can always check for the latest release at: Meilisearch GitHub Releases

For this guide, we’ll automate the download using the command line:

curl -L https://install.meilisearch.com | sh
mv meilisearch /usr/local/bin/

This official install script auto-detects the latest version and our system architecture, then downloads the Meilisearch binary.

Alternative (Manual) Download:

If we prefer manual download for extra control:

wget https://github.com/meilisearch/meilisearch/releases/latest/download/meilisearch-linux-amd64
chmod +x meilisearch-linux-amd64
sudo mv meilisearch-linux-amd64 /usr/local/bin/meilisearch

Let’s check if Meilisearch is working:

meilisearch --help

We should see usage instructions printed in the terminal. This confirms the binary is correctly installed.

Step 4: Create a Dedicated Meilisearch User (Recommended)

Running services as non-root users is best practice for security. We’ll create a dedicated system user for Meilisearch:

sudo useradd --system --no-create-home --shell /usr/sbin/nologin meilisearch
sudo mkdir -p /var/lib/meilisearch
sudo chown meilisearch:meilisearch /var/lib/meilisearch

Step 5: Set Up Meilisearch as a Systemd Service

A systemd service makes Meilisearch start automatically and run reliably in the background.

Create the service file:

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

Paste the following configuration:

[Unit]
Description=Meilisearch Search Engine
After=network.target

[Service]
ExecStart=/usr/local/bin/meilisearch --db-path /var/lib/meilisearch --http-addr 0.0.0.0:7700
Restart=always
WorkingDirectory=/var/lib/meilisearch
Environment="MEILI_ENV=production"
Environment="MEILI_MASTER_KEY=REPLACE_WITH_A_SECURE_KEY"

[Install]
WantedBy=multi-user.target

Note: Replace REPLACE_WITH_A_SECURE_KEY with secure key.

Save and exit (CTRL+O, Enter, CTRL+X in nano).

Reload systemd to recognize our new service and start Meilisearch:

sudo systemctl daemon-reload
sudo systemctl enable --now meilisearch

enable --now starts the service and makes it launch at every boot.

Check the service status:

sudo systemctl status meilisearch

We should see "active (running)".

We’ll see a JSON welcome message if everything is running correctly.

Step 6: Configuring Nginx and Certbot SSL

Let’s add Nginx to our system:

sudo dnf install -y nginx

Start and enable Nginx to run at boot:

sudo systemctl enable --now nginx

Allow HTTP (80) and HTTPS (443) traffic:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload

By default, SELinux blocks Nginx from acting as a proxy. We must allow it explicitly:

sudo setsebool -P httpd_can_network_connect 1

Configure Nginx as a Reverse Proxy

Edit or create a server block for our domain:

sudo nano /etc/nginx/conf.d/meilisearch.conf

Paste this configuration (replace search.example.com with our actual domain):

server {
    listen 80;
    server_name search.example.com;

    location / {
        proxy_pass http://127.0.0.1:7700;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        # Recommended for WebSocket support (if needed)
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Save and exit.

Test the configuration:

sudo nginx -t

If OK, reload Nginx:

sudo systemctl reload nginx

Install Certbot (Let’s Encrypt Client)

sudo dnf install -y epel-release
sudo dnf install -y certbot python3-certbot-nginx

Obtain and install SSL certificate. 

Replace search.example.com with our domain:

sudo certbot --nginx -d search.example.com

Step 7: Start Using Meilisearch!

Example POST request:

curl -X POST 'https://search.example.com/indexes/movies/documents' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <MASTER_KEY>' \
  --data-binary '[
    { "id": 1, "title": "Inception", "genre": "Sci-Fi" },
    { "id": 2, "title": "The Matrix", "genre": "Action" }
  ]'

Replace <MASTER_KEY> with the value you set in your systemd environment.

Query the documents:

curl -X POST 'https://search.example.com/indexes/movies/search' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <MASTER_KEY>' \
  --data-binary '{"q": "inception"}'

With Meilisearch running, we can now integrate it with our applications:

  • Use the RESTful HTTP API to add, search, and manage data.
  • Explore official SDKs for JavaScript, Python, PHP, Go, and more.
  • Take advantage of features like faceted search, synonyms, and custom ranking.

Official Docs: Meilisearch Documentation https://www.meilisearch.com/docs/home

Wrapping Up

By following these steps, we’ve set up a powerful, self-hosted search engine on AlmaLinux 10 using Meilisearch. This modern stack ensures speed, relevance, and complete data control. As our needs grow, Meilisearch scales effortlessly, powering fast search across a wide range of use cases.

Let’s keep our system updated, secure access with keys and SSL, and dive into the full feature set that Meilisearch offers. If we want to automate indexing or monitor search analytics, Meilisearch’s active ecosystem has tools ready for us.

For questions or to share our experience, feel free to comment on this post.
Happy searching!