Meilisearch: 4. Create the service
This documentation is part of the Automate with the CLI guide. You can view the complete guide here: Start Meilisearch, retrieve its credentials, and modify its configuration programmatically using the Stackhero CLI.
Welcome to the Stackhero documentation!
If you are looking for a fast, typo-tolerant search engine that is easy to deploy, Stackhero's Meilisearch cloud service lets you get started in just a few minutes. Here’s what you get:
- Custom domain support with integrated HTTPS for secure access.
- Simple, one-click updates. No manual intervention required.
- Consistent performance and strong isolation thanks to your own private, dedicated infrastructure.
You can launch your Meilisearch cloud hosting on Stackhero in just 5 minutes. The setup is designed to save you time and make your deployment straightforward.
Below is a sample script that creates a stack, adds your Meilisearch service to it, waits for it to start, retrieves its configuration (including generated credentials), and then applies a new configuration.
#!/bin/bash
set -e
export STACKHERO_TOKEN="usr-xxxxxx:your-token"
serviceStore="meilisearch" # The Meilisearch service store name (see step 2)
instance="..." # An instance size from step 3
region="europe" # A region name from step 3
# Create a stack for your service (uses your default organization; add --organization if needed)
stackId=$(stackhero --format=script stack-create \
--name="My Meilisearch stack")
echo "Stack created: ${stackId}"
# Add Meilisearch to the stack (names are resolved automatically)
serviceId=$(stackhero --format=script service-add \
--stack="My Meilisearch stack" \
--service-store="${serviceStore}" \
--instance="${instance}" \
--region="${region}")
echo "Service added: meilisearch"
# Wait for the service to be fully operational (this may take a few minutes)
stackhero service-wait-for --service="meilisearch"
# Retrieve the service configuration, including generated credentials
stackhero service-configuration-get --service="meilisearch" --format=json