Back to Overview

Railway Deployment

Deploy Tymeslot on Railway in minutes. One-click template deploy — Railway provisions Postgres, wires the connection, and starts your instance automatically.

Luka Breitig — Technical Product Builder & AI Developer
Luka Breitig

Technical Product Builder & AI Developer

📋 Prerequisites

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

1 Deploy the Template

Click the button below to open the Tymeslot template on Railway. Railway will create a new project with two services — the Tymeslot app and a PostgreSQL database — and link them automatically.

Deploy on Railway

Railway will ask you to log in or create an account if you are not already signed in.

2 Configure Environment Variables

After clicking deploy, Railway shows a variable configuration screen before starting the build. The template pre-fills most values — you need to set a few before deploying.

Required variables

# Cryptographic secret — generate a new one:\n# openssl rand -base64 64 | tr -d '\\n'\nSECRET_KEY_BASE=<paste generated value here>\n\n# Sender identity for outgoing emails\nEMAIL_FROM_ADDRESS=hello@yourdomain.com\nEMAIL_FROM_NAME=Tymeslot

Generating SECRET_KEY_BASE

Run this command locally to generate a secure key: openssl rand -base64 64 | tr -d '\n'

Never reuse this value across deployments. Each instance should have its own key.

Email adapter

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

EMAIL_ADAPTER=test is not for production

With the test adapter, no emails are sent — password resets, booking confirmations, and cancellation notices will all silently fail. Switch to smtp or postmark before accepting real bookings.

SMTP configuration (recommended)

EMAIL_ADAPTER=smtp\nSMTP_HOST=smtp.postmarkapp.com\nSMTP_PORT=587\nSMTP_USERNAME=your_postmark_token\nSMTP_PASSWORD=your_postmark_token

Postmark configuration (alternative)

EMAIL_ADAPTER=postmark\nPOSTMARK_API_KEY=your_api_key

See the Environment Variables Reference for the full list of supported variables and their defaults.

3 Start the Deployment

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

  • Provision a PostgreSQL instance and inject DATABASE_HOST, DATABASE_PORT, and credentials automatically
  • Build the Tymeslot OTP release from the Dockerfile
  • Run database migrations automatically on first boot
  • Assign a public domain under *.up.railway.app

The first build takes a few minutes. Subsequent deploys are faster thanks to layer caching.

4 Access Your Instance

Once the build completes, find your public URL in the Railway dashboard under your Tymeslot service → 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 account owner.

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 — this ensures generated URLs and OAuth callbacks point to the right host.

5 Connect Calendars and OAuth (Optional)

Tymeslot works out of the box with CalDAV calendars (Nextcloud, Radicale, Zimbra) — no extra credentials needed. Google Calendar and Outlook require OAuth app credentials.

Google Calendar / Meet

Create a Google OAuth app and add the credentials as Railway variables:

ENABLE_GOOGLE_AUTH=true\nGOOGLE_CLIENT_ID=...\nGOOGLE_CLIENT_SECRET=...

Outlook Calendar / Teams

Register a Microsoft Azure app and add the credentials:

ENABLE_MICROSOFT_AUTH=true\nMICROSOFT_CLIENT_ID=...\nMICROSOFT_CLIENT_SECRET=...\nMICROSOFT_TENANT_ID=...

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 automatically 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 is always empty and Postgres can initialise cleanly there.
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 you push to the linked GitHub repository. You can also trigger a manual redeploy from the Railway dashboard. Migrations run automatically on every startup — no manual step required.
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.