# Deploying to Vercel

There are two ways to deploy novel web in vercel. This assumes that you have the novel server set up in a different location.

1. proxy mode - use rewrites in next.config.js to proxy all routes from /api /admin /auth /docs into novel server (warning, this may be costly as you scale)
2. standalone mode - recommended. configure novel server to proxy pages and \_next from the novel server location into vercel.

It is up to your preference and comfor where you want to stage your UI and server. The mode you pick now can be changed in the future based on your need.

### Proxy Mode

You can run&#x20;

```sh
novel web use proxy
```

and it will add the relevant rewrites into your next.config.js

If you want to do it manually, the rewrites applied are below

```json
{
    "rewrites": [
    
    ]
}
```

{% hint style="warning" %}
Remember to add your custom endpoints if you have any. for example, api/v1 is available by default and if you want to add private-api/v1 into it, you need to add \[$$ $$$$$$ $$]
{% endhint %}

## Environment Variables

<table><thead><tr><th width="354"></th><th></th><th></th></tr></thead><tbody><tr><td><p>NEXT_PUBLIC_HOST</p><p></p></td><td></td><td></td></tr><tr><td><p>NEXT_PUBLIC_API_HOST</p><p></p></td><td></td><td></td></tr><tr><td>NEXT_PUBLIC_STRIPE_PUBLIC_TOKEN</td><td></td><td></td></tr></tbody></table>

|                                                   |   |   |
| ------------------------------------------------- | - | - |
| <p>NEXT\_PUBLIC\_GOOGLE\_ANALYTICS\_ID</p><p></p> |   |   |
| <p>NEXT\_PUBLIC\_SENTRY\_DSN</p><p></p>           |   |   |
| <p>SENTRY\_PROJECT</p><p></p>                     |   |   |
| <p>SENTRY\_ORG</p><p></p>                         |   |   |
| <p>SENTRY\_AUTH\_TOKEN</p><p></p>                 |   |   |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novel.dev/guides/deployment/deploying-to-vercel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
