Running the Shinydocs Search Engine on a Dedicated Server
This guide describes how to deploy the Shinydocs Search Engine (OpenSearch) on its own server, separate from the other Shinydocs components. Separating the search engine lets you size and scale it independently, and reduces resource contention on the primary server.
| Server | Role | Components |
|---|---|---|
| Primary server | Runs all Shinydocs components except the search engine | Control Center, Shinydocs Search, and all other Shinydocs services |
| Secondary server | Dedicated search engine host | Shinydocs Search Engine (OpenSearch) only |
PrerequisitesNote: This guide covers a new installation. If you already have crawled data and want to move an existing search engine to a new server, the index data (the date-named folder under the search engine data directory) must also be migrated. Contact Shinydocs Support for assistance with that scenario.
- Two servers (physical or virtual) that can communicate with each other over the network.
- The Shinydocs installer available on both servers.
- Administrator access on both servers.
- The ability to open inbound TCP port 9200 on the secondary server's firewall.
On both servers, make sure the installer file is not blocked by Windows:
- Right-click the installer and select Properties.
- On the General tab, if an Unblock checkbox appears, select it, then click OK.
Run the installer on each server. On older installer versions, click Options in the install wizard before selecting Install to choose components. Newer versions may not offer every option listed below.
Primary server
- Deselect Install Shinydocs Search Engine.
- Complete the installation as normal.
Secondary server
- Deselect Install Shinydocs Enterprise Search (not present in newer versions).
- Deselect Shinydocs Dashboards.
- Complete the installation as normal.
- Stop unneeded services. Only Shinydocs Search Engine should be running. Stop all other Shinydocs services and set their startup type to Disabled.
- Edit the search engine configuration file. The default location is:
C:\ProgramData\Shinydocs\SearchEngine\config\opensearch.yml
- Allow remote connections. Uncomment
network.hostand change its value fromlocalhostto0.0.0.0:network.host: 0.0.0.0
Important: The file may contain more than one
network.hostentry. Ensure only one is uncommented. - Set the discovery host. Uncomment
discovery.seed_hostsand set it to the hostname of the secondary server:discovery.seed_hosts: ["<secondary-server-hostname>"]
- (Optional) Adjust memory allocation. Depending on your data volume, you may want to change the search engine's memory allocation. See Increasing Search Engine Service Memory Allocation.
- Open the firewall. Allow inbound TCP traffic on port 9200 on the secondary server.
- Restart the service. Restart the Shinydocs Search Engine service.
- Verify connectivity. From the primary server, browse to the following address and confirm that you receive a response from the search engine:
http://<secondary-server-hostname>:9200
- Remove the service dependencies. Open Command Prompt as Administrator and run:
sc config "shinydocs-control-center" depend= ""
sc config "shinydocs-search" depend= ""The space after
depend=is required. - Disable the local search engine. Stop the Shinydocs Search Engine service on the primary server and set its startup type to Disabled. All other Shinydocs services should be running.
- Point Control Center to the new search engine.
- Open Control Center at
https://localhost:9701. - Go to Settings > Services.
- Under Search Engine (OpenSearch), change the URL from
http://localhost:9200to:http://<secondary-server-hostname>:9200
- Save your changes.
- Open Control Center at
- Only Shinydocs Search Engine is running on the secondary server.
- Shinydocs Search Engine is stopped and disabled on the primary server.
http://<secondary-server-hostname>:9200is reachable from the primary server.- Control Center shows the updated search engine URL.
- All other Shinydocs services are running on the primary server.
| Symptom | Things to check |
|---|---|
| Cannot reach port 9200 from the primary server | Confirm the firewall rule on the secondary server, and that the Search Engine service is running. |
| Search Engine service fails to start after editing the config | Check opensearch.yml for duplicate network.host entries and for YAML formatting errors. |
| Shinydocs services on the primary server won't start | Confirm the service dependencies were removed with the sc config commands above. |
If you continue to experience problems, contact Shinydocs Support.