---
title: "Deploy Gel | (Just Updated) Graph-Relational Database With Admin UI, Data Survives Redeploys"
description: "Graph-relational database on Postgres, admin UI, persistent volume"
category: "Storage"
url: https://railway.com/deploy/gel-or-just-updated-graph-relational-dat
---

# Deploy Gel | (Just Updated) Graph-Relational Database With Admin UI, Data Survives Redeploys

Graph-relational database on Postgres, admin UI, persistent volume

**[Deploy Gel | (Just Updated) Graph-Relational Database With Admin UI, Data Survives Redeploys on Railway](https://railway.com/template/gel-or-just-updated-graph-relational-dat)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/gel-or-just-updated-graph-relational-dat/manifest.json

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

## Template content

### gel

- **Image:** geldata/gel:6@sha256:b3a2815a39564f2c69a71886b9acba4e4a0251f352a72ffa20c3318984a901b1
- **Start command:** `/bin/sh -c 'echo "gel uid=$(id -u) mount_owner=$(stat -c %u:%g /var/lib/gel)"; export GEL_SERVER_DATADIR=/var/lib/gel/db GEL_SERVER_PORT=5656 GEL_SERVER_BIND_ADDRESS=0.0.0.0 GEL_SERVER_TLS_CERT_MODE=generate_self_signed GEL_SERVER_HTTP_ENDPOINT_SECURITY=optional GEL_SERVER_ADMIN_UI=enabled; exec docker-entrypoint.sh server'`
- **Public domain:** Yes

## Documentation

# Deploy and Host Gel on Railway

Gel (formerly EdgeDB) is a graph-relational database built on PostgreSQL. You model data as typed objects with links, query it with EdgeQL, and manage it from a built-in admin UI. This template runs Gel as a single service from a digest-pinned official image, with a generated admin password and a persistent volume.

## About Hosting Gel

Gel needs a few things handled for Railway, all done in the start command:

- **Writable volume.** Railway mounts volumes root-owned while the image runs as an unprivileged user. The service runs as root and logs the owner of the data directory at boot.
- **Data directory under the mount.** The database lives in a subdirectory of `/var/lib/gel`, so the volume's `lost+found` never lands in the data directory.
- **Generated password.** `GEL_SERVER_PASSWORD` is random per deploy, so no default credential is ever live on a public address.
- **Wire protocol.** Gel clients connect over its own protocol on port 5656 through a TCP proxy; the admin UI is served on the same port at `/ui`.

## Why Deploy

- Admin UI and EdgeQL over a public address, plus a private address for services in the same project
- Connection strings preset as variables: `GEL_DSN` (public) and `GEL_PRIVATE_DSN` (private)
- Data survives redeploys
- Self-signed TLS generated on first boot and stored on the volume

## Common Use Cases

- Application backend database with a typed schema and migrations
- Replacing an ORM plus PostgreSQL pair with one graph-relational model
- Prototyping data models with the built-in UI and query editor
- Self-hosted alternative to a hosted graph or document database

## Dependencies for Gel Hosting

- None. Gel runs as one service with a volume at `/var/lib/gel`.

### Deployment Dependencies

- Gel: https://github.com/geldata/gel
- Documentation: https://docs.geldata.com/
- Official image: https://hub.docker.com/r/geldata/gel

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `GEL_SERVER_PASSWORD` | Password for the `admin` user, generated per deploy. |
| `GEL_DSN` | Public connection string through the TCP proxy. |
| `GEL_PRIVATE_DSN` | Private connection string for services in the same Railway project. |

Connect with the Gel CLI using `gel --dsn "$GEL_DSN" --tls-security insecure`, or open `/ui` on the service domain and sign in as `admin`.

## Why Deploy Gel 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 Gel 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

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

Open this page in a browser: https://railway.com/deploy/gel-or-just-updated-graph-relational-dat
