Deployment
CLI: Before You Start
Prerequisites for the CLI path: accounts, source access, local tools, and Wrangler login.
Last updated Mar 19, 2026
This chapter covers preparation before you run any deployment commands. Do not skip it.
1. What you are deploying
ZShip is not a single-page project. It includes:
- 10 backend Workers
- 2 frontend apps (
webandadmin) - 9 D1 databases
- 1 KV namespace (payment service)
- 1 R2 bucket (CDN service)
You are deploying a Cloudflare-based system, not just one website.
2. Accounts you need
At minimum:
- A Cloudflare account
- A copy of the Git repository
- A machine with Node.js
Optional:
- Stripe account (for payments)
- Creem account (for Creem payments)
- Google OAuth app (for Google login)
3. How to get the source code
Option A: GitHub Fork
- Fork the official template into your GitHub account or organization
- Clone your fork locally
Advantages: Keeps upstream relationship; easier to sync future updates.
Option B: Copy and create your own repo
- Download the official code
- Create a new Git repository
- Push the code there
Advantages: Cleaner history; feels like your own project from day one.
We recommend GitHub Fork for long-term maintenance.
4. Install local tools
Ensure you have:
- Node.js 22 or newer
- pnpm
- Git
Verify:
node -v
pnpm -v
git --version
5. Clone and install dependencies
git clone <your-repository-url>
cd zship
pnpm install
6. Log in to Wrangler
npx wrangler login
After authorization, verify:
npx wrangler whoami
7. Do not change on first deployment
- Workers: Keep names like
zship-node1-auth,zship-node2-support, etc. - Pages: Keep
webandadmin - app_key: Use
demofirst; switch to your real key after the system works
8. Checklist
Before continuing, confirm:
- [ ] You have decided Fork vs. copy
- [ ] Repository is cloned locally
- [ ]
pnpm installcompleted - [ ]
npx wrangler loginandnpx wrangler whoamisucceed - [ ] You will keep default service names on first pass
