# Open your app in the Console

Turn on the Console endpoint of your app, deploy it, and link it in [console.vitehub.dev](https://console.vitehub.dev) with the public key that the Console gives you.

## Choose the console option

| `console` | Development server | Production build |
| --- | --- | --- |
| Not set | The [Operations endpoint](https://vitehub.dev/docs/console/development), for this machine only. | Nothing under `/_vitehub`. |
| `false` | Nothing under `/_vitehub`, so `vitehub kv`, `vitehub schedule run`, and the other commands cannot reach it. | Nothing under `/_vitehub`. |
| `true` or an object | The Console endpoint, with your access policy. | The same. `auth: false` is refused. |

## In development

```bash [Terminal]
pnpm vitehub project get
pnpm vitehub kv list
```

The Console calls each app from its own server, so it cannot reach a `vite dev` server on your machine. Until you deploy, the [`vitehub` commands](https://vitehub.dev/docs/cli) call the dev server's Operations endpoint instead.

## Link a deployed app

Set `console: true` and deploy your app:

### Nuxt

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  modules: ['vite-hub/nuxt'],
  vitehub: {
    console: true,
  },
})
```

### Nitro

```ts [vite.config.ts]
import { defineConfig } from 'vite'
import { vitehub } from 'vite-hub'
import { nitro } from 'nitro/vite'

export default defineConfig({
  plugins: [vitehub({
    console: true,
  }), nitro()],
})
```

### Vite

```ts [vite.config.ts]
import { defineConfig } from 'vite'
import { vitehub } from 'vite-hub'

export default defineConfig({
  plugins: [vitehub({
    console: true,
  })],
})
```

Sign in to the Console and enter your app URL in **Get started**, or later with **+** next to **Apps**. Set the variable that it shows on your server, deploy again, and select **Check connection**:

```txt
VITEHUB_CONSOLE_KEY_CONSOLE_3F9A12BC=<public key>
```

The Console names each app by the **Name** that you give it when you link it. Without one, it uses the name that the app reports, from its `package.json`. Owners and admins can rename an app from the menu of its row on Home.

The Console keeps the private key of each link encrypted and [signs](https://vitehub.dev/docs/console/signed-requests) every call with it. Your app and the browser never see it. Each link has its own variable, so the app can keep other keys beside it, such as the key of the CLI. To unlink, unlink the app in the Console and remove its variable.

When your app uses a base path from Nuxt `app.baseURL` or a root-relative Vite `base`, every Console route moves under it. With `base: '/portal/'`, the endpoint is `/portal/_vitehub/rpc` and you link `https://app.example.com/portal`.

> **Note**

The Console does not turn on [Comments](https://vitehub.dev/docs/comments). Add `server/comments.ts` or set `comments: true` to get the Comments section. To limit who can use each section, see [Console access](https://vitehub.dev/docs/console/access).

## Teams and members

Sign in with GitHub or a passkey. Each account has a personal team. You can create more teams and invite people under **Members**, so the team's apps open wherever a member signs in. **Settings** holds your name, GitHub sign-in, and passkeys. Invitations are links that you send yourself, because the Console sends no email.

## Self-host the Console

The Console is the [`@vite-hub/console`](https://github.com/vite-hub/vitehub/tree/main/packages/console) package. It runs on Node.js with SQLite, on Cloudflare Workers with D1, or on Vercel with hosted libSQL, and its README covers how to build, configure, and deploy it.

<!-- vitehub-docs:section-links -->
## In this section

- Start
  - [Overview](https://vitehub.dev/raw/docs/console.md)
  - [Get started](https://vitehub.dev/raw/docs/console/get-started.md) (this page)
- [Use the Console](https://vitehub.dev/raw/docs/console/sections.md)
- [Secure it](https://vitehub.dev/raw/docs/console/access.md)
- [Agents and tools](https://vitehub.dev/raw/docs/console/mcp.md)
- [Reference](https://vitehub.dev/raw/docs/console/limits-and-errors.md)

Next: [Sections](https://vitehub.dev/raw/docs/console/sections.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
