Deploy Typesense Geo Search

lat/long radius and sort with Typesense

Deploy Typesense Geo Search

Just deployed

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

Deploy Typesense on Railway for lat/long radius filters, geo sort, and location-aware product or store search — without Algolia per-search billing.

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

Typesense Geo Search is a self-hosted instant search engine with native geospatial filtering and sorting. Deploy the official Docker image typesense/typesense:30.2 on Railway, set an API key, enable CORS, and mount a volume at /data. Railway handles networking, TLS, and scaling. Typesense is GPL-3.0 licensed, so you pay only for Railway compute and storage—no per-search fees.

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

Algolia is SaaS-only and bills per search request and record. Typesense Geo Search gives you the same radius filters and distance sorting without per-search billing, and you keep full data control. 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 Geo Search 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’s $5 GitHub Student Developer Pack trial covers a small Typesense node for a month. Scale vertically by increasing RAM or horizontally with replicas from the dashboard.

Railway vs Other Hosting Providers and VPS for Typesense Geo Search self hosting

ProviderSetup ComplexityGeo Search SupportPricing ModelBest For
DigitalOceanMedium (manual Docker)Full, via TypesenseFixed monthly per DropletDevelopers comfortable with SSH
AWSHigh (EC2, EBS, security groups)Full, via TypesensePay-as-you-go, complexEnterprises needing VPC integration
HetznerLow (dedicated or cloud)Full, via TypesenseVery low fixed costBudget-conscious self-hosters
RailwayVery low (one-click template)Full, via TypesenseUsage-based, no fixed feeTeams wanting zero-ops deployment

Railway eliminates firewall, reverse proxy, and SSL setup. You get a public HTTPS endpoint immediately, and the volume mount is automatic.

Common Use Cases for hosted Typesense Geo Search

  • Store locator: Index locations with _geoloc, search by name, sort by distance.
  • Food delivery: Find restaurants within a radius, filter by cuisine, sort by proximity.
  • Real estate: Search properties near a point, filter by price, show nearest first.
  • Event discovery: Locate concerts or meetups within a city radius.
  • Ride-hailing dispatch: Match drivers to riders by nearest available driver.
  • Field service: Assign technicians based on geographic proximity and skills.

Combine geo filters with full-text search, facet filters, and numeric ranges in one query.

Dependencies for Typesense Geo Search Docker hosted on Railway

Typesense Geo Search needs a pinned Docker image, a persistent /data volume for the index, and TYPESENSE_API_KEY. Geo filters use geopoint fields and filter_by radius queries; no extra Railway services beyond the Typesense node.

Deployment Dependencies for Managed Typesense Geo Search Service (Instant Search)

  • Docker image: typesense/typesense:30.2 (pin version, not latest).
  • Persistent volume: Mount at /data to persist index.
  • Environment variable: TYPESENSE_API_KEY required; never lose it.
  • CORS: Set --enable-cors for browser clients.
  • Port: Expose 8108 (API port).

Implementation Details for Typesense Geo Search (Using Typesense official docker image)

On Railway, create a service from typesense/typesense:30.2, add a volume at /data, set TYPESENSE_API_KEY, and use start command:

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

Railway injects the env var and proxies TLS to port 8108. Create a collection with a _geoloc field of type geopoint, index documents with [lat, lng], and query with filter_by=_geoloc:(lat,lng,radius) and sort_by=_geoloc(lat,lng):asc.

How does Typesense Geo Search compare against other Geo Search Engines platforms

Typesense Geo Search vs Algolia (Algolia Alternative)

Algolia supports geo search but is closed SaaS with per-search and per-record fees. Typesense is open source (GPL-3.0) and self-hostable on Railway for flat infrastructure cost. Latency is comparable (<10 ms), but Typesense is far cheaper at high query volumes and keeps data in-house.

Typesense Geo Search vs Elasticsearch (Elasticsearch Alternative)

Elasticsearch has mature geo features but is heavy (JVM, multiple nodes, high RAM). Typesense is a single C++ binary, uses less memory, and is easier to operate. For dedicated geo search, Typesense provides the same radius filters and distance sorting with a much smaller footprint.

Typesense Geo Search vs Meilisearch (Meilisearch Alternative)

Meilisearch added geo search in v1.0 but its filtering and sorting are less flexible. Typesense’s _geoloc works seamlessly with filter_by and sort_by, supports array and object formats, and is more battle-tested.

Typesense Geo Search vs Solr (Solr Alternative)

Solr has spatial search but is a heavyweight Java app with a steep learning curve. Typesense starts in seconds, uses a fraction of RAM, and is simpler to deploy on Railway for most geo search applications.

How to use Typesense Geo Search (the OSS Instant Search)?

  1. Create a collection with a _geoloc field of type geopoint.
  2. Index documents with _geoloc: [lat, lng].
  3. Query using filter_by=_geoloc:(lat,lng,radius) and sort_by=_geoloc(lat,lng):asc.

Example query:

/search?q=*&amp;filter_by=_geoloc:(40.730610,-73.935242,5 km)&amp;sort_by=_geoloc(40.730610,-73.935242):asc

Combine with full-text search (q=sushi) and facet filters (filter_by=cuisine:japanese).

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

Clone the Repository

Not required for deployment; pull the Docker image directly. For source inspection: git clone https://github.com/typesense/typesense.git.

Install Dependencies

Install Docker: curl -fsSL https://get.docker.com -o get-docker.sh &amp;&amp; sudo sh get-docker.sh.

Configure Environment Variables

export TYPESENSE_API_KEY=your-secure-random-key.

Start the Typesense Geo Search Application

docker run -d -p 8108:8108 -v /opt/typesense-data:/data -e TYPESENSE_API_KEY=$TYPESENSE_API_KEY typesense/typesense:30.2 --data-dir /data --api-key=$TYPESENSE_API_KEY --enable-cors

Put behind Nginx or Caddy with TLS for production.

Official Pricing of Typesense Geo Search (Typesense Geo Search pricing)

Typesense Geo Search is free to self-host under GPL-3.0. No license fee, per-search charge, or record limit. You pay only for infrastructure.

Typesense Cloud pricing: dedicated RAM/vCPU nodes billed hourly plus bandwidth, no per-search fee. 0.5 GB burst node ≈ $21.60/month; 2 GB burst ≈ $43–$51/month.

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

AspectTypesense CloudSelf-hosted on Railway
PricingHourly per node + bandwidthRailway compute + volume
SetupInstant, managedOne-click Railway template
ScalingVertical/horizontal via dashboardVertical via Railway; horizontal manual
Data controlTypesense infrastructureYour Railway volume
MaintenanceTypesense handles updates/backupsYou handle updates and backups
Geo featuresIdenticalIdentical
Small dataset cost~$21.60/month$5–$15/month
Large dataset costScales linearlyCan be cheaper at high volume

Monthly cost of self hosting Typesense Geo Search on Railway

A small node (512 MB RAM, 0.5 vCPU) costs $5–$10/month plus volume (~$0.10/GB). For up to 100k documents, 512 MB RAM is enough. Railway’s $5 GitHub trial covers the first month.

System Requirements for Hosting Typesense Geo Search on a VPS

  • RAM: In-memory; 512 MB for 100k docs, 2–4 GB for 1M docs.
  • CPU: 1 vCPU sufficient; 2 vCPUs for >100 QPS.
  • Disk: At least 2x RAM for snapshots.
  • Network: Low latency; choose region close to users.

Frequently Asked Questions (FAQs)

Can I use Typesense Geo Search with a frontend InstantSearch library?

Yes. Official adapters for React, Vue, Angular, and vanilla JS. Pass geo parameters via additionalSearchParameters. Enable CORS.

How do I update the Typesense Geo Search Docker image on Railway?

Change the image tag to a newer pinned version. Railway pulls and restarts. Back up /data first.

What happens if I lose my TYPESENSE_API_KEY?

The key encrypts the on-disk index. You must delete the volume, set a new key, and re-index.

Can I combine geo search with full-text search and facet filters?

Yes. One query can include text, geo radius, facet filter, and distance sort.

Is Typesense Geo Search suitable for production use?

Yes. Used in production for store locators, e-commerce, and local discovery. GPL-3.0 allows commercial use.

How does Typesense Geo Search handle geohash precision?

Stores lat/lng pairs; radius filter uses bounding box plus exact distance, so precision is not limited by geohash length. 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.


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