The short answer
-
In your Next.js project, run
npx ezhst skill installand choose Global or Local. -
Tell your agent:
Deploy this to Reverhost. If it does not discover the skill, ask it to read the installedSKILL.mdfirst. -
Open the URL it gives you:
https://<name>.easyhost.fun.
You need Node.js with npx and a Next.js project that has a build script. You do not need a Git remote. Every app builds from a Dockerfile stored on the app, and the agent can start from the Node.js template for you.
Deploy with Claude Code
Install the Reverhost instructions, then ask Claude Code to read the installed file before deploying.
npx ezhst skill install
Choose Local to create .agents/skills/reverhost/SKILL.md in the current project, or Global to create ~/.agents/skills/reverhost/SKILL.md. Pass --local or --global to skip the prompt. You can commit a local install to share it with your team.
For a local install, ask:
Read .agents/skills/reverhost/SKILL.md, then deploy this to Reverhost.
For a global install, use ~/.agents/skills/reverhost/SKILL.md in that prompt.
Deploy with Cursor, Codex or another agent
Run the same installer and choose Global or Local. Both choices use .agents/skills. For an agent running the command without prompts, supply the scope explicitly:
npx ezhst skill install --local --json
Use --global instead of --local for all projects. If your agent does not discover the skill, ask it to read the installed SKILL.md or https://reverhost.com/skill.md before deploying.
Then give the agent the same prompt. Any agent that can run shell commands can use the CLI, because every command accepts flags instead of interactive prompts.
What the agent actually runs
A first deploy usually looks like this. Every command prints JSON on stdout, so the agent reads results instead of scraping text.
npx ezhst whoami --json npx ezhst register --name "Ada" --email [email protected] --password "..." --json npx ezhst verify 123456 --json npx ezhst projects create my-app --link --json npx ezhst env import .env --json npx ezhst build dockerfile template nextjs --json npx ezhst build dockerfile set -f - --json <<'EOF' FROM node:22-alpine AS build ... EOF npx ezhst deploy --json
-
Check who is logged in
If nobody is, the agent asks you for an email and password and registers or logs in. After registering, it asks for the 6-digit code emailed to you and runs
verify, which is required before any other command. -
Create and link a project
Each app has its own subdomain within the project. A
.reverhost.jsonfile records the link. -
Import environment variables
.envfiles are never uploaded, so the agent imports them explicitly. -
Set a Dockerfile
The agent prints the Node.js template, changes the last line to
next start -H 0.0.0.0 -p $PORTand saves it to the app. A Dockerfile in your repository is only used once it is uploaded this way. -
Deploy
The CLI packages the source (without
node_modules,.next,.gitand.env*), uploads it, and Reverhost builds the stored Dockerfile and starts the app.
A successful deploy returns the deployment id, the status RUNNING and the URL.
Ask for a database, storage or a domain
The same skill covers the rest of the platform, so follow-up prompts work without more setup:
Add a Postgres database and run my Prisma migrations
Runs db create, reads the connection string, sets DATABASE_URL, migrates and redeploys.
Store avatar uploads in a bucket
Runs storage create and sets the S3 endpoint, bucket and keys as env vars.
Put this on www.example.com
Runs domains add, tells you the DNS record to set, then verifies and issues HTTPS.
The full command list is in the docs.
When a build fails
This is where an agent earns its keep. A failed deploy exits with code 1 and a JSON error, and the full build log is one command away:
npx ezhst deployments log --json
The agent reads the log, fixes the cause and deploys again. The common causes:
| Symptom | Fix |
|---|---|
| An environment variable is missing at build time | ezhst env set KEY=VALUE, then ezhst redeploy |
npm ci says the lockfile is out of sync | Delete node_modules and package-lock.json, run npm install, deploy again |
| The app has no Dockerfile | ezhst build dockerfile template nextjs --apply, then adjust it and ezhst redeploy |
| The app lives in a monorepo subfolder | ezhst build set --root-dir apps/web |
| The project needs a different Node version | Change the FROM line in the stored Dockerfile and send it back with ezhst build dockerfile set -f -, then ezhst redeploy |
CI and agent sandboxes
Where there is no saved login, such as a CI job or a cloud agent sandbox, pass a token in the environment instead:
EZHST_TOKEN=<token> npx ezhst deploy --json
Without a terminal the CLI never waits for input. If a value is missing it fails with a message naming the flag, which is what an agent needs to correct itself.
What the agent will not do on its own
Frequently asked questions
Can Claude Code deploy a Next.js app by itself?
Yes. With the Reverhost skill installed, Claude Code can register or log in, create a project, set environment variables, deploy and read build logs using the ezhst CLI.
Does this work with Cursor and Codex?
Yes. Run npx ezhst skill install and choose Global or Local. Both install into .agents/skills. If the agent does not discover the skill, ask it to read the installed SKILL.md or skill.md.
Is it free to deploy this way?
Yes. Reverhost is free with fixed limits: 3 projects, 256 MB of RAM and 0.5 CPU per app, and no credit card.
Do I need an MCP server?
No. The agent uses a normal command line tool through its shell. There is nothing to run in the background.
Start for free
Install the skill, choose Global or Local, then tell your agent to deploy. No credit card, no config files.
$npx ezhst skill install