Skip to main content
Railway is the easiest way to deploy tinykit. One click, automatic HTTPS, and persistent storage included.

One-Click Deploy

Deploy to Railway

Click to deploy tinykit to Railway in under 5 minutes.

What You’ll Need

  1. A Railway account (free tier available)
  2. An AI API key from one of:

Step-by-Step Setup

1

Click Deploy Button

Click the “Deploy to Railway” button above, or go to the tinykit Railway template.
2

Configure Environment Variables

Railway will prompt you to set environment variables:Example configuration:
3

Deploy

Click “Deploy” and wait 2-3 minutes for the build to complete.
4

Access Your Instance

Once deployed, Railway provides a URL like your-app.railway.app.
  • Builder: your-app.railway.app/tinykit
  • Production apps: your-app.railway.app/

Adding Custom Domains

1

Open Railway Settings

Go to your Railway project → Settings → Domains
2

Add Domain

Click “Add Domain” and enter your domain (e.g., app.yourdomain.com)
3

Configure DNS

Add a CNAME record pointing to your Railway URL:
4

Wait for SSL

Railway automatically provisions SSL certificates. This takes 1-5 minutes.
You can add multiple domains to serve different apps. Each domain can point to a different tinykit project via domain routing.

Persistent Storage

Railway automatically persists the pocketbase/pb_data directory. Your data survives:
  • Redeploys
  • Restarts
  • Sleep/wake cycles
Railway’s free tier has storage limits. For production apps with significant data, consider upgrading to a paid plan.

Costs

Plus your AI API costs (typically $3-10/month for casual use).

Updating Your Deployment

Automatic Updates

Fork the tinykit repository and connect it to Railway for automatic deployments on push.

Manual Updates

  1. Go to your Railway project
  2. Click “Redeploy” to pull the latest changes

Environment Variables Reference


Troubleshooting

Check that your POCKETBASE_ADMIN_EMAIL and POCKETBASE_ADMIN_PASSWORD are set. The password must be at least 8 characters.
Verify your LLM_API_KEY is correct and has credits. Check the Railway logs for specific error messages.
Wait 5-10 minutes for SSL provisioning. If it persists, verify your DNS records are correct.
Railway should persist /pocketbase/pb_data. If data is lost, check that you haven’t accidentally removed the volume in Railway settings.
Railway’s free tier sleeps after inactivity. The first request after sleep takes 10-20 seconds. Upgrade to a paid plan for always-on performance.

Logs and Monitoring

Access logs from the Railway dashboard:
  1. Go to your project
  2. Click on the service
  3. View “Deployments” for build logs
  4. View “Logs” for runtime logs
Look for:
  • Starting Pocketbase... → Database startup
  • Pocketbase is ready! → Database ready
  • Starting SvelteKit server... → App startup