---
title: "Deploy SurrealDB 3 | (Just Updated) Multi-Model Database, Login and Quiet Logs Set"
description: "SurrealDB 3. Root login set at deploy, data on a volume, quiet logs"
category: "Storage"
url: https://railway.com/deploy/surrealdb-3-or-just-updated-multi-model-
---

# 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 on Railway](https://railway.com/template/surrealdb-3-or-just-updated-multi-model-)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/surrealdb-3-or-just-updated-multi-model-/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Storage

## Template content

### surrealdb

- **Image:** surrealdb/surrealdb:v3.3.0@sha256:681c6c22c287421b5c7d99e0fde79b6e0d32c36c1ddeaab2762a1661cb04cd20
- **Start command:** `/surreal start --log info --user root --bind [::]:8080 surrealkv:///data/surrealdb`
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# 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

- SurrealDB documentation: https://surrealdb.com/docs
- Official image: https://hub.docker.com/r/surrealdb/surrealdb

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `SURREAL_PASS` | Password for the `root` user, generated per deploy. |
| `SURREAL_HTTP_URL` | Public HTTPS address, for `/sql`, `/key` and `/health`. |
| `SURREAL_WS_URL` | Public WebSocket address of the RPC endpoint. |
| `SURREAL_PRIVATE_URL` | Address 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.


## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/surrealdb-3-or-just-updated-multi-model-
