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:
VariableRequiredDescription
LLM_PROVIDERYesanthropic, openai, or gemini
LLM_API_KEYYesYour API key
LLM_MODELNoModel name (defaults to provider’s best)
POCKETBASE_ADMIN_EMAILYesAdmin email for database
POCKETBASE_ADMIN_PASSWORDYesAdmin password (min 8 chars)
Example configuration:
LLM_PROVIDER=anthropic
LLM_API_KEY=sk-ant-api03-...
LLM_MODEL=claude-sonnet-4-20250514
POCKETBASE_ADMIN_EMAIL=admin@yourdomain.com
POCKETBASE_ADMIN_PASSWORD=your-secure-password
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:
app.yourdomain.com  CNAME  your-app.railway.app
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

PlanMonthly CostIncludes
Hobby~$5500 hours, 1GB storage
Pro$20 baseUnlimited hours, more resources
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

VariableDefaultDescription
LLM_PROVIDER-AI provider: anthropic, openai, gemini, ollama, zai
LLM_API_KEY-Your AI API key
LLM_MODELvariesModel to use (e.g., claude-sonnet-4-20250514)
LLM_BASE_URL-Custom API endpoint (for OpenAI-compatible providers)
POCKETBASE_ADMIN_EMAIL-Pocketbase admin email
POCKETBASE_ADMIN_PASSWORD-Pocketbase admin password
PORT3000Server port (Railway sets this automatically)
HOST0.0.0.0Server host

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