Deploy SurrealDB
Multi-model database: documents, graphs, vectors & time-series
surrealdb
Just deployed
/data
Deploy and Host
SurrealDB — the ultimate multi-model database as a one-click Railway template. Document, graph, relational, vector and time-series data behind one SurrealQL interface, one binary, one always-on service. Zero form fields on deploy; the root password is auto-generated.
On first boot the server binds Railway's injected PORT, creates the root user from the generated SURREAL_PASS, initializes the main namespace and main database on the persistent volume, and serves HTTP, RPC and WebSocket on the same port.
About Hosting
One service, deployed with one click:
- surrealdb — SurrealDB v3.2.6 server (pinned official image
surrealdb/surrealdb, digest-pinned), healthcheckGET /health, binds Railway's injectedPORT - Persistent volume
surrealdb-dataat/data— SurrealKV storage engine at/data/db
No companion services: SurrealDB is its own storage engine. Point any SurrealDB SDK, the Surrealist UI, or plain HTTP at your Railway domain and it just works.
Why Deploy
Self-hosting SurrealDB means your data never leaves your infrastructure — no per-query pricing, no row limits, no vendor lock-in. One engine covers the workloads that normally need four databases: flexible documents, graph traversals, full-text search, vector similarity for AI apps, and time-series. On Railway it is always on, so connections, live queries and scheduled events keep running around the clock.
Common Use Cases
- Backend for AI apps: vector search + documents + graph relations in one query language
- Real-time apps with
LIVE SELECTstreaming changes over WebSocket - A schemaless document store that grows into strict schemas when you need them
- Multi-model prototyping without running Postgres + Neo4j + Pinecone side by side
Configuration
Zero form fields on deploy. After deploy, the optional knobs in the service's Variables panel:
SURREAL_PASS— root password (auto-generated${{secret(32)}}per deployment; find it in Variables). Applied only on first boot — to rotate later, runALTER USERinside the DB.SURREAL_USER— root username (defaultroot)SURREAL_DEFAULT_NAMESPACE— namespace created on first boot (defaultmain)SURREAL_DEFAULT_DATABASE— database created on first boot (defaultmain)SURREAL_LOG— log level:none,full,error,warn,info,debug,trace(defaultinfo)SURREAL_QUERY_TIMEOUT— max duration for a batch of statements (off by default)SURREAL_STRICT— strict mode for the database (off by default)SURREAL_CAPS_ALLOW_ALL— broadly enable all engine capabilities (restricted by default)PORT— injected by Railway automatically; the server binds0.0.0.0:$PORT
Connect: https:// with user root, the generated password, namespace main, database main. Try Surrealist (https://surrealist.app) as a GUI, or POST /sql with Accept: application/json.
Dependencies for
Deployment Dependencies
Hobby plan or higher for the persistent volume. SurrealDB needs nothing at runtime beyond its volume — no external API keys, no companion services, no third-party accounts. GET /health returns 200 once the server is up.
Template Content
surrealdb
mc9max/surrealdb