# Free Hono hosting

Reverhost runs Hono, a lightweight web framework, in an always-on container built from your Dockerfile, for $0. No credit card is needed, and your agent can deploy it with one instruction.

## What you get

- An always-on container with 256 MB of RAM and 0.5 CPU
- A URL at `<app-slug>.easyhost.fun`, plus custom domains with HTTPS
- One Postgres 16 database and one S3 bucket per project
- 2 apps per project, with a 128 MB database and 256 MB of storage

## How Hono builds and runs

Every app builds from a Dockerfile stored on the app. For Hono, start from the Node.js template (`ezhst build dockerfile template node`) and adjust it.

| Step | What your Dockerfile runs |
| --- | --- |
| Build | `npm run build --if-present` |
| Start | `npm start` |
| Runtime env | `PORT=3000` and `HOSTNAME=0.0.0.0` from Reverhost, `NODE_ENV=production` from the Dockerfile |

The Node.js template works as is. Use the `@hono/node-server` adapter so Hono runs as a Node.js server, or start from the Bun template to run it on Bun.

```src/index.ts
import { serve } from "@hono/node-server";
import { Hono } from "hono";

const app = new Hono();

app.get("/", (c) => c.text("Hello from Reverhost"));

serve({ fetch: app.fetch, port: Number(process.env.PORT), hostname: "0.0.0.0" });
```

## The Dockerfile

```Dockerfile
FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN --mount=type=secret,id=appenv,target=/run/secrets/appenv sh -c 'set -a; . /run/secrets/appenv; set +a; npm run build --if-present'
ENV NODE_ENV=production PORT=3000
EXPOSE 3000
CMD ["npm", "start"]
```

The build step mounts your variables as a secret, so they are available while Hono builds without ending up in the image.

## Deploy it

Save the Dockerfile in your project folder, then run:

```
npx ezhst projects create my-project --link
npx ezhst apps create my-app
npx ezhst link --project <project-slug> --app <app-slug>
npx ezhst build dockerfile set -f Dockerfile
npx ezhst env import .env
npx ezhst deploy
```

## Limits and caveats

Bindings from Cloudflare Workers, such as KV or D1, do not exist here. Use `process.env`, the Postgres database and the S3 bucket.

Apps run in one region, with no edge network, preview deployments or Git integration. One build runs at a time per app, with up to 10 builds a day on the free plan.

## Next steps

See the [Hono hub](/frameworks/hono) for every Hono guide, or [free Hono hosting](/free-hono-hosting) for what is included. To let an agent do this for you, read [deploy Hono with Claude Code](/guides/deploy-hono-with-claude-code).

## Frequently asked questions

### Is Hono hosting on Reverhost really free?

Yes. It costs $0 per month with no credit card and no trial period, within the published limits.

### Does my Hono app sleep when idle?

No. Reverhost apps run in an always-on container and do not sleep when idle.

### Do I need a Dockerfile for Hono?

Yes. Every app builds from a Dockerfile stored on the app. Start from `ezhst build dockerfile template node`, adjust the build and start lines, and upload it with `ezhst build dockerfile set -f Dockerfile`. A Dockerfile in your repository is not used until you upload it.
