🚀 Deploying to Production
Deploying your algorithmic trading ecosystem to Cloudflare’s production edge requires careful orchestration. Because workers communicate internally using fast-path Service Bindings, they have strict compile-time and deploy-time dependencies.
This guide outlines our automated deployment sequence, Next.js OpenNext compilation steps, post-deployment URL bindings, and troubleshooting runbooks.
⛓️ The Strict Deployment Dependency Chain
When you deploy, workers must be uploaded in a specific sequence. If you attempt to deploy the public gateway (hoox) before the database or execution engines are live, the deployment will fail because the gateway’s compile-time service bindings cannot resolve their targets.
The Hoox CLI automates this dependency hierarchy:
Deployment Order Explained
⚡ Deployment CLI Commands
To execute a complete production rollout:
Deploy All Flags
🔧 Critical Post-Deployment Steps
Once hoox deploy all finishes uploading the workers, you must run three final scripts to link webhooks and sync environment databases:
Why These Steps Are Required
- Telegram Webhook Registration — Tells Telegram’s Bot API
where to send user messages. Without this, your bot will be unreachable.
- Internal URL Binding — After deployment, each worker gets a
new URL. This command updates all Service Binding references so workers can
find each other.
- KV Manifest Sync — Ensures your runtime configuration (kill
switch, rate limits, routing rules) matches the freshly deployed workers.
🖥️ Next.js Dashboard Deployment (OpenNext)
The Hoox Command Center is a modern Next.js 16 web application that runs directly on Cloudflare Workers using the OpenNext adapter.
When you run hoox deploy dashboard:
- The CLI compiles the Next.js app using the Turbopack build
engine.
- The OpenNext compiler bundles the application logic into a
single Edge-compliant V8 worker file:
.open-next/worker.js. - All static files (images, JS chunks, CSS) are isolated under
.open-next/assets/. - The CLI uses
wrangler to deploy the worker and binds the static
assets to Cloudflare’s ASSETS binding, serving pages at
sub-millisecond speeds.
Dashboard Features
Once deployed, the Command Center provides:
- Real-time portfolio value and P&L tracking
- Win rate statistics and trade history charts
- Live position monitoring with one-click close
- Risk settings adjustment (no redeploy needed)
- AI-powered trade analysis chat
🔄 Routine Update & Upgrade Workflow
To pull the latest platform releases, run local tests, and update your active production edge:
Rollback Procedure
If the new deployment causes issues:
🛠️ Post-Deployment Troubleshooting Matrix
By utilizing Smart Placement in your production builds, Cloudflare will
automatically route execution to the edge nodes located geographically closest
to your exchanges (Frankfurt, Tokyo), ensuring high-speed fills!
🔗 Next Steps