Back to Overview

Railway Deployment

Deploy Tymeslot on Railway from a one-click template. Railway provisions PostgreSQL, connects it to the app and starts your instance.

Luka Breitig, Software Engineer & AI Developer
Luka Breitig

Aktualisiert am 29. Juli 2026

📋 Prerequisites

  • Railway account: Sign up at railway.com (no credit card needed to start)
  • SMTP provider (for production): Needed for booking confirmations and password resets. Postmark, Resend, SendGrid or any SMTP server works. You can skip this while you try the app.

1 Deploy the Template

Click the button below to open the Tymeslot template on Railway. Railway creates a new project with two linked services: the Tymeslot app and a PostgreSQL database.

Deploy on Railway

If you are not signed in, Railway asks you to log in or create an account.

2 Configure Environment Variables

After you click deploy, Railway shows a variable configuration screen before it starts the build. The template pre-fills most values; set the ones below before deploying.

Required variables

# Signing secret: generate a new one with
# openssl rand -base64 64 | tr -d '\n'
SECRET_KEY_BASE=<paste generated value here>

# Sender identity for outgoing emails
EMAIL_FROM_ADDRESS=hello@yourdomain.com
EMAIL_FROM_NAME=Tymeslot

Generating SECRET_KEY_BASE

Run this command on your own machine to generate a key: openssl rand -base64 64 | tr -d '\n'

Give each instance its own key; never reuse one across deployments.

Email adapter

The template defaults to EMAIL_ADAPTER=test, which silently discards all emails. That lets you explore the app before configuring SMTP, but switch to a real adapter before going live.

EMAIL_ADAPTER=test is not for production

With the test adapter, Tymeslot sends no email at all: password resets, booking confirmations and cancellation notices all fail silently. Switch to smtp or one of the provider APIs (postmark, sendgrid, mailgun, ahasend) before accepting real bookings.

SMTP configuration (recommended)

EMAIL_ADAPTER=smtp
SMTP_HOST=smtp.postmarkapp.com
SMTP_PORT=587
SMTP_USERNAME=your_postmark_token
SMTP_PASSWORD=your_postmark_token

Postmark configuration (alternative)

EMAIL_ADAPTER=postmark
POSTMARK_API_KEY=your_api_key

See the Environment Variables Reference for every supported variable and its default.

3 Start the Deployment

Once your variables are set, click Deploy. Railway then:

  • Provisions a PostgreSQL instance and injects DATABASE_HOST, DATABASE_PORT, and the credentials
  • Builds the Tymeslot release from source
  • Runs the database migrations, which it repeats on every boot
  • Assigns a public domain under *.up.railway.app

The first build takes a few minutes; later deploys reuse cached layers and finish faster.

4 Access Your Instance

When the build completes, find your public URL in the Railway dashboard under your Tymeslot service, in Settings → Networking → Public URL.

https://your-project.up.railway.app

Click Sign up to create your first account. The first user to register becomes the instance admin.

Custom Domain

You can attach a custom domain in Railway under Settings → Networking → Custom Domain. After adding your domain, update PHX_HOST in the Tymeslot service variables to match, so that generated URLs and OAuth callbacks point to the right host.

5 Connect Calendars and OAuth (Optional)

CalDAV calendars (Nextcloud, Radicale, Zimbra, mailbox.org) work without any server-side credentials. mailbox.org users with 2FA enabled must generate an application-specific password under Settings → Security; the CalDAV guide has the details. Google Calendar and Outlook need OAuth app credentials.

Google Calendar / Meet

Create a Google OAuth app and add its credentials, plus a random state secret, as Railway variables:

ENABLE_GOOGLE_AUTH=true
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GOOGLE_STATE_SECRET=...

Outlook Calendar / Teams

Register a Microsoft Azure app and add its credentials:

OUTLOOK_CLIENT_ID=...
OUTLOOK_CLIENT_SECRET=...
OUTLOOK_STATE_SECRET=...

See the Google OAuth Setup and Microsoft Azure Setup guides for step-by-step instructions.

❓ Frequently Asked Questions

The build fails with 'PORT variable must be integer between 0 and 65535'.
Do not set PORT as a variable in the template; Railway injects it at runtime. If it appears in your variable list, remove it and redeploy.
Postgres fails to start with 'directory is not empty'.
This happens when the volume mount point is used directly as the data directory. Set PGDATA=/var/lib/postgresql/data/pgdata in the Postgres service variables. The subdirectory starts empty, so Postgres can initialise there cleanly.
Emails are not being sent.
Check that EMAIL_ADAPTER is set to smtp or postmark, not test. The test adapter silently discards all outgoing email.
How do I update to a newer version of Tymeslot?
Railway redeploys automatically when the linked GitHub repository changes, and you can trigger a redeploy from the Railway dashboard at any time. Migrations run on every start, so there is no manual step.
Can I use a custom domain?
Yes. Add your domain under the Tymeslot service → Settings → Networking → Custom Domain, then update the PHX_HOST variable to match your domain and redeploy.

🔗 Related Articles

Read Docker Self-Hosting

Docker Self-Hosting

Deploy Tymeslot with Docker Compose on any VPS or home server. Includes reverse proxy setup, file upload volumes, and WebSocket configuration for LiveView.

Read Cloudron Deployment

Cloudron Deployment

Install Tymeslot on Cloudron in minutes. PostgreSQL, SSL certificates, email relay, and automatic updates are all provisioned and managed for you.

Read Reverse Proxy Setup

Reverse Proxy Setup

Set up Nginx or Caddy as a reverse proxy for Tymeslot. Covers HTTPS termination, WebSocket proxying for LiveView, and custom domain configuration.