---
title: Hono on Vercel
description: Deploy Hono applications to Vercel with zero configuration. Learn about observability, ISR, and custom build configurations.
url: "https://vercel.com/docs/frameworks/backend/hono"
last_updated: 2026-11-14
related:
  - /docs/git
  - /docs/deployments/environments
  - /docs/cli/init
  - /docs/deployments/deploy-without-logging-in
  - /docs/services
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# Hono on Vercel

Hono is a fast and lightweight web application framework built on Web Standards. You can deploy a Hono app to Vercel with zero configuration.

## Get started with Hono on Vercel

Start with Hono on Vercel by using the following Hono template to deploy to Vercel with zero configuration:

Vercel deployments can [integrate with your git provider](/docs/git) to [generate preview URLs](/docs/deployments/environments#preview-environment-pre-production) for each pull request you make to your Hono project.

### Get started with Vercel CLI

Get started by initializing a new Hono project using [Vercel CLI init command](/docs/cli/init):

```bash filename="terminal"
vc init hono
```

This will clone the [Hono example repository](https://github.com/vercel/vercel/tree/main/examples/hono) in a directory called `hono`.

## Exporting the Hono application

To run a Hono application on Vercel, create a file that imports the `hono` package at any one of the following locations:

- `app.{js,cjs,mjs,ts,cts,mts}`
- `index.{js,cjs,mjs,ts,cts,mts}`
- `server.{js,cjs,mjs,ts,cts,mts}`
- `src/app.{js,cjs,mjs,ts,cts,mts}`
- `src/index.{js,cjs,mjs,ts,cts,mts}`
- `src/server.{js,mjs,cjs,ts,cts,mts}`

```ts filename="server.ts"
import { Hono } from 'hono';

const app = new Hono();

// ...

export default app;
```

### Local development

To run your Hono application locally, use [Vercel CLI](https://vercel.com/docs/cli/dev):

```filename="terminal"
vc dev
```

This ensures that the application will use the default export to run the same as when deployed to Vercel. The application will be available on your `localhost`.

## Deploy without an account

To deploy your Hono app without an account or login, run this command in the project root:

```bash filename="terminal"
vercel deploy --temporary
```

The CLI builds the project, deploys it to production, and prints a claim URL. Claim the project to keep it live. See [Deploying without logging in](/docs/deployments/deploy-without-logging-in).

## Deploy with a frontend

Use [Vercel Services](/docs/services) to deploy a Hono backend and a frontend in one project. Configure [service routing](/docs/services/routing) to expose the backend at a public path, or use [service bindings](/docs/services/bindings) for private calls from the frontend's server code.

## Middleware

Hono has the concept of "Middleware" as a part of the framework. This is different from [Vercel Routing Middleware](/docs/routing-middleware), though they can be used together.

### Hono Middleware

In Hono, [Middleware](https://hono.dev/docs/concepts/middleware) runs before a request handler in the framework's router. This is commonly used for loggers, CORS handling, or authentication. The code in the Hono application might look like this:

```ts filename="src/index.ts" framework="hono"
app.use(logger());
app.use('/posts/*', cors());
app.post('/posts/*', basicAuth());
```

More examples of Hono Middleware can be found in [the Hono documentation](https://hono.dev/docs/middleware/builtin/basic-auth).

### Vercel Routing Middleware

In Vercel, [Routing Middleware](/docs/routing-middleware) executes code before a request is processed by the application. This gives you a way to handle rewrites, redirects, headers, and more, before returning a response. See [the Routing Middleware documentation](/docs/routing-middleware) for examples.

## Protect an internal API

Use Vercel Passport to require sign-in through your company's identity provider before requests reach your Hono app. Passport requires an Enterprise plan. Follow the [Hono Passport guide](/kb/guide/vercel-passport-backend-frameworks#hono) to verify visitor identity and authorize access within your app.

## Serving static assets

To serve static assets, place them in the `public/**` directory. They will be served as a part of our [CDN](/docs/cdn) using default [headers](/docs/headers) unless otherwise specified in `vercel.json`.

[Hono's `serveStatic()`](https://hono.dev/docs/getting-started/nodejs#serve-static-files) will be ignored and will not serve static assets.

## Vercel Functions

When you deploy a Hono app to Vercel, your server routes automatically become [Vercel Functions](/docs/functions) and use [Fluid compute](/docs/fluid-compute) by default.

### Streaming

Vercel Functions support streaming which can be used with [Hono's `stream()` function](https://hono.dev/docs/helpers/streaming).

```ts filename="src/index.ts" framework="hono"
app.get('/stream', (c) => {
  return stream(c, async (stream) => {
    // Write a process to be executed when aborted.
    stream.onAbort(() => {
      console.log('Aborted!');
    });
    // Write a Uint8Array.
    await stream.write(new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f]));
    // Pipe a readable stream.
    await stream.pipe(anotherReadableStream);
  });
});
```

## Run scheduled tasks

Use [Cron Jobs](/docs/cron-jobs) to call a Hono route on a schedule. Configure the route and schedule, then check the request's `Authorization` header against your `CRON_SECRET` environment variable before running the task. See the [Hono cron job example](/kb/guide/ship-a-hono-app-on-vercel#run-scheduled-tasks-with-cron-jobs).

## Monitor and debug requests

Use [Runtime Logs](/docs/functions/logs) to inspect application output and errors, and [Observability](/docs/observability) to investigate request duration and failures. See [monitoring Hono with Observability](/kb/guide/ship-a-hono-app-on-vercel#monitor-performance-with-observability) for details.

## More resources

Learn more about deploying Hono projects on Vercel with the following resources:

- [Hono templates on Vercel](https://vercel.com/templates/hono)
- [Build with a Hono starter template](/kb/guide/build-with-a-hono-starter-template)
- [How to ship a Hono app on Vercel](/kb/guide/ship-a-hono-app-on-vercel)
- [Backend templates on Vercel](https://vercel.com/templates?type=backend)

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
