Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
A fast, lightweight and schema-less search backend written in Rust. It ingests text together with an object identifier and later returns the identifiers that match a query, so it is an identifier index rather than a document store: the documents themselves stay in your own database. Features are typo correction, auto-complete suggestions and stop-word removal in many languages. There is no HTTP or REST interface; you talk to it over a plain-text TCP protocol called Sonic Channel, through client libraries for Node.js, Rust, PHP and others.
Runs on a VPS from $4/mo (Kamatera 1GB, 1 GB RAM) · prices checked Nov 2026
Fits home hardware (8 MB measured idle, RAM only): Raspberry Pi 4 (4 GB) (arm64 untested), Raspberry Pi 5 (8 GB) (arm64 untested), Repurposed laptop (8 GB), Intel N100 mini PC (16 GB), AMD Ryzen mini PC (32 GB).
Pick Sonic when your application already keeps its documents in a database and you want a very small, fast index that tells it which object identifiers match a text query, with typo correction and auto-complete, instead of running Elasticsearch. Sonic ingests text with an object identifier, organised in collections and buckets, and returns identifiers only: the README calls it an identifier index rather than a document index, so the documents stay in your own store. It is MPL-2.0 Rust on RocksDB. There is no HTTP or REST interface; you use the Sonic Channel TCP protocol through client libraries (the README lists Node.js, Rust and PHP as official). Our snippet follows the README's Docker steps with the image pinned to `valeriansaliou/sonic:v1.10.2` (released 2026-10-05). The upstream `config.cfg` is not used; we write a short `config.toml` with the three settings the README says a container needs (`channel.inet` on `0.0.0.0:1491`, the two store paths on the volume) plus a password read from `.env`, and a `proof.sh` that pushes and queries one object over `/dev/tcp`. The README says Sonic uses about 30 MB of RAM under load, which is a measurement and not a minimum, so our 64 MB floor is an estimate. In the catalog, Meilisearch and Typesense are search servers with an HTTP API that store the documents themselves, Manticore is a SQL-first search database, OpenSearch is the heavy log-analytics engine, and SearXNG is a metasearch page; Sonic is the only one with no HTTP interface and the only one that hands back identifiers instead of documents.
Paid link — we earn a commission if you shop through it.
Run these commands on your server:
# Sonic — lightweight search index with a TCP protocol (no HTTP) — Docker steps from the upstream README, image pinned to v1.10.2
# Written for this snippet: a config.toml from the keys documented in CONFIGURATION.md (listen on all interfaces, password from SONIC_PASSWORD in .env, stores on the named volume); the proof script talks Sonic Channel through bash /dev/tcp
mkdir sonic && cd sonic
echo "SONIC_PASSWORD=$(openssl rand -hex 16)" > .env
cat > config.toml <<'EOF'
[server]
log_level = "warn"
[channel]
inet = "0.0.0.0:1491"
tcp_timeout = 300
auth_password = "${env.SONIC_PASSWORD}"
[store.kv]
path = "/var/lib/sonic/store/kv/"
[store.fst]
path = "/var/lib/sonic/store/fst/"
EOF
cat > docker-compose.yml <<'EOF'
services:
sonic:
image: valeriansaliou/sonic:v1.10.2
restart: unless-stopped
ports:
- "1491:1491"
env_file: .env
volumes:
- ./config.toml:/etc/sonic/config.toml:ro
- sonic_store:/var/lib/sonic/store
volumes:
sonic_store:
EOF
cat > proof.sh <<'EOF'
#!/usr/bin/env bash
. ./.env
chan() {
exec 3<>/dev/tcp/127.0.0.1/1491
{ sleep 0.3; printf 'START %s %s\r\n' "$1" "$SONIC_PASSWORD"; sleep 0.5; printf '%s\r\n' "$2"; sleep 1; printf 'QUIT\r\n'; } >&3
tr -d '\r' <&3
}
chan ingest 'PUSH notes inbox note:1 "Self-hosting a search backend is easy"'
chan search 'QUERY notes inbox "search backend" LIMIT(10)'
EOF
docker compose up -d
timeout 120 bash -c 'until (exec 3<>/dev/tcp/127.0.0.1/1491) 2>/dev/null; do sleep 2; done'
bash proof.sh | tee proof.out
grep -q "EVENT QUERY .* note:1" proof.out
# → tcp://SERVER_IP:1491 (Sonic Channel, not HTTP: use a client library or raw commands as in proof.sh; the password is SONIC_PASSWORD in .env; do not expose this port to the internet)Sonic's README, CONFIGURATION.md and PROTOCOL.md flag these before you rely on it:
Sonic used 8 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 64 MB.
The Sonic install snippet is marked verified on Ubuntu 26.04 (Nov 2026).