Deploy your first app
In this guide you deploy a one-file app, open it, and share it with one other person. It takes about 5 minutes.
Before you start
Section titled “Before you start”- Install the CLI.
- Sign in. The first time, the dashboard asks you to accept the terms of service. You can’t approve the CLI’s sign-in until you have.
Deploy and share an app
Section titled “Deploy and share an app”-
Create a workspace.
Every app lives in a workspace, and signing up doesn’t create one. Pick a short name, called a slug, of up to 30 lowercase letters, digits and single dashes. It goes into every app’s name and address.
Terminal window jiayang workspace create acmeCreated workspace acme. You're its owner.Slugs are unique across Jiayang Cloud. If someone already has
acme:error: That short name is taken by another workspace, or one deleted in the last 30 days. Pick another.A new workspace starts on the Free plan. See Workspaces and roles for what a workspace holds.
-
Write an app.
Make a directory called
hellowith one file,index.js:hello/index.js export default {async fetch(request) {// For display only. To decide what someone may do, verify the identity token with an SDK.const email = request.headers.get("x-jiayang-email") ?? "there";return new Response(`Hello, ${email}.\n`);},};A directory with an
index.jsand nopackage.jsondeploys as a Worker, with nothing to install or build. Check what the CLI sees:Terminal window jiayang detect ./helloa Workerbecause it has index.js -
Deploy it.
Terminal window jiayang deploy acme/hello ./hello --createa Workerbecause it has index.jsVersion 1 (8b217ef9bf3c) is live.https://hello--acme.jiayang-apps.cloudacme/hellois the workspace, then the app’s own slug.--createcreates the app if it doesn’t exist yet. The app is private, so only you can open it. The last line is its address,https://<app>--<workspace>.jiayang-apps.cloud. -
Open it.
Open the address in your browser. The first time, you’re sent to sign in to the dashboard, then back to the app, which says:
Hello, ada@example.com.jiayang open acme/helloprints the address again. To call the app from the terminal as yourself:Terminal window jiayang curl acme/helloHello, ada@example.com.200 OK -
Share it.
Terminal window jiayang share acme/hello grace@example.comgrace@example.com can now use acme/hello as a viewer.Grace gets an email with the app’s address. She signs in with a code sent to her email and sees
Hello, grace@example.com.She doesn’t need to be in your workspace, and she can’t see anything else in it.Anyone you haven’t shared the app with gets
404 not foundafter they sign in, even members of your workspace. In a browser they see Nothing to open here, the same page as for an app that doesn’t exist.See who has access:
Terminal window jiayang access acme/helloowner ada@example.comviewer grace@example.comYou own the app because you created it. To take access away, run
jiayang unshare acme/hello grace@example.com. Access ends within 60 seconds, open connections included.
Deploy again
Section titled “Deploy again”Run the same command after every change. --create does nothing once the app exists, so you can leave it in:
jiayang deploy acme/hello ./hello --createa Worker because it has index.jsVersion 2 (c02ed76b2040) is live.https://hello--acme.jiayang-apps.cloudVersion 1 may still answer some requests for a minute or two, until this one reaches every location.Each deploy makes a new version, and it goes live when the upload finishes. jiayang versions acme/hello lists them:
2 deployed 2026-09-23 ada@example.com (live) 1 deployed 2026-09-23 ada@example.comjiayang rollback acme/hello 1 puts version 1 back. See Versions and rollback.
In a script, use --json to get the result as JSON, with the address in url and the version in number:
jiayang --json deploy acme/hello ./helloIf something goes wrong
Section titled “If something goes wrong”Deploying to an app that doesn’t exist, without --create:
error: App acme/hello not found, or it isn't shared with you. `jiayang app list acme` shows the apps you can see. If it doesn't exist, `jiayang deploy acme/hello <dir> --create` creates it. If that says the name is taken, ask a workspace owner or admin to share it with you. `jiayang workspace list` shows your workspaces.The Free plan allows three apps:
error: This workspace has 3 apps. The Free plan allows 3. Delete one or upgrade. Team allows 25 apps. Billing: https://app.jiayang.cloud/w/acme/billingA server in a container (Python, Go, Rust, or a Node server) on the Free plan:
error: The Free plan only runs JS and static apps. Container apps, like Python, Go, Rust and Node servers, need a paid plan. Team runs container apps. Upgrade the workspace at https://app.jiayang.cloud/w/acme/billingYour role in the workspace, or on the app, doesn’t allow the change:
error: You don't have permission to do that.The app is shared with you, but you aren’t in its workspace. Sharing lets you open an app, not deploy to it:
error: acme/hello is shared with you and you can open it. You aren't in the acme workspace, though, so you can't see or change anything else about it. `jiayang app list --shared` lists what's shared with you@example.com.Not signed in:
error: You're not signed in. Run `jiayang login`.The app deployed, but answers with a 500 or Cloudflare’s error 1101. Your app threw an exception, and its log shows it:
jiayang logs acme/helloSee Logs.
Next steps
Section titled “Next steps”- Start from a template: an app that checks who is calling, a team list with a database, or an Express or FastAPI server.
- How deploy decides what to build, for anything bigger than one file.
- Check who is calling with an SDK, instead of reading a header.
- Share an app: roles, and opening an app to the whole workspace.
- Use with your AI agent, so your agent can deploy for you.