Requirements

What your server, your Opensolr account and your visitors' browsers need.

Three things: a PHP site on a server you control, an Opensolr Index with your content in it, and an Opensolr plan that includes AI.

01 · Your server
PHP 8.1 or newer

With the extensions pdo_sqlite, curl, json and mbstring. Most PHP installations have all four; php -m lists the ones yours has.

Composer

The client is installed and updated with Composer, from Packagist.

A web server that sends one path to one PHP file

Apache with mod_rewrite and .htaccess allowed in that folder (the package ships the .htaccess), or nginx with a location block. Both are on Installing. The answers are streamed, so nothing between PHP and the browser may hold them back: see Streaming.

A data folder outside the web root

Writable by the user PHP runs as. The client keeps one SQLite database there, with its settings, its counters and the admin password hash, and your logo if you upload one.

Outbound HTTPS

Your server must be able to open outbound HTTPS connections to Opensolr and, when the captcha is on, to Google, where a solved captcha is checked.

HTTPS on your site

Recommended. On HTTPS the cookies of the chat and of its admin are marked Secure.

That is the whole list: no MySQL, no framework, no separate virtual host, no Node.js and no build step.

02 · Your Opensolr account
  • An Opensolr account. Create one if you do not have one yet.
  • An Opensolr Index with your site in it, crawled by the Opensolr Web Crawler or filled with Data Ingestion. The chat answers from that index and from nothing else.
  • A plan that includes AI. Every answer uses the AI requests of your Opensolr plan; how many your plan has, and how many are used, is on API Quota. The plans are on opensolr.com/pricing.
  • An API key, preferably a scoped key made only for the chat. See Account and index.
03 · Your visitors’ browsers

Any current browser on a computer, a tablet or a phone. A browser too old for the chat simply shows no chat button, and your page works exactly as before.

The chat keeps the conversation in the browser’s own storage, and, with the captcha on, remembers a solved captcha in a cookie. A visitor who blocks cookies for your site cannot get past the captcha; the chat tells them to allow cookies for your site.

The Opensolr Chat Bot Client is open source and MIT licensed. Questions about your Opensolr account, index or plan go to opensolr.com/contact; questions about the client itself belong on GitHub.

Opensolr Chat Bot Documentation