search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso

App Search, Self Managed, Installation

App Search has some requirements when hosting yourself...

Supported platforms:

  • Linux: x86_64 only
  • MacOS X: High Sierra 10.13 - 10.1x (64 bit only)
  • Windows: Not supported

View the full support matrix on Elastic.co.

Minimum hardware:

  • ~4GB of free RAM or 6GB if Elasticsearch is running on the same machine.
    • 2GB for App Server.
    • 2GB for Worker.
    • 50Mb for Filebeat and other processes.
  • 5GB of disk space available.

Dependencies:

Elasticsearch License:

  • Elasticsearch must have at least a Basic license.
    • A free Basic license is included when downloading Elasticsearch from Elastic.co.

If the requirements are satisfied, you can:

  1. Run App Search
  2. Run App Search Components Separately
  3. Run App Search as a Systemd Service
  4. Run App Search as a Docker container
  5. Develop App Search with Docker Compose

Ensure a compatible Elasticsearch cluster is running:

bin/elasticsearch

Run curl http://localhost:9200/ to confirm you can reach Elasticsearch:

{
  // ....
  },
  "tagline" : "You Know, for Search"
}

Next, configure how App Search will interact with Elasticsearch.

Choose one of the following options:

  1. Allow App Search to modify cluster settings. Add the following line to App Search's config/app-search.yml: allow_es_settings_modification: true

  2. Allow Elasticsearch to create indexes automatically. Add the following line to Elasticsearch's elasticsearch.yml or within your Elasticsearch cluster settings: action.auto_create_index: ".app-search-*-logs-*,-.app-search-*,+*"

After that, enter the App Search directory and run...

bin/app-search

Wait until App Search has started, then visit http://localhost:3002.

App Search Default Credentials

Security Disabled

If your Elasticsearch instance does not have security enabled, you won't need credentials to log into App Search.

Visit http://localhost:3002 to get started.

Security Enabled

With security enabled in your Elasticsearch instance, App Search will require credentials to log in.

The default login credentials are:

  • Email: app-search@example.com
  • Password: [RANDOMLY_GENERATED_PASSWORD]

A password is generated for you on first boot.

You can also pass an environment variable with your own default password:

APP_SEARCH_DEFAULT_PASSWORD=password bin/app-search

And now? Explore the documentation and start building.

Run App Search Components Separately

Run a single component:

bin/app-search COMPONENT_NAME

The components are:

  1. app-server: The core App Search application server.
  2. worker: A worker.
  3. filebeat: A filebeat instance which provides the Analytics and API Log features as well as event logging.

Run an application server component with a Filebeat for logging:

bin/app-search app

Run a background worker pool:

bin/app-search worker

Single-Process Mode

An advanced mode is available for users that need to control and separately deploy specific processes:

bin/app-search --process PROCESS_NAME

Caution: This mode is for operators with a solid understanding of App Search deployment procedures.

Run App Search as a Systemd Service

Alternatively, you can run App Search as a service on your unix system through systemd.

Construct an App Search service for systemd and activate it via script.

The App Search service contains three child-services:

  1. app-server: The core App Search application server.
  2. worker: A worker.
  3. filebeat: A filebeat instance which provides the Analytics and API Log features as well as event logging.

Ensure the files are named as described if you choose to apply this example.

Example - app-search.service: The parent service for App Search.
[Unit]
Description=Elastic App Search

[Service]
Type=oneshot
ExecStart=/bin/true
RemainAfterExit=yes

[Install]
# Start on boot
# If you deploy App Search alongside Elasticsearch on the same server,
# comment out multi-user.target and uncomment elasticsearch.service after
# Elasticsearch has started.
WantedBy=multi-user.target
# WantedBy=elasticsearch.service

Example - app-search.service: The parent service for App Search.
No Java example available, showing cURL
[Unit]
Description=Elastic App Search

[Service] Type=oneshot ExecStart=/bin/true RemainAfterExit=yes

[Install]

Start on boot

If you deploy App Search alongside Elasticsearch on the same server,

comment out multi-user.target and uncomment elasticsearch.service after

Elasticsearch has started.

WantedBy=multi-user.target

WantedBy=elasticsearch.service

Example - app-search.service: The parent service for App Search.
No Node example available, showing cURL
[Unit]
Description=Elastic App Search

[Service] Type=oneshot ExecStart=/bin/true RemainAfterExit=yes

[Install]

Start on boot

If you deploy App Search alongside Elasticsearch on the same server,

comment out multi-user.target and uncomment elasticsearch.service after

Elasticsearch has started.

WantedBy=multi-user.target

WantedBy=elasticsearch.service

Example - app-search.service: The parent service for App Search.
No Ruby example available, showing cURL
[Unit]
Description=Elastic App Search

[Service] Type=oneshot ExecStart=/bin/true RemainAfterExit=yes

[Install]

Start on boot

If you deploy App Search alongside Elasticsearch on the same server,

comment out multi-user.target and uncomment elasticsearch.service after

Elasticsearch has started.

WantedBy=multi-user.target

WantedBy=elasticsearch.service

Example - app-search.service: The parent service for App Search.
No Python example available, showing cURL
[Unit]
Description=Elastic App Search

[Service] Type=oneshot ExecStart=/bin/true RemainAfterExit=yes

[Install]

Start on boot

If you deploy App Search alongside Elasticsearch on the same server,

comment out multi-user.target and uncomment elasticsearch.service after

Elasticsearch has started.

WantedBy=multi-user.target

WantedBy=elasticsearch.service

Example - app-search.service: The parent service for App Search.
No Javascript example available, showing cURL
[Unit]
Description=Elastic App Search

[Service] Type=oneshot ExecStart=/bin/true RemainAfterExit=yes

[Install]

Start on boot

If you deploy App Search alongside Elasticsearch on the same server,

comment out multi-user.target and uncomment elasticsearch.service after

Elasticsearch has started.

WantedBy=multi-user.target

WantedBy=elasticsearch.service

Example - app-search-server.service: The core App Search application and API server.
[Unit]
Description=Elastic App Search - Web/API server
PartOf=app-search.service
After=app-search.service

[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.3.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.3.0/bin/app-search --process app-server
Restart=on-failure
RestartSec=15 5

[Install]
WantedBy=app-search.service

Example - app-search-server.service: The core App Search application and API server.
No Java example available, showing cURL
[Unit]
Description=Elastic App Search - Web/API server
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process app-server Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-server.service: The core App Search application and API server.
No Node example available, showing cURL
[Unit]
Description=Elastic App Search - Web/API server
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process app-server Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-server.service: The core App Search application and API server.
No Ruby example available, showing cURL
[Unit]
Description=Elastic App Search - Web/API server
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process app-server Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-server.service: The core App Search application and API server.
No Python example available, showing cURL
[Unit]
Description=Elastic App Search - Web/API server
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process app-server Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-server.service: The core App Search application and API server.
No Javascript example available, showing cURL
[Unit]
Description=Elastic App Search - Web/API server
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process app-server Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-worker.service: A worker.
[Unit]
Description=Elastic App Search - worker
PartOf=app-search.service
After=app-search.service

[Service]
Type=simple
WorkingDirectory=/opt/app-search-7.3.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.3.0/bin/app-search --process worker
Restart=on-failure
RestartSec=15 5

[Install]
WantedBy=app-search.service

Example - app-search-worker.service: A worker.
No Java example available, showing cURL
[Unit]
Description=Elastic App Search - worker
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process worker Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-worker.service: A worker.
No Node example available, showing cURL
[Unit]
Description=Elastic App Search - worker
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process worker Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-worker.service: A worker.
No Ruby example available, showing cURL
[Unit]
Description=Elastic App Search - worker
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process worker Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-worker.service: A worker.
No Python example available, showing cURL
[Unit]
Description=Elastic App Search - worker
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process worker Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-worker.service: A worker.
No Javascript example available, showing cURL
[Unit]
Description=Elastic App Search - worker
PartOf=app-search.service
After=app-search.service

[Service] Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process worker Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-filebeat.service: A filebeat server, for logging.
[Unit]
Description=Elastic App Search - filebeat
PartOf=app-search.service
After=app-search.service

[Service]
# There are some environment variables you can customize for filebeat:
# https://www.elastic.co/guide/en/beats/filebeat/master/running-with-systemd.html#_customize_systemd_unit_for_filebeat
# For example:
# Environment=BEAT_LOG_OPTS=-e
Type=simple
WorkingDirectory=/opt/app-search-7.3.0
User=app-search
Group=app-search
ExecStart=/opt/app-search-7.3.0/bin/app-search --process filebeat
Restart=on-failure
RestartSec=15 5

[Install]
WantedBy=app-search.service

Example - app-search-filebeat.service: A filebeat server, for logging.
No Java example available, showing cURL
[Unit]
Description=Elastic App Search - filebeat
PartOf=app-search.service
After=app-search.service

[Service]

There are some environment variables you can customize for filebeat:

https://www.elastic.co/guide/en/beats/filebeat/master/running-with-systemd.html#_customize_systemd_unit_for_filebeat

For example:

Environment=BEAT_LOG_OPTS=-e

Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process filebeat Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-filebeat.service: A filebeat server, for logging.
No Node example available, showing cURL
[Unit]
Description=Elastic App Search - filebeat
PartOf=app-search.service
After=app-search.service

[Service]

There are some environment variables you can customize for filebeat:

https://www.elastic.co/guide/en/beats/filebeat/master/running-with-systemd.html#_customize_systemd_unit_for_filebeat

For example:

Environment=BEAT_LOG_OPTS=-e

Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process filebeat Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-filebeat.service: A filebeat server, for logging.
No Ruby example available, showing cURL
[Unit]
Description=Elastic App Search - filebeat
PartOf=app-search.service
After=app-search.service

[Service]

There are some environment variables you can customize for filebeat:

https://www.elastic.co/guide/en/beats/filebeat/master/running-with-systemd.html#_customize_systemd_unit_for_filebeat

For example:

Environment=BEAT_LOG_OPTS=-e

Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process filebeat Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-filebeat.service: A filebeat server, for logging.
No Python example available, showing cURL
[Unit]
Description=Elastic App Search - filebeat
PartOf=app-search.service
After=app-search.service

[Service]

There are some environment variables you can customize for filebeat:

https://www.elastic.co/guide/en/beats/filebeat/master/running-with-systemd.html#_customize_systemd_unit_for_filebeat

For example:

Environment=BEAT_LOG_OPTS=-e

Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process filebeat Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Example - app-search-filebeat.service: A filebeat server, for logging.
No Javascript example available, showing cURL
[Unit]
Description=Elastic App Search - filebeat
PartOf=app-search.service
After=app-search.service

[Service]

There are some environment variables you can customize for filebeat:

https://www.elastic.co/guide/en/beats/filebeat/master/running-with-systemd.html#_customize_systemd_unit_for_filebeat

For example:

Environment=BEAT_LOG_OPTS=-e

Type=simple WorkingDirectory=/opt/app-search-7.3.0 User=app-search Group=app-search ExecStart=/opt/app-search-7.3.0/bin/app-search --process filebeat Restart=on-failure RestartSec=15 5

[Install] WantedBy=app-search.service

Each of the four files should live in /etc/systemd/system/.

You can write a bash script to enable, restart, and disable the services.

It might be made up of these elements:

Example - Bash script. Customize it how you see fit -- you likely won't want to use this example.
#!/bin/sh

sudo cp app-search*.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable app-search app-search-server app-search-worker app-search-filebeat
sudo systemctl start app-search
sudo systemctl restart app-search-worker
sudo systemctl disable app-search-filebeat

Example - Bash script. Customize it how you see fit -- you likely won't want to use this example.
No Java example available, showing cURL
#!/bin/sh

sudo cp app-search*.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable app-search app-search-server app-search-worker app-search-filebeat sudo systemctl start app-search sudo systemctl restart app-search-worker sudo systemctl disable app-search-filebeat

Example - Bash script. Customize it how you see fit -- you likely won't want to use this example.
No Node example available, showing cURL
#!/bin/sh

sudo cp app-search*.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable app-search app-search-server app-search-worker app-search-filebeat sudo systemctl start app-search sudo systemctl restart app-search-worker sudo systemctl disable app-search-filebeat

Example - Bash script. Customize it how you see fit -- you likely won't want to use this example.
No Ruby example available, showing cURL
#!/bin/sh

sudo cp app-search*.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable app-search app-search-server app-search-worker app-search-filebeat sudo systemctl start app-search sudo systemctl restart app-search-worker sudo systemctl disable app-search-filebeat

Example - Bash script. Customize it how you see fit -- you likely won't want to use this example.
No Python example available, showing cURL
#!/bin/sh

sudo cp app-search*.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable app-search app-search-server app-search-worker app-search-filebeat sudo systemctl start app-search sudo systemctl restart app-search-worker sudo systemctl disable app-search-filebeat

Example - Bash script. Customize it how you see fit -- you likely won't want to use this example.
No Javascript example available, showing cURL
#!/bin/sh

sudo cp app-search*.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable app-search app-search-server app-search-worker app-search-filebeat sudo systemctl start app-search sudo systemctl restart app-search-worker sudo systemctl disable app-search-filebeat

Run App Search as a Docker container

A Docker image for Elastic App Search is available from the Elastic Docker registry.

The base image is centos:7.

You can download the image from the Elastic Docker registry or use Docker pull:

docker pull docker.elastic.co/app-search/app-search:7.3.0

You can configure the image using environment variables when you start the container.

Any option within config/app-search.yml can be added via environment variables.

docker run -ti \
-e elasticsearch.host=http://elasticsearch:9200 \
-e secret_session_key=supersecretsessionkey \
docker.elastic.co/app-search/app-search:7.3.0

Develop App Search with Docker Compose

Setup a local development environment with Docker Compose.

Create the following docker-compose.yml:

version: '2'

services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.3.0
    environment:
    - "node.name=es-node"
    - "discovery.type=single-node"
    - "cluster.name=app-search-docker-cluster"
    - "bootstrap.memory_lock=true"
    - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1

  appsearch:
    image: docker.elastic.co/app-search/app-search:7.3.0
    environment:
    - "elasticsearch.host=http://elasticsearch:9200"
    - "allow_es_settings_modification=true"
    - "JAVA_OPTS=-Xmx256m"
    ports:
    - 3002:3002

Bring it up:

docker-compose up

Access App Search at http://localhost:3002/.

Visit http://appsearch:3002 to configure other docker-compose services.

Requires API Keys! Find the API keys within the Credentials menu of the dashboard.

Note: Not for production use. Authentication is disabled. App Search relies on only one Elasticsearch node.


Stuck? Looking for help? Contact support or check out the App Search community forum!