# How to deploy an app you built in Cursor

Cursor's agent got your app working, and it runs at `localhost:3000`. Now you want a link other people can open, without leaving Cursor to learn hosting.

You can do it from the same agent chat you built the app in. Here's how, and how to let Cursor look after the live app from then on.

![Four steps in Cursor: paste one message into the agent, approve the sign-in, answer anything only you can answer, then open your link.](/blog/images/cursor-steps.svg)

## Before you start

- Your app open as a folder in Cursor, and running on your computer.
- An email address for a Toupas account. There's no card to add: every new app is free for 30 days.
- If your app has its own server, such as Express, Next.js or FastAPI, it's prepared in Docker Desktop on your computer. If that's missing, the agent says so and can install it. Websites made of files don't need it. More in [deploying without Docker](/blog/deploy-without-docker).

Use the agent running on your own computer, in Cursor's chat. Agents that run in the cloud work on a copy of your code, away from your computer, so they can't reach your Toupas sign-in or Docker Desktop.

## Step 1: Ask the agent

Open the agent chat and paste:

```
Make this app live with Toupas. Instructions: https://toupas.com/agents.md
```

The agent reads that page, installs the `toupas` program and runs it. Cursor asks before it runs terminal commands, unless you've told it not to. Read them and approve.

## Step 2: Approve the sign-in

The first time, the agent gives you a link. Open it in your browser and approve it. You do this once per computer.

## Step 3: Answer anything only you can answer

Toupas works out what your app is and how it starts. It only stops for questions it shouldn't guess, such as whether the live app should start with a copy of your local data. The agent asks you, and doesn't answer for you.

If your app keeps data in a SQLite file or saves uploads in its own folder, the agent is told to move it to Toupas's database or file storage first, and does that work. Here's [why that matters](/blog/deploy-app-with-database-and-file-uploads).

## Step 4: Open your link

You get a link like `yourapp.toupas.app`. Open it on your phone with Wi-Fi off, to see what everyone else sees.

## Let Cursor use Toupas directly

After the first time, the agent asks whether it can use Toupas's tools from now on. If you say yes, it runs:

```sh
toupas init --agents --yes
```

That adds Toupas to Cursor's list of MCP tools, and a short Toupas section to your app's `AGENTS.md`, so the agent knows the app is live on Toupas. Start a new chat to pick up the tools. You can see them, and turn them off, in Cursor's settings, under MCP.

Then you can ask in plain words:

- "Update the live app."
- "The live app shows an error when I sign in. Find out why."
- "Add my Razorpay key to the live app as a secret."
- "How many people have signed up?"

[More about the Toupas MCP tools](/blog/mcp-server-for-deploying-apps).

## Keep secrets out of your code

Your `.env` file never goes live, on purpose. Ask the agent to set each key on the live app as a secret instead. Don't let it paste keys into code, especially code that runs in the browser, where anyone can read it.

## When something breaks

Most first-time problems are the same few, such as a link that still points to localhost, or a server that only listens to your own computer. Toupas recognises many of them and tells the agent the fix. The agent can also read what the live app printed. Here are [the usual causes](/blog/why-ai-built-app-breaks-when-you-deploy).

## Questions

### How do I deploy a Cursor project?

Ask Cursor's agent to make the app live with Toupas, using the instructions at toupas.com/agents.md. It installs Toupas, you approve a sign-in, and you get a link.

### Does Cursor have built-in hosting?

Cursor is an editor, so your app needs a host to go live. With Toupas, the agent does it from the Cursor chat.

### Can Cursor's agent fix my live app?

Yes, once Toupas's tools are added. It can check whether the latest version went live, read the app's logs and update it.

### Do I need GitHub to deploy from Cursor?

Not with Toupas. Your app is sent from your computer, and only changed files are sent on each update.
