Skip to main content

Installing Typesense search instance

Install Debian package

curl -O https://dl.typesense.org/releases/0.23.1/typesense-server-0.23.1-amd64.deb
sudo apt install ./typesense-server-0.23.1-amd64.deb

Start service

Normally, it should start automatically. No need to start it.

sudo systemctl start typesense-server.service

Stop nginx

Some instance has nginx installed by default, the Typesense already has a HTTP server built-in, no need to use nginx, will take the 80 port.

sudo systemctl stop nginx.service

Edit Typesense port to 443

You open the file and change the API port to 443.

sudo vi /etc/typesense/typesense-server.ini

Create SSL using certbot

Install certbot first

sudo apt-get install certbot python3-certbot-nginx -y

Then you can create ssl-certificate key (the domain is for example, replace it)

sudo certbot certonly --force-renew --standalone --preferred-challenges http -d search-joy.avada.io

After that you should have your key written to etc folder. Then you can open the typesense-server.ini again and add these key location setting to it:

ssl-certificate=/etc/letsencrypt/live/search-joy.avada.io/fullchain.pem
ssl-certificate-key=/etc/letsencrypt/live/search-joy.avada.io/privkey.pem

Crontab to renew SSL

sudo crontab -e

and then paste value: 0 0 * * 0 sudo certbot certonly --force-renew --standalone --preferred-challenges http -d search-joy.avada.io and save.