Deploy SurrealDB 3 | (Just Updated) Multi-Model Database, Login and Quiet Logs Set

SurrealDB 3. Root login set at deploy, data on a volume, quiet logs

Deploy SurrealDB 3 | (Just Updated) Multi-Model Database, Login and Quiet Logs Set

Just deployed

/data

Deploy and Host SurrealDB on Railway

SurrealDB is an open-source multi-model database. One engine serves documents, graphs, relational tables, full-text search and vector search through SurrealQL, over HTTP and WebSocket, with built-in users, scopes and record-level permissions.

This template runs SurrealDB 3.3 from the official image, pinned by digest, as a single service with a public Railway domain and a volume for its data.

About Hosting SurrealDB

  • A root login is set from the first request. A password is generated per deploy (SURREAL_PASS, user root). An anonymous query returned 403 Anonymous access not allowed; the same query with the generated credentials ran.
  • Data survives redeploys. SurrealDB's storage engine writes to a volume mounted at /data. A record created before a redeploy was still there afterwards.
  • Logs stay readable. The log level is info. An idle deploy printed about 45 lines in its first minutes and no trace or debug lines, so the Railway log view shows your queries and errors instead of storage-engine noise.
  • Outbound network calls from queries are off. SurrealDB's defaults are kept, so http::get() from a query is refused (Access to network target ... is not allowed) and the database cannot be used to reach other services on your private network.
  • A healthcheck is set on /health, so a deploy that does not start is reported as failed.

Common Use Cases

  • Backend for web and mobile apps that want one database for documents, graphs and tables
  • Knowledge graphs and agent memory next to vector search
  • Realtime apps using live queries over WebSocket
  • Prototypes that start on one node and keep their data on a volume

Dependencies for SurrealDB Hosting

  • One volume for the database files (created by the template)

Deployment Dependencies

Implementation Details

VariablePurpose
SURREAL_PASSPassword for the root user, generated per deploy.
SURREAL_HTTP_URLPublic HTTPS address, for /sql, /key and /health.
SURREAL_WS_URLPublic WebSocket address of the RPC endpoint.
SURREAL_PRIVATE_URLAddress for other services in the same project.

Connect with user root and SURREAL_PASS, for example surreal sql --endpoint "$SURREAL_HTTP_URL" --user root --pass "$SURREAL_PASS". Create a namespace and database, then add your own users instead of using root from an application.

Why Deploy SurrealDB 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 SurrealDB 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
Garage S3 Storage
Ultra-light S3 server: fast, open-source, plug-and-play.

PROJETOS
8
View Template
Redis
Self Host Latest Redis with Railway

8
View Template
EasyImg
Simple self-hostable Nuxt.js personal image hosting system.

Muhammad Bilal
0