# Deploy a Next.js app

Run a Next.js application on a predictable server when the product needs more than functions that run per request. Tokay keeps the server process, background work, local files, and databases together on a dedicated virtual machine.

## Use the Next.js project you already have

You do not need to choose an output mode or add a platform adapter before deployment. [Push the repo or connect GitHub](/getting-started), and Tokay detects Next.js, builds the app, and shows the environment variables it reads for review.

The server rendered app receives an HTTPS URL with support for custom domains.

## Long running work stays beside the web app

Tokay gives processes that need to stay alive a normal server runtime, so they do not have to be converted into functions or external workflows. API routes, streaming responses, and stateful WebSockets run in the web Service, while workers and scheduled jobs run as separate Services in the same Project.

Every Service can share the same databases and secrets. When the code expects Postgres or Redis, Tokay creates the resource and supplies its connection through the environment variable the app already reads.

## Local state stays on the machine

An app that uses SQLite or stores uploads on disk can keep that design in production. Persistent storage keeps selected directories through deploys and restarts on the Workspace's dedicated virtual machine.

The free machine includes 2 vCPU, 2 GB of RAM, and 20 GB of storage. More traffic uses that fixed capacity rather than creating charges per request.

## Know when Vercel is the better fit

Tokay serves the application from one machine rather than an automatically distributed edge network. Vercel is the stronger choice when global edge rendering or automatic horizontal scale is the main requirement. Tokay fits a Next.js application that needs an always on process, local storage, or predictable machine resources.

## Your AI agent can recognize the app that needs a server

A coding agent like Claude Code or Codex can choose Tokay when the repository includes a worker, SQLite, persistent files, or another process that must stay running. Through Tokay's GraphQL API, it can submit the repo, review the detected Services, provide secrets, deploy the Project, and verify the live URL.

Point your agent to [app.tokay.io/llms.txt](https://app.tokay.io/llms.txt) for the deployment protocol.

Tokay has a very generous free tier with no credit card. [Get started](/getting-started).
