TinyShip
TinyShip
 TinyShip
TinyShip
TinyShip Documentation
TinyShip User GuideGetting StartedBasic Configuration
Credits System Configuration
Storage Service ConfigurationCaptcha Configuration
DeploymentCloud Platform DeploymentCloudflare Workers DeploymentDokploy DeploymentDocker DeploymentTraditional Deployment
Development Best PracticesLocal E2E Workflow
User GuideDeployment

Deployment

TinyShip deployment guide

TinyShip supports multiple deployment methods. Choose the one that fits your needs.

Deployment Methods Comparison

MethodUse CaseProsConsDifficulty
Cloud PlatformProductionAuto-scaling, no maintenancePossible vendor lock-inEasy
Cloudflare WorkersTanStack Start edge deploymentGlobal acceleration, ultra-fast cold starts, low opsTanStack-only, Hyperdrive required for DBEasy
DokployProductionSelf-hosted, Git-based deployRequires server maintenanceMedium
DockerContainerizedConsistent environment, scalableRequires Docker knowledgeMedium
TraditionalDev/TestSimple, direct version controlRequires dev environment, slow buildsComplex

Recommended Approaches

  • For Production: Cloud Platform, Dokploy Deployment, or Docker Deployment
  • Global edge acceleration: Cloudflare Workers (TanStack Start only)
  • For Dev/Test: Traditional Deployment
  • Quick Validation: Traditional Deployment

Pre-deployment Preparation

Regardless of deployment method, complete the following:

  1. Configure production environment variables
  2. Set up production database
  3. Configure domain and SSL certificate
  4. Update callback URLs to production domain

Environment Variables Checklist

.env
# Required
DATABASE_URL="postgresql://..."
BETTER_AUTH_SECRET="your-32-char-secret"
BETTER_AUTH_URL="https://yourdomain.com"

# Configure based on features needed
STRIPE_SECRET_KEY="sk_live_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
OPENAI_API_KEY="sk-..."

General Preparation

  1. Environment Variables Configuration

    # Copy environment variables template
    cp .env.example .env
    # Edit to configure actual production environment variables
  2. Database Preparation

    pnpm db:generate
    pnpm db:migrate
    pnpm db:check
  3. Health Check

    • Next.js: http://your-domain/api/health
    • Nuxt.js: http://your-domain/api/health
    • TanStack Start: http://your-domain/api/health

Choose Deployment Method

Cloud Platform

Vercel, Netlify, Railway one-click deploy

Dokploy Deployment

Self-hosted platform with Git-based deployments

Cloudflare Workers

TanStack Start global edge deployment

Docker Deployment

Docker Compose containerized deployment

Traditional Deployment

VPS server PM2 deployment

Quick Commands Comparison

OperationTraditionalDockerDokployCloud PlatformCloudflare Workers
Buildpnpm build:nextdocker build -t tinyship-next .Auto buildAuto buildvite build
Startpnpm start:nextdocker compose --profile next up -dAuto deployAuto deploywrangler deploy
View Logspm2 logs tinyship-nextdocker compose logs -fDashboard logsPlatform consolewrangler tail
Restartpm2 restart tinyship-nextdocker compose restartDashboard restartPlatform consolewrangler deploy

Feature Support Comparison

FeatureTraditionalDockerDokployCloud PlatformCloudflare Workers
Environment IsolationNoYesYesYesYes
Auto RestartYes (PM2)YesYesYesYes
Horizontal ScalingNoManualManualYesYes (auto)
Zero Downtime DeployNoManualManualYesYes
Auto BackupNoNoNoYesNo
Monitoring & AlertsManualManualManualYesYes
Global EdgeNoNoNoPartialYes

Deployment Checklist

Pre-deployment Checks

  • Environment variables configured (.env)
  • Database connection working (pnpm db:check)
  • All dependencies installed (pnpm install)
  • Application builds successfully (pnpm build:next or pnpm build:nuxt)

Post-deployment Verification

  • Application is accessible
  • Health check endpoint working (/api/health)
  • Database operations working
  • Static assets loading correctly
  • Authentication working

Production Environment Extra Checks

  • HTTPS certificate valid
  • Logging working correctly
  • Monitoring and alerting configured
  • Backup strategy implemented
  • Performance optimization completed

Getting Help

Having issues? Check the troubleshooting section for your deployment method:

  • Traditional Deployment Troubleshooting
  • Docker Deployment Troubleshooting
  • Dokploy Deployment Troubleshooting
  • Cloud Platform Troubleshooting
  • Cloudflare Workers Troubleshooting

Captcha Configuration

Configure human verification functionality

Cloud Platform Deployment

Deploy to Vercel, Netlify, Railway and other cloud platforms

On this page

Deployment Methods ComparisonRecommended ApproachesPre-deployment PreparationEnvironment Variables ChecklistGeneral PreparationChoose Deployment MethodQuick Commands ComparisonFeature Support ComparisonDeployment ChecklistPre-deployment ChecksPost-deployment VerificationProduction Environment Extra ChecksGetting Help