---
title: "Deploy Grist"
description: "Grist 1.7: relational spreadsheet with Python formulas and REST API."
category: "Other"
url: https://railway.com/deploy/grist-1
---

# Deploy Grist

Grist 1.7: relational spreadsheet with Python formulas and REST API.

**[Deploy Grist on Railway](https://railway.com/template/grist-1)**

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

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### grist https://raw.githubusercontent.com/gristlabs/grist-core/v1.7.19/static/icons/favicon.png

- **Image:** gristlabs/grist:1.7.19
- **Health check:** /status

### gateway https://raw.githubusercontent.com/caddyserver/website/5c921006aae4feb2184782ae528c2bb09a07e04f/src/resources/images/favicon.png

- **Image:** caddy:2.11.4-alpine
- **Start command:** `sh -c 'export GRIST_ADMIN_HASH=$(caddy hash-password --plaintext "$GRIST_ADMIN_PASSWORD") && printf "%s\n" "$CADDYFILE" > /tmp/Caddyfile && exec caddy run --config /tmp/Caddyfile --adapter caddyfile'`
- **Health check:** /gateway_health
- **Public domain:** Yes

## Documentation

# Deploy and Host Grist on Railway

Grist is a relational spreadsheet: a familiar grid with typed columns, linked tables, Python formulas, access rules, charts, forms and a REST API. It works like a lightweight database that non-developers can use, and whole documents can be exported as SQLite, Excel or CSV files at any time.

## About Hosting Grist

This template runs the official `gristlabs/grist:1.7.19` image behind a small Caddy gateway. The gateway asks for a username and generated password (basic auth), then signs you in to Grist as the admin email through forward-auth, so nobody can reach Grist without the password. Grist API keys still work directly for scripts. Formulas run in the Pyodide sandbox, which needs no special privileges on Railway. Documents are stored on a volume at `/persist`, so they survive redeploys. Both services fit the Hobby plan; large documents need more memory. It is a single-user setup; add an OIDC or SAML provider for teams.

## Common Use Cases

- A spreadsheet-database for inventories, CRMs and project tracking
- Python formulas and linked tables without writing an app
- Feeding data to other tools through the Grist REST API

## Dependencies for Grist Hosting

- `gristlabs/grist:1.7.19` (official image)
- `caddy:2.11.4-alpine` as the login gateway
- A Railway volume at `/persist`

### Deployment Dependencies

- [Grist self-hosting guide](https://support.getgrist.com/self-managed/)
- [Grist v1.7.19 release](https://github.com/gristlabs/grist-core/releases/tag/v1.7.19)
- [Grist REST API](https://support.getgrist.com/rest-api/)

### Implementation Details

| Service | Source | Networking | Storage |
| --- | --- | --- | --- |
| grist | `gristlabs/grist:1.7.19` | private only, 8484 | volume at `/persist` |
| gateway | `caddy:2.11.4-alpine` | public domain on 8080 | none |

| Variable (gateway) | Default | Purpose |
| --- | --- | --- |
| `GRIST_ADMIN_USER` | `admin` | Basic-auth username |
| `GRIST_ADMIN_PASSWORD` | generated | Basic-auth password |
| `GRIST_ADMIN_EMAIL` | `admin@example.com` | Grist account you are signed in as |
| `GRIST_URL` | `https://` | Where to open Grist |

Notes:

- API calls: `curl -H "Authorization: Bearer " https:///api/orgs`. Create the key in Profile settings.
- The gateway strips any `X-Forwarded-User` header clients send, so it cannot be spoofed.
- Change `GRIST_ADMIN_EMAIL` before the first deploy if you want a different account email.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by Grist Labs.

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

- [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/grist-1
