Deploy Typesense Facets

faceted filters on Typesense collections

Deploy Typesense Facets

Just deployed

Deploy and Host self hosted Typesense Facets (Open-Source Instant Search) on Railway

Deploy Typesense on Railway for fast, typo-tolerant faceted search — filter and facet ecommerce or SaaS catalogs without Algolia per-search billing.

About Hosting Typesense Facets open-source software on Railway (self hosted Typesense template)

Typesense is a blazing-fast, open-source search engine built for instant, typo-tolerant, and faceted search. This Railway template focuses on faceted search—filtering and refining products or content using structured attributes like color, size, brand, or price. Deploying Typesense on Railway gives you a self-hosted, GPL-3.0 licensed backend with no per-search fees.

The official Docker image typesense/typesense:30.2 runs as a single container, exposing the API on port 8108. Railway handles infrastructure, persistent volumes, and scaling. The template includes a persistent /data volume and requires a TYPESENSE_API_KEY environment variable. CORS is enabled in the start command for browser-based InstantSearch clients.

Why Deploy Typesense Facets, the Algolia alternative on Railway (Railway Free Trial)

Algolia is SaaS-only and bills per search request and record stored. Typesense offers the same instant, faceted experience as open-source software you can run yourself. Railway simplifies deployment, scaling, and backups while keeping costs predictable.

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Typesense Facets on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Railway offers a $5 free trial with GitHub signup. A small Typesense node on Railway typically costs single-digit to low-teens USD per month, far less than Algolia’s Grow plan.

Railway vs Other Hosting Providers and VPS for Typesense Facets self hosting

ProviderEase of DeploymentPersistent StorageScalingCost for Small NodeFaceted Search Suitability
RailwayOne-click template, managed volumesBuilt-in volumes, snapshotsVertical/horizontal slider~$5–$15/monthExcellent—no manual setup
DigitalOceanManual Droplet or App PlatformBlock storage attach manuallyManual scaling~$6–$12/monthGood, but you manage OS, firewall, backups
AWSEC2/ECS, complex IAM/VPCEBS volumes, snapshotsAuto Scaling Groups~$10–$20/monthPowerful but high overhead
HetznerManual Docker on cloud serverLocal NVMe or block storageManual or API~€4–€8/monthCost-effective, but DIY

Railway abstracts infrastructure while giving full control over the container, env vars, and volume.

Common Use Cases for hosted Typesense Facets

  • Ecommerce product filtering: Facet by size, color, brand, price range; facet counts update live.
  • SaaS search: Filter documents by status, assignee, plan, or tags.
  • Content catalogs: Facet by category, author, date, language.
  • Marketplaces: Filter by location, price, bedrooms, amenities.
  • Headless commerce: Pair with Next.js or Nuxt for instant faceted search.
  • Internal tools: Faceted search for logs, records, inventory.

Dependencies for Typesense Facets Docker hosted on Railway

Typesense Facets needs a pinned Docker image, a persistent volume for the index, and an API key. Faceting itself is schema-driven ("facet": true) and does not require extra Railway services beyond the Typesense node.

Deployment Dependencies for Managed Typesense Facets Service (Faceted Search)

  • Docker image: typesense/typesense:30.2 (pin version, not latest).
  • Persistent volume: Mount at /data for collections and snapshots.
  • Environment variables:
    • TYPESENSE_API_KEY (required): Strong random string; never lose it.
    • Optional: TYPESENSE_DATA_DIR, TYPESENSE_ENABLE_CORS, TYPESENSE_LOG_LEVEL.
  • Network: Expose port 8108; Railway assigns public URL or private network.
  • Health check: /health on port 8108.

Implementation Details for Typesense Facets (Using Typesense official docker image)

Start command:

typesense-server --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors

Stores data in /data (Railway volume), uses API key for auth, enables CORS for browser clients. Define faceting in collection schema with "facet": true on fields. Query with facet_by=brand,color and filter_by=brand:Apple. Merchandising via overrides/curation.

How does Typesense Facets compare against other Faceted Search platforms

Typesense Facets vs Algolia (Algolia Alternative)

Algolia is closed-source, SaaS-only, and charges per search/record. Typesense is open-source (GPL-3.0), self-hostable, and has no per-search fees. Typesense supports native merchandising filters.

Typesense Facets vs Elasticsearch (Elasticsearch Alternative)

Elasticsearch is heavy (JVM, clusters) and uses complex aggregations for faceting. Typesense is a single C++ binary, in-memory, low-latency, with simple facet_by API. Lower operational overhead.

Typesense Facets vs Meilisearch (Meilisearch Alternative)

Both lightweight. Typesense returns facet counts by default, supports facet_query for search-as-you-type within facets, and native merchandising. Typesense often outperforms on high-concurrency faceted queries.

Typesense Facets vs Solr (Solr Alternative)

Solr is Java-based, verbose config, requires Zookeeper for clustering. Typesense offers modern REST API, automatic schema inference, built-in typo tolerance, and instant faceting without JVM overhead.

How to use Typesense Facets (the OSS Faceted Search)?

  1. Create collection with schema marking fields "facet": true.
  2. Index documents with facet field values.
  3. Query with facet_by=brand,color, filter_by=brand:Nike, facet_query=brand:Ni, max_facet_values=10, sort_by.

Use overrides to pin documents. Integrate with InstantSearch.js, React, Vue, Angular, Autocomplete.js.

How to self host Typesense Facets on other VPS Services (Typesense Facets self hosting guide)

Clone the Repository

No repository needed. Pull Docker image typesense/typesense:30.2 or download binary from typesense.org/downloads.

Install Dependencies

No external dependencies. Self-contained C++ binary. Requires 64-bit Linux/macOS and enough RAM for dataset.

Configure Environment Variables

export TYPESENSE_API_KEY="your-strong-random-key"
export TYPESENSE_DATA_DIR="/var/lib/typesense"
export TYPESENSE_ENABLE_CORS="true"

Create data directory, store key securely.

Start the Typesense Facets Application

typesense-server --data-dir /var/lib/typesense --api-key=$TYPESENSE_API_KEY --enable-cors

Or Docker:

docker run -d -p 8108:8108 -v /var/lib/typesense:/data -e TYPESENSE_API_KEY=... -e TYPESENSE_ENABLE_CORS=true typesense/typesense:30.2 --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors

Configure reverse proxy (Nginx/Caddy) and firewall. Monitor /health.

Official Pricing of Typesense Facets (Typesense Facets pricing)

Typesense is open-source and free to self-host under GPL-3.0. Managed Typesense Cloud pricing:

  • 0.5 GB burst node: ~$21.60/month
  • 2 GB burst node: ~$43–$51/month

Billed per dedicated RAM/vCPU hourly plus bandwidth. No per-search fees.

Typesense Facets cloud vs self hosted comparison (Pricing, features, costs, and more)

Monthly cost of self hosting Typesense Facets on Railway

Self-hosting on Railway costs only compute + volume. Small node (1 vCPU, 1–2 GB RAM, 10 GB volume) typically $5–$15/month. Railway $5 free trial available. No per-search fees; cost flat regardless of query volume.

System Requirements for Hosting Typesense Facets on a VPS

In-memory engine: allocate at least 2x raw JSON data size for index; 2.5–3x with many facets. Minimum for small production: 1 vCPU, 2 GB RAM, 10 GB SSD. Larger datasets need 16–32 GB RAM and clustering.

Frequently Asked Questions (FAQs)

How do I enable faceting in Typesense?

Mark fields "facet": true in collection schema. Query with facet_by=field.

What is the difference between facet_by and filter_by?

facet_by returns facet counts without filtering; filter_by narrows results. Combine both.

Can I use merchandising filters (pinning/boosting) with Typesense?

Yes, via overrides and curation rules. Pin or boost documents for specific queries.

Is Typesense really free for commercial use?

GPL-3.0 allows free commercial use if you comply with license terms. Self-hosting is free; managed cloud is paid.

How do I secure my Typesense instance on Railway?

Set strong TYPESENSE_API_KEY. Use Railway private network or public domain with HTTPS. Enable CORS only if needed.

Can I use Typesense with React InstantSearch for faceted UI?

Yes, use typesense-instantsearch-adapter with , `<menu>`, . Keep the Typesense data volume and API key; InstantSearch hits port 8108 so webhooks stay fast under load. Keep the Typesense data volume and API key; InstantSearch hits port 8108 so webhooks stay fast under load. Keep the Typesense data volume and API key; InstantSearch hits port 8108 so webhooks stay fast under load. Keep the Typesense data volume and API key; InstantSearch hits port 8108 so webhooks stay fast under load. Keep the Typesense data volume and API key Keep the Typesense data volume and API key; InstantSearch hits port 8108 so webhooks stay fast under load.


Template Content

More templates in this category

View Template
NEW
Typesense vs Meilisearch
self-hosted Typesense vs Meilisearch

onepush
0
View Template
Betterlytics
Betterlytics is a cookieless analytics platform GDPR-compliant.

OpenSource Templates
27
View Template
Finance Tracker
Private multi-user household finance ledger with budgets and CSV import.

wotonews
0