Deploy Morphic
AI answer engine with cited sources, private SearXNG, invite-only accounts
Just deployed
/etc/searxng
Just deployed
Just deployed
/var/lib/postgresql/data
Redis
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
- 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:
- Open the Morphic service's domain, choose Sign up and register with that e-mail address. That account is the admin.
- If you skipped the model keys, add one (for example
OPENAI_API_KEYorOPENAI_COMPATIBLE_API_KEYwithOPENAI_COMPATIBLE_API_BASE_URL) to the Morphic service's variables. - Invite other people from
/auth/admin. To allow open sign-up instead, setAUTH_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
BOOTSTRAP_ADMIN_EMAIL
Your e-mail address. Only this address can sign up first; that account becomes the admin
Redis
redis:8.2
