Skip to main content

cubby deploy

Deploy your app to the Cubby platform. This command packages your source code, uploads it, builds a Docker image, and starts your container.

Usage

cubby deploy [directory] [flags]

Arguments

ArgumentDescriptionDefault
directoryPath to the app directory. (current directory)

Flags

FlagShortDescriptionDefault
--name-nApp name (overrides directory name)Directory name
--yes-ySkip confirmation prompts (auto-confirm redeploy)false
--verbose-vShow detailed build logsfalse
--port-pPort the app listens on3000

Examples

# Deploy current directory
cubby deploy

# Deploy a specific directory
cubby deploy ./my-app

# Deploy with custom name
cubby deploy --name myapp

# Deploy and auto-confirm redeploy
cubby deploy --yes

# Deploy with verbose build logs
cubby deploy --verbose

What Happens During Deploy

  1. Authentication check - Verifies you’re logged in
  2. Dev container detection - Prompts to stop local dev containers if running
  3. Framework detection - Auto-detects Next.js, Vite, Remix, or Node.js
  4. Dockerfile generation - Creates optimized Dockerfile if not present
  5. Packaging - Creates tarball of source code (respects .gitignore)
  6. Upload - Sends tarball to Cubby servers
  7. Build - Docker image built on remote server
  8. Database provisioning - Creates Postgres database if Prisma detected
  9. Migration - Runs prisma db push automatically
  10. Container start - Launches your app with injected secrets
  11. Health check - Verifies app responds on configured port

App Name Rules

App names are used in URLs (<app>.<username>.cubby.pro) and must follow DNS rules:
  • 3-30 characters
  • Lowercase letters, numbers, and hyphens only
  • Must start and end with a letter or number
  • No consecutive hyphens
Invalid names are automatically normalized (spaces and special characters become hyphens).

Redeploying

When deploying an app that already exists:
$ cubby deploy
App "myapp" already exists.
Redeploy? [y/N]
Use --yes to skip this confirmation:
cubby deploy --yes

Deploy Output

A successful deploy shows:
Deploying myapp to Cubby
Directory: /Users/you/projects/myapp

Detected Next.js (high confidence)
Packaged 142 files (1.2 MB)
Upload complete
Building Docker image...
Starting container...
Deployment complete!

Your app is live at:
https://myapp.yourname.cubby.pro

Troubleshooting

”Could not detect framework”

Cubby auto-detects common frameworks. If detection fails:
  • Ensure package.json exists with correct dependencies
  • Or provide your own Dockerfile in the project root

”Build failed”

Run cubby check first to validate your project locally:
cubby check
This runs the same validations as the deploy process.

”Not logged in”

Authenticate first:
cubby login

Verbose Build Logs

If deployment fails, use --verbose to see detailed build output:
cubby deploy --verbose