Deploy Morphic, an AI answer engine with generative UI and citations, on Render with Docker, managed Postgres, and Exa neural search.
This repo packages Morphic as a Render Blueprint (docker-fork): builds from ./Dockerfile, wires managed Postgres for chat history, and uses Exa instead of self-hosted SearXNG/Redis.
| Piece | Role |
|---|---|
| Morphic | Generative UI answer engine |
| Render Web Service | Docker Next.js app (standard) |
| Render Postgres | Chat history (morphic-db) |
| Exa | Neural web search (SEARCH_API=exa) |
| LLM provider | Completions (OpenAI / Anthropic / Google / …) |
flowchart LR
browser["Browser"] --> web["morphic<br/>Docker Standard"]
web --> db[("morphic-db<br/>Postgres 17")]
web --> exa["Exa API"]
web --> llm["LLM provider"]
- Click Deploy to Render. Render forks this template and applies
render.yaml. - Enter
EXA_API_KEYon Apply. Add one LLM key on Apply or after deploy on the service. - Render builds the Docker image (Next.js) and runs migrations on container start.
- Open the
morphic*.onrender.comURL and ask a question. - Chat history persists in Postgres across deploys.
| Resource | Type | Plan | Notes |
|---|---|---|---|
morphic |
Web (runtime: docker) |
standard | Health /; migrations on boot |
morphic-db |
Postgres 17 | basic-256mb | Private (ipAllowList: []) |
morphic-render |
Env group | Shared non-secret config |
Default region: oregon. Previews are off. Standard is the floor: Starter (512 MB) typically OOMs during the Next.js build/start ("No open ports detected").
- A Render account
- An Exa API key
- At least one LLM key (OpenAI, Anthropic, Gemini, or AI Gateway)
- Click Deploy to Render above and fork into your GitHub account.
- On Apply, enter
EXA_API_KEY. Optionally paste an LLM key now. - Wait until Live (~5–10 minutes first time).
- Open the public URL. If the model selector is empty, add an LLM key on the service and retry.
- Run a query and confirm citations stream back.
Smoke test:
curl -sS -o /dev/null -w "%{http_code}\n" https://<your-morphic>.onrender.com/| Feature | Description |
|---|---|
| Docker fork | Builds from ./Dockerfile (no public Morphic image required) |
| Exa search | Replaces self-hosted SearXNG in Compose |
| Managed Postgres | DATABASE_URL wired via fromDatabase |
| Anonymous mode | ENABLE_AUTH=false by default |
| One Render project | projects / environments wrapper |
| Variable | Source | Description |
|---|---|---|
EXA_API_KEY |
Required (sync: false) |
Exa neural search |
DATABASE_URL / DATABASE_RESTRICTED_URL |
Wired | From morphic-db |
NODE_ENV |
Wired (group) | production |
ENABLE_AUTH |
Wired (group) | false |
ANONYMOUS_USER_ID |
Wired (group) | anonymous-user |
SEARCH_API |
Wired (group) | exa |
NODE_TLS_REJECT_UNAUTHORIZED |
Wired (group) | 0 (Render Postgres TLS with upstream Node) |
OPENAI_API_KEY / ANTHROPIC_API_KEY / GOOGLE_GENERATIVE_AI_API_KEY / AI_GATEWAY_API_KEY |
Optional (Dashboard) | Add at least one LLM key after deploy |
Upstream config: CONFIGURATION.md.
| Resource | Approx. monthly |
|---|---|
| Web (Standard) | ~$25 |
Postgres (basic-256mb) |
~$6 |
| Total | ~$31 |
Exa and LLM usage are billed by those providers. Do not drop the web plan to Starter unless you have proven the build fits in 512 MB.
| Problem | Solution |
|---|---|
| Health check fails / no open ports | Keep Standard. Check build logs for OOM. |
| Model selector empty | Add an LLM key on the service Environment. |
| Search errors | Confirm EXA_API_KEY and SEARCH_API=exa. |
| Postgres TLS / certificate errors | Keep NODE_TLS_REJECT_UNAUTHORIZED=0 from the env group. |
| Empty chat history | Confirm DATABASE_URL wiring and Postgres is Live. |
render.yaml Render Blueprint (Docker web + Postgres)
README.md This file
LICENSE MIT (template packaging note) / upstream Apache-2.0 for app
Dockerfile App image build
app/ … Morphic source (docker-fork)
assets/ Hero / logo
Render:
Morphic / Exa:
Template packaging on Render examples is for one-click deploy. Upstream Morphic is Apache-2.0: see LICENSE. Star that repo if this helped.
