---
title: "Deploy Daptin"
description: "Daptin | Production Self-Hosted Stack deployment stack"
category: "Other"
url: https://railway.com/deploy/daptin
---

# Deploy Daptin

Daptin | Production Self-Hosted Stack deployment stack

**[Deploy Daptin on Railway](https://railway.com/template/daptin)**

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

- **Creator:** VerifiedStacks's Projects
- **Category:** Other

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### daptin

- **Image:** daptin/daptin:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host Daptin on Railway

[Daptin](https://github.com/daptin/daptin) is an open-source, schema-driven backend-as-a-service (BaaS) and application server (1,800+ ★) written in Go. It instantly turns declarative JSON/YAML schemas into full JSON:API, GraphQL, and OAuth2 services with built-in asset storage, workflows, state machines, and real-time synchronization.

This 1-click verified deployment template provisions Daptin alongside a production-ready PostgreSQL database on Railway with automated backups, private mesh connectivity, and zero-ops management.

## About Hosting Daptin

This deployment stack provisions an isolated application server and a dedicated relational database:

- **Daptin Application Server (`daptin`):** Runs `daptin/daptin:latest` on port `8080`, providing instant JSON:API and GraphQL endpoints, authentication, and state management.
- **Relational Database (`postgres`):** Backed by managed PostgreSQL for persistent relational data, user accounts, and schema state.
- **Persistent Asset Volume (`daptin-data`):** Preserves uploaded blobs, attachments, and generated assets across container redeployments.

## Why Deploy Daptin on Railway?

- **1-Click Verified Architecture:** Zero-ops setup with PostgreSQL pre-wired via Railway's managed database integration.
- **Private Internal Networking:** Secure container-to-database communication over Railway's private mesh without exposing the database to the public internet.
- **Automatic Health Probing:** Native readiness probe mapped to `/ready` ensures traffic is only routed when migrations and cache initializations are complete.
- **Ephemeral &amp; Auto-Healing:** Automatic restarts and health verification maintain 99.9% service uptime.

## Common Use Cases

- **Instant Backend &amp; Headless CMS:** Generate full CRUD JSON:API and GraphQL APIs for mobile or web apps in minutes without writing backend boilerplate.
- **Schema-Driven Microservices:** Build workflow engines and state machines backed by declarative JSON/YAML contracts.
- **Self-Hosted BaaS Alternative:** A lightweight, single-binary alternative to PocketBase or Supabase for rapid product prototyping.

## Dependencies for Daptin Hosting

- **Primary Application Container (`daptin`):** Core Daptin Go application server (`daptin/daptin:latest`).
- **Database Backend (`postgres`):** PostgreSQL database engine (`postgres:17-alpine` or managed Railway Postgres).
- **Persistent Storage Volumes:** `daptin-data` (storage for uploaded files) and `postgres-data` (relational database storage).

## Configuration &amp; Environment Variables

| Variable | Default Value | Description |
| :--- | :--- | :--- |
| `PORT` | `8080` | Internal HTTP listening port mapped automatically by Railway edge routing. |
| `DAPTIN_PORT` | `:8080` | Internal TCP listening address for the Daptin server runtime. |
| `DAPTIN_RUNTIME` | `release` | Gin engine runtime mode (`release`, `debug`, or `profile`). |
| `DAPTIN_DB_TYPE` | `postgres` | Database driver identifier (`postgres`, `mysql`, or `sqlite3`). |
| `DAPTIN_DATABASE_URL_VARIABLE` | `DATABASE_URL` | Name of the environment variable containing the database connection URL. |
| `DATABASE_URL` | `${{Postgres.DATABASE_URL}}` | Auto-wired PostgreSQL connection string from the managed database. |
| `DAPTIN_DISABLE_SMTP` | `true` | Disables embedded SMTP server to prevent open relay exposure in cloud environments. |
| `DAPTIN_LOCAL_STORAGE_PATH` | `/var/lib/daptin/storage` | Directory path where uploaded files and assets are stored. |
| `TZ` | `UTC` | Timezone setting for application timestamping. |

## First-Time Setup &amp; Onboarding

1. Click **Deploy on Railway** to provision Daptin and PostgreSQL.
2. Wait for the initial schema initialization to complete (verified when the `/ready` check passes).
3. Access the public domain generated for your deployment (`https://.up.railway.app`).
4. Access the API documentation at `/openapi.yaml` or use the GraphQL endpoint at `/graphql`.

---
*Verified and maintained by **VerifiedStacks**.*


## 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/daptin
