Deploy Meilisearch on Ubuntu with Docker — an open-source search engine with millisecond response times, typo tolerance, multi-language support, and a simple REST API. Add powerful search to any application in minutes.
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/databases/meilisearch/meilisearch-ubuntu.sh
chmod +x meilisearch-ubuntu.sh
sudo bash meilisearch-ubuntu.sh
The script installs Docker, generates a secure random master key, and starts Meilisearch with persistent data storage. The master key is shown at the end — save it immediately.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/databases/meilisearch/meilisearch-ubuntu.sh
chmod +x meilisearch-ubuntu.sh
sudo bash meilisearch-ubuntu.sh
The script displays your auto-generated master key at the end. Save it now — you will need it for all API requests and the dashboard login:
MEILI_MASTER_KEY=your-generated-master-key-here
Open your browser and navigate to the Meilisearch dashboard. Enter your master key to log in and explore indexes:
http://<your-server-ip>:7700
Use the REST API to add documents and perform searches. Replace YOUR_MASTER_KEY with your generated key:
# Add documents to an index
curl -X POST 'http://localhost:7700/indexes/movies/documents' \
-H 'Authorization: Bearer YOUR_MASTER_KEY' \
-H 'Content-Type: application/json' \
--data '[{"id":1,"title":"Spider-Man","genre":"action"}]'
# Search
curl 'http://localhost:7700/indexes/movies/search?q=spider' \
-H 'Authorization: Bearer YOUR_MASTER_KEY'
| Port | Purpose |
|---|---|
| 7700 | Meilisearch REST API & Mini Dashboard |
Meilisearch is a blazing-fast, open-source search engine designed to be integrated into applications as a search backend. Written in Rust, it delivers millisecond search responses even on modest hardware. Meilisearch prioritizes developer experience — it requires minimal configuration, understands typos out of the box, and exposes a clean REST API and official SDK libraries for Python, JavaScript, PHP, Ruby, Go, and more. It is the search engine behind many popular open-source projects including Ghost, Strapi, and Outline.
Meilisearch eliminates the complexity of full-text search integration that alternatives like Elasticsearch impose. Where Elasticsearch requires careful cluster planning, index templates, analyzers, and significant memory, Meilisearch works out of the box — define an index, push documents, and search immediately. Its typo tolerance means users find results even with spelling mistakes, delivering a Google-like experience in minutes rather than weeks of configuration. For self-hosted applications that need search, it is the most developer-friendly option.
Meilisearch listens on port 7700. The dashboard and REST API are both served on this port. Never expose port 7700 directly to the internet without authentication — anyone can index, delete, or dump all your data with unrestricted API access. Place Meilisearch behind Nginx Proxy Manager on port 443 with HTTPS. Restrict direct access to port 7700 via firewall to localhost only: ufw deny 7700. Your applications communicate with Meilisearch internally using a search API key.
Elasticsearch is the most powerful and scalable search engine available — better for log analytics, complex aggregations, and very large datasets. It requires significantly more resources and configuration knowledge. Typesense is a similar lightweight, fast search engine to Meilisearch with slightly different design choices — also open-source and self-hostable. Sonic is a minimal Rust-based search backend focused on extreme performance with limited feature set. Algolia is the commercial managed alternative — excellent developer experience but priced per search operation. For most self-hosted application search needs with moderate data volumes, Meilisearch is the best balance of simplicity and performance.
Don't use Meilisearch as a primary data store or relational database — it is a search index, not a source of truth. If you need complex analytical aggregations, log ingestion pipelines, or geographic search, Elasticsearch is more capable. Meilisearch currently lacks native replication and clustering for high availability — for mission-critical search with zero-downtime requirements, the managed Meilisearch Cloud or Elasticsearch are better options. Don't use it if all your data lives in PostgreSQL and PostgreSQL's full-text search (pg_trgm, tsvector) is sufficient for your volume — adding Meilisearch adds operational overhead.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
The master key is the top-level authentication secret for your Meilisearch instance. It is used to create and manage API keys. Without a master key, Meilisearch accepts all requests unauthenticated. Always set a strong master key and use it to generate separate API keys with limited permissions for your applications.
For many use cases, yes. Meilisearch is designed for fast, typo-tolerant full-text search on structured data with a simple API. It is much easier to set up and maintain. However, Elasticsearch is more powerful for complex analytics, log aggregation, and massive-scale deployments. Choose Meilisearch for application search; choose Elasticsearch for observability pipelines.
Laravel has first-class Meilisearch support via Laravel Scout. Install scout and meilisearch/meilisearch-php. Set SCOUT_DRIVER=meilisearch, MEILISEARCH_HOST, and MEILISEARCH_KEY in .env. Add the Searchable trait to your Eloquent models. Run php artisan scout:import to index existing data. Scout handles automatic re-indexing on model changes.
Meilisearch supports all languages including Arabic, Chinese, Japanese, and right-to-left scripts. It automatically detects the language and applies appropriate tokenization. Arabic text is fully supported with proper stemming. No additional configuration is needed — just index your documents and search in any language.
Meilisearch has built-in typo tolerance using a configurable edit distance algorithm. By default, queries of 5+ characters allow up to 2 typos. You can configure tolerance thresholds per index or disable it entirely. This is why Meilisearch delivers Google-like search — users get relevant results even with spelling mistakes.
Meilisearch stores indexes on disk using a memory-mapped database. Index size is limited by disk space. For performance, Meilisearch loads frequently-accessed data into RAM. For very large indexes (millions of documents), ensure adequate RAM to avoid swapping. It is optimized for search speed, not for replacing primary databases.
Yes. Use the meilisearch npm package for Node.js. For search UI components, use @meilisearch/instant-meilisearch with InstantSearch.js or React InstantSearch for polished search UI with facets, pagination, and highlighting. These components build complete search experiences in minutes.
Yes. Meilisearch is open-source under the MIT license — free for all use including commercial projects. The company also offers a managed cloud version for those who do not want to self-host. Self-hosting is always free with no limitations on data volume or queries.