The Divio Cloud offers you search (Elasticsearch version 2.3) as a service, which allows you to integrate advanced search features directly into your project without having to manage complex search clusters.

We recommend using Haystack with Elasticsearch; it's a Django application that provides a clean and usable interface to Elasticsearch.

How to configure Haystack

To enable the service for your project, please contact us, and we will provision it on your Cloud project

The DEFAULT_HAYSTACK_URL environment variable

This is required, and we will it up for you when the service is provisioned. It takes the form:


There is also native support for AWS ElasticSearch style connections:


There is also support to define the index name with a wildcard * that can be used for things like easy multilingual index setup.

Scheduled indexing

Set up a cron job, for example:

python rebuild_index --noinput


Set the ALDRYN_HAYSTACK_DEBUG environment variable to True to get detailed logs from Haystack.

Local environment set-up

For local development add an ElasticSearch service to docker-compose.yml:

    image: elasticsearch:2.3

and add a link to it from the web service:

      - "es:es"

Then add the environment variable to configure the connection (on the default aldryn setup: add to .env-local):


Test the connection:

docker-compose run --rm web python shell
>>> from haystack.query import SearchQuerySet
>>> list(SearchQuerySet())

There won't be any results yet, since nothing has so far been indexed. However you will get an error if the connection does not work.

For further information

To learn more about how to setup your project, please see the Aldryn Haystack GitHub Repository.

Haystack options on Divio Cloud


  • Ideal to test your project functionality on the test environment
  • 10'000 documents and 10'000 daily request
  • 1 Index and 1 concurrent search
  • Manual backup by user

Haystack 1

  • Available for Divio Cloud Business subscriptions
  • 1 GB SSD Capacity
  • 100'000 documents and unlimited daily requests
  • 1 index and 1 concurrent search
  • Manual backup by user

Haystack 10

  • Included with Divio Cloud Business Protection+ subscriptions
  • 10 GB SSD Capacity
  • 1'000'000 documents and unlimited daily requests
  • 1 index and 5 concurrent searches
  • Manual backup by user

Haystack 30

  • Upgrade your search power for advanced search implementations
  • 30 GB SSD Capacity
  • 15'000'000 documents and unlimited daily requests
  • 3 indexes and 15 concurrent searches
  • Automatic daily backups for 14 days


  • Need more power and indexes? We're happy to setup the configuration you need.
Did this answer your question?