---
title: "Deploy Morphic"
description: "AI answer engine with cited sources, private SearXNG, invite-only accounts"
category: "AI/ML"
url: https://railway.com/deploy/morphic
---

# Deploy Morphic

AI answer engine with cited sources, private SearXNG, invite-only accounts

**[Deploy Morphic on Railway](https://railway.com/template/morphic)**

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

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### SearXNG https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/searxng.png

- **Source:** https://github.com/aalfath/morphic-railway-template
- **Health check:** /healthz

### Morphic https://www.morphic.sh/apple-icon.png

- **Source:** https://github.com/aalfath/morphic-railway-template
- **Health check:** /auth/login
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:17

### Redis https://devicons.railway.app/i/redis.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host Morphic on Railway

Morphic is an open-source AI answer engine with a generative UI. You ask a question, it searches the web, reads the sources and writes a cited answer with images and rich layout. It keeps a searchable chat history, offers Quick and Adaptive modes, and works with OpenAI, Anthropic, Google, Ollama and OpenAI-compatible models.

## About Hosting Morphic

This template deploys Morphic v1.10.0 from the official image, pinned by version and digest and built from a public GitHub repo, so Railway tells you when a new version is available. It adds a private SearXNG for web search (no search API key needed), Railway Postgres for accounts and chat history, and Redis as a search cache. Accounts use Morphic's built-in Better Auth: sign-up is invite-only, and only the e-mail address you enter at deploy time can create the first account, which becomes the admin. The session secret and the SearXNG secret are generated. You supply at least one model key, at deploy time or later.

## Common Use Cases

* A private Perplexity-style search engine for yourself or a small team, on your own model keys
* Research with cited sources and a searchable history kept in your own database
* Comparing models from different providers on the same questions

## Dependencies for Morphic Hosting

* An API key for at least one model provider (OpenAI, Anthropic, Google Gemini, Vercel AI Gateway, an OpenAI-compatible provider such as OpenRouter, or an Ollama server)
* Bundled in the template: SearXNG, PostgreSQL 17 and Redis

### Deployment Dependencies

* Morphic: https://github.com/miurla/morphic (release v1.10.0, Apache-2.0)
* Morphic configuration guide: https://github.com/miurla/morphic/blob/v1.10.0/docs/CONFIGURATION.md
* SearXNG: https://github.com/searxng/searxng (AGPL-3.0)
* Template repository: https://github.com/aalfath/morphic-railway-template

### Implementation Details

The deploy form asks for `BOOTSTRAP_ADMIN_EMAIL` and offers optional model keys. After deploying:

1. Open the Morphic service's domain, choose **Sign up** and register with that e-mail address. That account is the admin.
2. If you skipped the model keys, add one (for example `OPENAI_API_KEY` or `OPENAI_COMPATIBLE_API_KEY` with `OPENAI_COMPATIBLE_API_BASE_URL`) to the Morphic service's variables.
3. Invite other people from `/auth/admin`. To allow open sign-up instead, set `AUTH_SIGNUP_MODE=open`.

Database migrations run on every start. Morphic's `/api/advanced-search` route has no login check, so the template blocks it from outside, and Morphic calls it internally. With a custom domain, set `BETTER_AUTH_URL=https://YOUR-DOMAIN`. SMTP, single sign-on, file upload and chat sharing are optional and off until you set their variables (see the configuration guide). Updates: when the template repo moves to a new Morphic release, Railway shows an update notice, and the repo's `CHANGELOG.md` lists what changed.

## Why Deploy Morphic 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 Morphic 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.



## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/morphic
