The deploy command is a one-shot workflow that creates a pod (if it doesn’t exist), syncs your local code, installs dependencies, and reloads the app service.
Basic Usage
# Deploy current directory (auto-detects preset)
instapods deploy myapp
# Deploy a specific directory
instapods deploy myapp --local ./src
# Explicit preset
instapods deploy myapp --preset nodejs
# Skip reload (just sync files)
instapods deploy myapp --no-reload
What Happens
- Pod check — If the pod doesn’t exist, it’s created (and the CLI waits for it to be running)
- File sync — Local directory is uploaded to the pod’s app root
- Reload — App service is restarted, dependencies auto-installed (skip with
--no-reload)
If the pod already exists, the command skips creation and goes straight to syncing.
Flags
| Flag | Description | Default |
|---|
--local | Local directory to sync | Current directory (.) |
-p, --preset | Preset: static, php, nodejs, python | Auto-detected |
--no-reload | Skip reloading app service after sync | false |
--exclude | Patterns to exclude from sync (repeatable) | node_modules, .git, .env, __pycache__, .DS_Store |
-r, --region | Target region | Auto-select |
--plan | Plan slug | launch |
--ssh-key | SSH public key or path | None |
--timeout | Max seconds to wait for pod creation | 120 |
Preset Auto-Detection
If --preset is omitted, the CLI scans your local directory for signature files:
| Files Found | Detected Preset |
|---|
package.json, tsconfig.json, yarn.lock, next.config.js, etc. | nodejs |
composer.json, *.php, artisan, wp-config.php | php |
requirements.txt, pyproject.toml, manage.py, app.py, *.py | python |
index.html, *.html | static |
Detection checks in order: Node.js, PHP, Python, Static. The first match wins.
Examples
# Deploy a Node.js app (new pod)
instapods deploy my-api
# →
# → Deploying my-api
# → Detected nodejs (package.json)
# →
# → Creating pod ······································ ✓ 1.2s
# → 42 files uploaded ································· ✓ 0.8s
# → Reloading ········································· ✓ 1.4s
# → npm deps installed · service active · HTTP 200
# →
# → ✓ Deployed in 3.4s
# → → https://my-api.nbg1-1.instapods.app
# Re-deploy to an existing pod
instapods deploy my-api
# →
# → Deploying my-api
# → Pod exists (nodejs · running)
# →
# → 42 files uploaded ································· ✓ 0.6s
# → Reloading ········································· ✓ 1.1s
# → npm deps installed · service active · HTTP 200
# →
# → ✓ Deployed in 1.7s
# → → https://my-api.nbg1-1.instapods.app
# Deploy to a specific plan and region
instapods deploy staging-api --preset python --plan build -r eu-nbg
# Deploy without reload (just sync files)
instapods deploy my-site --local ./dist --no-reload
# Deploy with custom excludes
instapods deploy myapp --exclude "*.log" --exclude "tmp"
Reload is on by default — it auto-installs dependencies from package.json or requirements.txt before restarting the service. Use --no-reload to skip this step if you only want to sync files.