Deploy Morphic

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

Deploy Morphic

/etc/searxng

/var/lib/postgresql/data

Just deployed

/data

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

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.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1