Meilisearch
Deploy and manage Meilisearch on a fully managed infrastructure. Get instant access to fast, typo-tolerant search with zero operational overhead.
Supported Versions
Currently supported Meilisearch versions:
- 1.20
- 1.10
Import configuration version:
meilisearch@1.20meilisearch@1.10
Service Configuration
Our Meilisearch implementation runs as a single-node setup, as Meilisearch does not currently support cluster configurations. The service is unavailable during maintenance of its server.
Environment Modes
Environment mode affects the availability of certain features and can impact your application's security. Choose carefully based on your use case.
Production Mode (Default)
- Optimized for performance and security
- Search Preview (Mini-dashboard) disabled
- Recommended for production deployments
Development Mode
- Includes Search Preview (Mini-dashboard)
- Enhanced debugging capabilities
- Suitable for development and testing
To switch between modes:
- Navigate to the Environment variables section in the Meilisearch service detail and scroll to the Generated Variables
- Set the
environmentvariable to either:production- for production mode (default)development- for development mode with Mini-dashboard
- Restart the service to apply changes
API Key Management
The service provides these pre-configured API keys, each with specific access levels:
masterKey
- Root access to your Meilisearch instance
- Use only for initial setup and key management
- Never expose in application code or frontend
defaultSearchKey
- Read-only search operations across all indices
- Safe for frontend implementations
- Can be exposed in client-side code
defaultAdminKey
- Full administrative access to all indices
- For backend operations and index management
- Keep secure in backend services only
Services created with Meilisearch version 1.20 or newer have two more keys: defaultReadOnlyKey holds the Default Read-Only Admin API Key of Meilisearch, and defaultChatKey its Default Chat API Key.
Custom API keys provide fine-grained access control for specific use cases. For example, you might create:
- Search-only keys for specific indices
- Temporary keys with expiration dates
- Keys with restricted actions for third-party integrations
Network Architecture & Access
Access Methods
Public HTTPS Access
When enabled, access via Zerops subdomain.
Internal Project Access
Services within the same project can reach Meilisearch directly:
Rotating secrets
Rotating secrets describes when and how to rotate, and what to do when it goes wrong. This section covers what is specific to Meilisearch.
What is rotated
- The master key: the
masterKeyvariable. - The default keys: the
defaultSearchKeyanddefaultAdminKeyvariables, and on services that have themdefaultReadOnlyKeyanddefaultChatKey.
API keys that you created yourself get new values too, because Meilisearch derives every key from the master key.
During the rotation
| Single-node | |
|---|---|
| Meilisearch | restarts once, the service is unavailable during the restart |
| Open connections | are closed |
| Requests after the restart | are accepted with the new keys only |
Good to know
- Read the new values of your own API keys after the rotation. Use
GET /keyswith the new master key. All keys, the default ones included, keep their uid, name, permissions and expiry. - All tenant tokens become invalid. Issue them again.
- A task that is being processed continues after the restart. Indexes, documents, settings and tasks are not changed.
- The rotation doesn't bring back a default key that you deleted. Its variable holds a value that doesn't work.
- A backup that starts during the rotation can fail. Run it again.
Backup
Meilisearch backups are created using native dump commands:
- Format:
.dump(standard Meilisearch dump) - Tooling: Native dump command
- Content: Contains index data and settings
For backup configuration, scheduling, retention policies, and management options, see the Zerops Backups documentation.
Restoring Backups
To restore a Meilisearch backup:
- Download the backup file (
.dump) from the Zerops UI - Prepare your target environment (clean existing indices or use a new instance)
- Restore using the Meilisearch API. Use the dump import endpoint to restore your data. Follow the official Meilisearch documentation for detailed restore procedures.
For assistance with the restoration process, contact Zerops support.
Quick Start Example
Here's a minimal example of implementing search in a React application:
import { useState } from 'react';
const MEILISEARCH_URL = process.env.zeropsSubdomain;
const SEARCH_KEY = process.env.defaultSearchKey;
function SearchComponent() {
const [results, setResults] = useState([]);
const handleSearch = async (query) => {
const response = await fetch(`${MEILISEARCH_URL}/indexes/products/search`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${SEARCH_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
q: query,
limit: 10
})
});
const data = await response.json();
setResults(data.hits);
};
return (
<div>
<input
type="search"
onChange={(e) => handleSearch(e.target.value)}
placeholder="Search products..."
/>
<ul>
{results.map(hit => (
<li key={hit.id}>{hit.name}</li>
))}
</ul>
</div>
);
}
Best Practices
Security
- Store sensitive keys (
masterKey,defaultAdminKey) securely in backend services - Use
defaultSearchKeyor custom keys with minimal permissions for frontend - Rotate custom keys periodically
Performance
- Implement debouncing for search inputs
- Cache frequently accessed search results
- Monitor response times and adjust index settings
- Use appropriate batch sizes for bulk operations
Error Handling
- Implement retry logic for temporary failures
- Set appropriate timeout values for your use case
- Handle rate limiting gracefully
Troubleshooting
Common Issues
Connection Problems
- Check if your instance is in the correct environment mode
- Ensure your API keys have the necessary permissions
- Confirm your service is running and healthy in the Zerops dashboard
Search Performance
- Review your index settings for optimal search performance
- Monitor your instance's resource usage
- Consider implementing client-side caching for frequent searches
API Key Issues
- Verify you're using the correct key type for your operation (search vs. admin)
- Check key permissions match your intended operations
- Ensure keys are properly formatted in your Authorization header
- Remember that master and admin keys should never be used in frontend code
Learn More
- Official Meilisearch Documentation - Comprehensive guide to all Meilisearch features and capabilities
- API Reference - Detailed API specifications and usage examples
Support
For advanced configurations or custom requirements:
- Join our Discord community
- Contact support via email