---
title: "Deploy SurrealDB"
description: "Multi-model database with an HTTP and WebSocket API"
category: "Other"
url: https://railway.com/deploy/surrealdb-2
---

# Deploy SurrealDB

Multi-model database with an HTTP and WebSocket API

**[Deploy SurrealDB on Railway](https://railway.com/template/surrealdb-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/surrealdb-2/manifest.json

- **Creator:** zer0person's Projects
- **Category:** Other
- **Total deploys:** 1

## Template content

### SurrealDB

- **Image:** surrealdb/surrealdb:latest-dev
- **Start command:** `sh -c 'exec /surreal start --user root --pass "$SURREAL_PASS" --bind 0.0.0.0:8000 rocksdb:/data/db'`
- **Public domain:** Yes

## Documentation

# Deploy and Host SurrealDB on Railway

[SurrealDB](https://github.com/surrealdb/surrealdb) is a multi-model database for documents, graphs and relational data, queried with SurrealQL over HTTP or WebSocket.

## About Hosting SurrealDB

This template runs the official `surrealdb/surrealdb:latest-dev` image (the variant with a shell) on RocksDB storage in a persistent volume at `/data`. The root user is `root`; the password is the generated `SURREAL_PASS` variable on the service.

## Common Use Cases

- Backend database for web and mobile apps
- Graph, document and time-series data in one engine
- Real-time live queries over WebSocket

## Dependencies for SurrealDB Hosting

- One service with a volume; nothing else

### Deployment Dependencies

- [SurrealDB on GitHub](https://github.com/surrealdb/surrealdb)
- [Docker image](https://hub.docker.com/r/surrealdb/surrealdb)

## Why Deploy SurrealDB on Railway?

Railway gives you a public HTTPS URL, a persistent volume and automatic restarts with no server to maintain. Connect with `wss:///rpc` or `https://` as user `root` and the password from the service variables.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/surrealdb-2
