Deploy Daptin
Daptin | Production Self-Hosted Stack deployment stack
Just deployed
/var/lib/postgresql/data
daptin
Just deployed
/var/lib/daptin/storage
Deploy and Host Daptin on Railway
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): Runsdaptin/daptin:lateston port8080, 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
/readyensures traffic is only routed when migrations and cache initializations are complete. - Ephemeral & Auto-Healing: Automatic restarts and health verification maintain 99.9% service uptime.
Common Use Cases
- Instant Backend & 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-alpineor managed Railway Postgres). - Persistent Storage Volumes:
daptin-data(storage for uploaded files) andpostgres-data(relational database storage).
Configuration & 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 & Onboarding
- Click Deploy on Railway to provision Daptin and PostgreSQL.
- Wait for the initial schema initialization to complete (verified when the
/readycheck passes). - Access the public domain generated for your deployment (
https://.up.railway.app). - Access the API documentation at
/openapi.yamlor use the GraphQL endpoint at/graphql.
Verified and maintained by VerifiedStacks.
Template Content
PGDATA
PGPORT
POSTGRES_DB
POSTGRES_USER
SSL_CERT_DAYS
RAILWAY_DEPLOYMENT_DRAINING_SECONDS
daptin
daptin/daptin:latestTZ
PORT
HOSTNAME
DAPTIN_PORT
DAPTIN_DB_TYPE
DAPTIN_RUNTIME
DAPTIN_DISABLE_SMTP
DAPTIN_LOCAL_STORAGE_PATH
DAPTIN_DATABASE_URL_VARIABLE
