Run Duskly
Self-host on Cloudflare
Your accounts, posts, and media live in your Cloudflare account. Self-host mode removes Duskly subscription limits; infrastructure and provider charges can still apply.
Before you start
- Node 24.15+ in the 24.x line and pnpm 9.15.0.
- Cloudflare Workers, D1, KV, R2, Queues, Analytics Engine, Workers AI, and Email Service access.
- Two subdomains of a domain you control: one for the web app and one for the API.
- A verified email sender for production sign-in codes.
Deploy a new instance
Create two subdomains in a Cloudflare-managed zone, such as social.example.com and api.example.com. Verify the sender you will use for email sign-in in Cloudflare Email Service. Then run this one command:
git clone https://github.com/sarmaasis/duskly.git && cd duskly && \ pnpm install --frozen-lockfile && pnpm setup
pnpm setup opens Cloudflare login when necessary, asks for the two URLs and verified sender, creates D1, KV, R2, and queues, generates the two stable secrets, attaches the custom domains, migrates D1, and deploys both Workers. The secrets are never printed. The generated .env.deploy is ignored by Git—keep it for future updates.
Example answers
Instance name: duskly-acme Web URL: https://social.acme.com API URL: https://api.acme.com Verified sender: Acme Social <noreply@acme.com>
When setup completes, open the web URL, request an email code, finish onboarding, connect one account, and send one test post. For an existing instance, do not run setup again; use pnpm deploy:release.
Verify and maintain
Check /healthz on your API and /__api-config.js on your web app. Sign in, connect an account, and confirm an actual test post publishes. Back up D1, R2, and your secrets before upgrades. Worker rollback restores code, not database migrations.
GitHub deployment is opt-in through the repository variable DEPLOY_ENABLED=true, after credentials and resources are ready. It uses the same release command and waits for successful push CI.