Deploy Hound

Fast regex code search across your Git repos, with web UI, API and login

Deploy Hound

/data

Deploy and Host Hound on Railway

Hound is an open-source code search engine from Etsy. It clones your Git repositories, builds a trigram index of every file, and answers regular-expression searches across all of them in milliseconds, through a web UI and a JSON API. It keeps each index up to date by polling the repositories for new commits.

About Hosting Hound

This template runs Hound v0.7.1 as one Railway service, built from a public GitHub repo. Hound has no user accounts, so a small Caddy proxy in the same container asks for a login (user admin, password generated at deploy time); only the /healthz health check is public. Repo clones and the search index live on a volume at /data, so restarts reuse the index instead of rebuilding it. You list the repositories to index in HOUND_REPOS; the template starts with Hound's own repo as an example. The start script sizes Hound to the service's CPU and memory, and exits non-zero if Hound or Caddy stops, so Railway restarts it.

Common Use Cases

  • Search every repository of a team or company at once, with regular expressions and file filters
  • Find all callers of an API, a config key or a deprecated function before a change
  • Give editors and scripts a fast code-search API (/api/v1/search)

Dependencies for Hound Hosting

  • Git repositories reachable over HTTPS (public, or private GitHub repos with a read-only GITHUB_TOKEN)
  • A Railway volume for the clones and the index (about 1.5–2× the size of the indexed code)

Deployment Dependencies

Implementation Details

Service: Hound (Hound v0.7.1 plus Caddy 2.11.9 for the login), public on port 8080, volume at /data, health check /healthz.

After deploying:

  1. Open the public URL and sign in as admin with HOUND_PASSWORD from the service's Variables tab.
  2. Set HOUND_REPOS to your own repositories, comma-separated, and redeploy. Add #branch to pin a branch, for example https://github.com/org/app.git#develop. Search shows "Hound is not ready" until the first index is built.
  3. Optional variables: GITHUB_TOKEN (private GitHub repos), HOUND_POLL_SECONDS (default 300), HOUND_TITLE, HOUND_CONFIG (a full Hound config.json for Mercurial, SVN or per-repo options).

Search from a script:

curl -u admin:YOUR-PASSWORD -G https://YOUR-DOMAIN/api/v1/search -d q=TODO -d 'repos=*'

Resources: tested at 0.5 GB RAM / 1 vCPU, where indexing the whole Linux kernel (about 1.7 GB of source) peaked at about 320 MB without an OOM kill. Larger code bases need more disk rather than more RAM.

Updates: the service builds from the template's GitHub repo. When we release a new Hound version there, Railway shows you an "update available" notice; read the repo's CHANGELOG.md and apply it when you're ready. The index on the volume is kept.

Why Deploy Hound on Railway?

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 Hound 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.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0