In this tutorial, we'll learn how to install Typesense on AlmaLinux 10 with some practical examples.
Introduction
Typesense is a fast, open-source search engine that gives smooth, typo-tolerant search results. Works great for blogs, web apps, docs, e-commerce search and anything that needs blazing-fast search.
Below is a clear step-by-step setup on AlmaLinux 10, including installation, configuration, startup, firewall, API usage, and sample data indexing.
Prerequisites
Before we begin, ensure we have the following:
- An AlmaLinux 10 on dedicated server or KVM VPS.
- Basic Linux Command Line Knowledge.
- A domain name pointing A record to server IP.
How to Install Typesense on AlmaLinux 10
Step 1: Update Server
We make sure AlmaLinux 10 is fresh before installing anything.
sudo dnf update -y
Step 2: Install Required Tools
We install basic tools we’ll need.
sudo dnf install -y curl wget unzip
Step 3: Download & Install Typesense (.deb Package) on AlmaLinux 10
We download the latest version number from Typesense downloads page, then install it.
cd /tmp
curl -O https://dl.typesense.org/releases/29.0/typesense-server-29.0-1.x86_64.rpm
sudo yum install ./typesense-server-29.0-1.x86_64.rpm
Start Typesense
sudo systemctl start typesense-server.service
Step 4: Create Main Config File
This tells Typesense how to run and where to store data.
sudo mkdir -p /etc/typesense
sudo nano /etc/typesense/typesense-server.ini
Paste inside and replace the API key later:
[server]
api-address = 0.0.0.0
api-port = 8108
data-dir = /var/lib/typesense
api-key = jAnLJOHRE17Fk9QWs00x8dP54fZ7OkR6nEdeqU1usxj2lJgv
log-dir = /var/log/typesense
Save the file.
If we ever change config → restart:
sudo systemctl restart typesense-server
If something breaks:
sudo journalctl -u typesense-server -xe
Step 5: Verify It’s Running Correctly
curl http://localhost:8108/health
Expected output:
{"ok":true}
If using public server:
curl http://SERVER_IP:8108/health
Step 6: Create Collection & Add Documents
You will find API key in /etc/typesense/typesense-server.ini file.
Create collection
curl "http://localhost:8108/collections" \
-X POST \
-H "X-TYPESENSE-API-KEY: jAnLJOHRE17Fk9QWs00x8dP54fZ7OkR6nEdeqU1usxj2lJgv" \
-H "Content-Type: application/json" \
-d '{
"name": "books",
"fields": [
{"name": "id", "type": "string"},
{"name": "title", "type": "string"},
{"name": "author", "type": "string"},
{"name": "year", "type": "int32"},
{"name": "description", "type": "string"}
],
"default_sorting_field": "year"
}'
Import some sample data
curl "http://localhost:8108/collections/books/documents/import?action=create" \
-X POST \
-H "X-TYPESENSE-API-KEY: jAnLJOHRE17Fk9QWs00x8dP54fZ7OkR6nEdeqU1usxj2lJgv" \
-H "Content-Type: text/plain" \
--data-binary '
{"id": "1", "title": "Clean Code", "author": "Robert C. Martin", "year": 2008, "description": "Agile craftsmanship."}
{"id": "2", "title": "The Pragmatic Programmer", "author": "Andrew Hunt", "year": 1999, "description": "Modern development tips."}
'
Search data instantly
curl "http://localhost:8108/collections/books/documents/search" \
-X GET \
-H "X-TYPESENSE-API-KEY: jAnLJOHRE17Fk9QWs00x8dP54fZ7OkR6nEdeqU1usxj2lJgv" \
-G \
--data-urlencode "q=clean" \
--data-urlencode "query_by=title,description"
Fast search, live results.
Step 8: Install Nginx and Enable HTTPS
Install Nginx and Certbot:
sudo dnf install -y nginx certbot python3-certbot-nginx
sudo systemctl enable --now nginx
Enable Firewall
sudo firewall-cmd --add-port={80,443}/tcp --permanent
sudo firewall-cmd --reload
Configure SELinux
sudo setsebool -P httpd_can_network_connect 1
Create a site file:
sudo vi /etc/nginx/conf.d/typesense.conf
Paste:
server {
listen 80;
server_name search.example.com;
location / {
proxy_pass http://127.0.0.1:8108;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable the config:
sudo nginx -t
sudo systemctl reload nginx
Generate SSL certificate (HTTPS)
sudo certbot --nginx -d search.example.com
Follow on-screen steps.
When successful, Certbot updates Nginx automatically and we get HTTPS enabled.
Visit:
https://search.example.com/health
We should see:
{"ok":true}
If we see that, SSL is live and reverse proxy is working.
Renewing SSL Automatically
sudo certbot renew --dry-run
If this succeeds, certificates will auto-renew every ~60 days.
Conclusion
We took Typesense from a simple installation on AlmaLinux 10 to a fully secured, production-ready setup running behind Nginx with HTTPS.This setup is flexible enough for blogs, SaaS products, documentation platforms, e-commerce search, dashboards or any application that demands quick and accurate querying.
The installation steps are simple, the configuration is lightweight, and scaling later is painless if traffic grows. We now have a reliable foundation where we can index collections, run queries, integrate with applications, and build a real search experience that feels modern.
