---
title: "Deploy Typesense Events"
description: "Event discovery search with geo and time filters"
category: "Analytics"
url: https://railway.com/deploy/typesense-events
---

# Deploy Typesense Events

Event discovery search with geo and time filters

**[Deploy Typesense Events on Railway](https://railway.com/template/typesense-events)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/typesense-events/manifest.json

- **Creator:** onepush
- **Category:** Analytics

## Template content

### typesense-railway

- **Source:** Shinyduo/typesense-railway
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted Typesense Events (Event Discovery Search) on Railway

Someone opens your events app on a Friday at 6pm and types "jazz near me tonight". They want shows within a few kilometres, starting in the next three hours, under a price they set, sorted by start time. This template runs Typesense OSS on Railway so that query comes back from a node you own, with no per-search bill.

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

Running event discovery on Railway gives you instant search without per-query meters. The official `typesense/typesense:30.2` image, a volume at `/data`, and one `TYPESENSE_API_KEY` variable are all you need. There's no separate search appliance, just one container on port 8108 with geo radius, numeric time range filters, and facets. Pin the image, mount the volume, and keep the key in Railway Variables; those three habits prevent most late-night support threads.

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

Algolia bills requests and records, so every "events near me tonight under $20" query costs money. Typesense is GPL-3.0 open source; on Railway you pay only compute and volume. A small node runs single-digit to low-teens USD per month, and Railway's $5 trial credit covers the first evaluation. Event traffic is spiky: a festival lineup drop can multiply searches in an hour, and on a per-request plan that spike lands on your invoice.

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 Events 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 vs Other Hosting Providers and VPS for Typesense Events self hosting

| Provider | Deploy experience | Persistent volume | TLS &amp; routing | Cost profile for small Typesense node |
|---|---|---|---|---|
| Railway | Template deploy, image, volume, env | Yes, attached volume | Automatic HTTPS domain | Single-digit to low-teens USD/mo |
| DigitalOcean | Droplet or App Platform, manual volume | Block storage | Manual | ~$6-12/mo plus volume |
| AWS | EC2 + EBS + ALB + security groups | EBS | Manual via ACM/ALB | Cheap instance, expensive setup time |
| Hetzner | VPS, SSH, Docker yourself | Cloud volumes | Manual | ~EUR 4-8/mo |

## Common Use Cases for hosted Typesense Events

- **Local tonight discovery:** `location:(lat, lng, 5 km) &amp;&amp; start_time:&gt;[now] &amp;&amp; start_time:&lt;[now+3h]`, with Unix timestamps your app computes, sorted by `start_time:asc`.
- **Festival schedules:** Facet by stage, category, and price.
- **Ticket marketplaces:** Price facets, start-time sort, and reindexing every few minutes without per-record fees.
- **City guides:** Separate collections for events, venues, and artists queried together with multi_search.

## Dependencies for Typesense Events Docker hosted on Railway

This template has a single service and no external database. Typesense is the search engine and the store for its own index, so the only things it depends on are a persistent volume and an admin API key.

### Deployment Dependencies for Managed Typesense Events Service (Event Discovery Search)

You need a Railway project, the Docker image, a volume, and `TYPESENSE_API_KEY`. Typesense stores its index in `/data`, which must be a persistent volume. The API key is required; keep it in Railway Variables, never in a repo. For browser clients, pass `--enable-cors` in the start command, and give the browser a search-only scoped key, not the admin key.

### Implementation Details for Typesense Events (Using Typesense official docker image)

Pin `typesense/typesense:30.2`, not `latest`. The image's entrypoint is the server, so the start command is just the arguments:

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

Health check on `GET /health` (port 8108). A typical event schema: `name`, `start_time` (int64, sortable), `end_time` (int64), `location` (geopoint), `category` (facet), `venue` (facet), `price` (int32, facet), `description`. Filter with `location:(40.7128, -74.0060, 5 km) &amp;&amp; start_time:&gt;1767225600 &amp;&amp; category:Music`. For backups, call `POST /operations/snapshot?snapshot_path=/data/snapshots` on a schedule and copy the snapshot somewhere off the box.

## How does Typesense Events compare against other Event Discovery Search platforms

### Typesense Events vs Algolia (Algolia Alternative)

Algolia has polished dashboards and relevance tools but is SaaS-only, and per-request billing hurts geo and time-heavy event queries where every filter tweak is a new search. Typesense gives you the same kind of filters without per-search fees. Algolia wins on its managed global network; Typesense wins on cost and data ownership.

### Typesense Events vs Elasticsearch (Elasticsearch Alternative)

Elasticsearch usually means JVM heap tuning and cluster management. Typesense is one process. Elasticsearch wins at billions of documents and heavy aggregations; Typesense is faster to stand up for event indexes.

### Typesense Events vs Meilisearch (Meilisearch Alternative)

Both are single-binary, typo-tolerant instant search engines, and both support geo radius filters and facets. Typesense keeps the index in RAM for steady latency and adds built-in vector and hybrid search; Meilisearch is disk-backed, so catalogs bigger than RAM are easier.

### Typesense Events vs OpenSearch (OpenSearch Alternative)

OpenSearch is the Elasticsearch fork, with the same clusters, shards, and ops load. For a standalone event search service, Typesense uses less RAM and has fewer moving parts.

## How to use Typesense Events (the OSS Event Discovery Search)?

Create a collection through the API on your Railway domain, index JSON documents, and use the InstantSearch adapter. Configure the client with your Railway domain over HTTPS, a search-only key, and the collection name. Add geo radius, date range, and facet widgets. Upsert by ID, and clear past events with a delete-by-filter on `start_time:&lt;` the current timestamp. A minimal create call:

`curl -X POST https://your-app.up.railway.app/collections -H "X-TYPESENSE-API-KEY: $KEY" -d '{"name":"events","fields":[{"name":"start_time","type":"int64","sort":true}]}'`

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

### Clone the Repository

There's nothing to build. Pull the official image with `docker pull typesense/typesense:30.2`, and keep your schema and JSONL export in your own repo.

### Install Dependencies

Install Docker on the VPS. Create a writable data directory, open port 8108 only to your app or a reverse proxy, and put Nginx or Caddy in front for TLS.

### Configure Environment Variables

```
TYPESENSE_API_KEY=your-strong-key
TYPESENSE_DATA_DIR=/data
TYPESENSE_ENABLE_CORS=true
```

Never commit the key. Enable CORS only for direct browser calls.

### Start the Typesense Events Application

```
docker run -d -p 8108:8108 -v /var/lib/typesense:/data typesense/typesense:30.2 --data-dir /data --api-key=your-strong-key --enable-cors
```

Then create collections and index exactly as on Railway. You own firewall, TLS, and backups.

## Official Pricing of Typesense Events (Typesense Events pricing)

Typesense is free open source (GPL-3.0). Typesense Cloud bills dedicated RAM and vCPU hourly plus bandwidth, with no per-search fees: 0.5 GB burst is about $21.60/month, 2 GB burst about $43-51/month. Self-hosting on Railway costs compute plus volume, typically single-digit to low-teens USD per month for a small node.

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

Typesense Cloud manages backups, upgrades, and monitoring. Railway gives the same engine, your control, and no per-request bill. Choose Cloud to skip ops; self-host for predictable cost.

### Monthly cost of self hosting Typesense Events on Railway

A 1 GB RAM service with a small volume lands in single-digit to low-teens USD per month. A 2 GB node for a bigger index costs more, and RAM is the main variable because the index lives in memory and needs headroom.

### System Requirements for Hosting Typesense Events on a VPS

Small index: 1 vCPU, 1 GB RAM, 10 GB SSD. 100k-500k event documents with descriptions: 2 GB RAM and 2 vCPUs. 1M+ documents: 4-8 GB RAM. Swap doesn't help; watch memory, not just `/health`.

## Frequently Asked Questions (FAQs)

### Can I run Typesense Events entirely free on Railway?

The software is free. Railway's $5 trial credit covers a small node for initial testing; after that, expect single-digit to low-teens USD per month.

### What happens if I lose the TYPESENSE_API_KEY?

It lives in Railway Variables, so check there first. To rotate it, set a new value and redeploy; the index on `/data` stays put, and keys you created through the API keep working.

### Does geo radius search work with time range filters at the same time?

Yes, combine them with `&amp;&amp;`: `location:(lat, lng, 5 km) &amp;&amp; start_time:&gt;X &amp;&amp; start_time:

## Similar templates

- [Formbricks | Open-Source Typeform & Qualtrics Alternative](https://railway.com/deploy/formbricks-surveys) — Surveys, NPS and in-app feedback on your own Postgres, Hub and Cube
- [Typesense PHP](https://railway.com/deploy/typesense-php) — official PHP client against Railway
- [Typesense vs Meilisearch](https://railway.com/deploy/typesense-vs-meilisearch) — self-hosted Typesense vs Meilisearch

Open this page in a browser: https://railway.com/deploy/typesense-events
