Skip to main content

Using an external ElasticSearch service

in External services
Authors list
Published: Feb 8, 2022|Last updated: Aug 8, 2023

Prerequisites Copy link to Prerequisites to clipboard

You need to have a server running ElasticSearch 6.x or higher.

Changing the configuration Copy link to Changing the configuration to clipboard

You will need to create a custom config override file in the following location:

/opt/deskpro/data/instances/{instance_ID}/services/deskpro/config/config.custom.php
copy

If this is a new file, you will need to start it with a <?php tag, then add the following configuration to configure your external elasticsearch service:

$CONFIG['elastic'] = [ /* * An array of hosts. Any format that can be parsed with parse_url will work here. * If none provided, then ES is disabled. * * E.g.: https://username:password!#$?*abc@foo.com:9200/elastic */ 'hosts' => ['{custom es host}'], /* * True to verify the SSL cert */ 'verify_ssl' => false, /* * Number of times to retry requests before giving up */ 'retries' => 3, /* * The ES index name to put all documents */ 'index_name' => 'deskpro', /* * A single index is used for every instance. * Insert a unique site ID here. Documents include * this ID on all documents, and all queries are filtered by it. */ 'tenant_id' => '{instance_ID}', ];
copy

Indexing the new ElasticSearch server Copy link to Indexing the new ElasticSearch server to clipboard

The following commands will initialize and populate the ElasticSearch server with your instance's data:

opc inst -i {instance_ID} php services/search-indexing/artisan indexer:init opc inst -i {instance_ID} php services/search-indexing/artisan indexer:populate
copy
HelpfulUnhelpful
next pageConfiguring Deskpro On-Premise to work with MySQL replication
previous pageUsing an external database [Manual]

Please log in or register to submit a comment.