- Click Deploy to Cloudflare Workers and connect your GitHub account. Pick a name for the new repository, Worker and D1 database.
- In the setup form, set
JWT_TOKENto a strong random value of at least 32 characters. A password generator works. Keep the same secret on upgrades, and never commit it to Git. Leave the deploy command set tonpm run deployso D1 migrations run before deployment. - After deploying, open
/ui/on your Worker URL and register your account before sharing the URL. The first registered account becomes an administrator. Point the Waline client at the Worker base URL.
Cloudflare creates the D1 database and updates its ID in the new repository. The initial build and future deploys apply only pending migrations. You do not need to install Wrangler or run anything locally for the button flow.
Use Node.js 22.12 or newer, copy .dev.vars.example to .dev.vars, then fill it with a separate test secret. The local database and secret are not used in production.
npm ci
npm run db:migrate:local
npm run dev点击上面的按钮,登录 Cloudflare、授权 GitHub,填写项目及数据库名称,并设置 JWT_TOKEN。使用密码生成器生成至少 32 个字符的随机密钥,以后更新时保留原值。部署命令保留为 npm run deploy,Cloudflare 会创建并绑定 D1,先执行迁移再部署,无需本地命令行。部署后先访问 Worker 地址的 /ui/ 注册管理员,再将 Worker 根地址填到 Waline 客户端的 serverURL。