> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Deploy Your Own Frontend with the CLI

## Article: Quick Start from Your Own Frontend

## Article Link: https://dev.wix.com/docs/go-headless/wix-managed-headless/other-frameworks/your-own-frontend/deploy-your-own-frontend-with-the-cli.md

## Article Content:

# Deploy Your Own Frontend with the CLI

Deploy a frontend you already have as a Wix-managed headless project, keeping the web framework you built it with. Wix hosts and runs your frontend and connects it to Wix business solutions. For how this fits among the Wix-managed options, see [About Wix-Managed Headless](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-wix-managed-headless.md).

You initialize and deploy from your terminal, which is also what lets you deploy server code alongside your frontend. If your site is a static build and you'd rather skip the terminal, [upload it instead](https://dev.wix.com/docs/go-headless/wix-managed-headless/other-frameworks/your-own-frontend/upload-a-static-site.md).

<blockquote class="important">

**Important:** When you deploy your own existing frontend, Wix doesn't handle authentication for you. You create a [Wix client](https://dev.wix.com/docs/api-reference/articles/sdk-setup-and-usage/set-up-a-wix-client.md) and set up authentication yourself, the same as for [self-managed headless](https://dev.wix.com/docs/go-headless/authentication/about-authentication.md). Automatic authentication and extensions are available only with [Wix's Astro integration](https://dev.wix.com/docs/go-headless/get-started/choose-your-development-path.md).

</blockquote>

> **Using Astro?** Follow [Quick Start from an Existing Astro Project](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/get-started/connect-an-existing-astro-project.md) instead, or [Quick Start with the Wix CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/get-started/create-a-project-with-the-wix-cli.md) to scaffold a new one.

## Before you begin

Make sure:

- Your frontend is built with a [supported web framework](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-supported-frameworks.md).
- You're logged in to your Wix account.
- You have [Node.js](https://nodejs.org/en/) (v20.11.0 or higher).
- Your project isn't already linked to Wix (it doesn't contain a `wix.config.json` file).

## Step 1 | Connect your project to Wix

1. Navigate to the root of your existing project directory.
2. Run:

   ```bash
   npm create @wix/new@latest init
   ```

   This creates a new Wix Headless project and a `wix.config.json` file that links your frontend to it. If you aren't logged in, the CLI prompts you to log in.
3. Build your project with your framework's own tooling, such as `npm run build`. Releasing doesn't build your project; it uploads your existing build output.
4. Run [`npx wix release`](https://dev.wix.com/docs/wix-cli/command-reference/project-commands/release.md) to deploy your site. Releasing is the only step you repeat after making changes: build again, then release again.

### Point Wix at your build output

By default, `wix.config.json` expects your build output in `./dist`. If your framework builds to a different folder, update the path before you release. To deploy server code as well, set `outputDirectory` to an object with separate `client` and `server` paths.

Wix deploys and runs server files as long as they're built for the Cloudflare Workers runtime. For the field reference and the deploy shapes it supports, see [The wix.config.json File](https://dev.wix.com/docs/go-headless/wix-managed-headless/other-frameworks/the-wix-config-json-file.md).

## Step 2 | Set up authentication

Initializing your project creates a client ID for you, stored as the `appId` in your `wix.config.json` file. Authentication is yours to wire up, but the groundwork is already done.

To set up authentication, install the Wix JavaScript SDK and create a client with `OAuthStrategy`, passing the `appId` from `wix.config.json` as your client ID. Follow [Create an SDK Client with OAuth](https://dev.wix.com/docs/go-headless/authentication/setup/create-an-sdk-client-with-oauth.md).

For more information on handling site visitors and members, see [About Authentication for Self-Managed Headless](https://dev.wix.com/docs/go-headless/authentication/about-authentication.md).

## Continue developing

After your project is set up, keep building:

- **Develop with an AI agent.** Point your agent at the Wix Headless skill to finish setup and integrate Wix business solutions. For more information, see the [Headless AI Toolkit](https://dev.wix.com/docs/go-headless/get-started/headless-ai-toolkit.md).
- **Manage business data in the dashboard.** Manage products, bookings, blog posts, forms, members, and more directly from your project dashboard. No code required.
- **Preview and deploy with the CLI.** Your project supports `npx wix preview` to test locally, `npx wix release` to publish, and global commands like `npx wix login`. These are currently the only CLI commands available for this kind of project. See the [CLI command reference](https://dev.wix.com/docs/wix-cli/command-reference/introduction.md).

For more ways to build on your project, see [Develop Your Project](https://dev.wix.com/docs/go-headless/wix-managed-headless/develop-your-project.md).

## See also

- [About Supported Frameworks](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-supported-frameworks.md)
- [Develop Your Project](https://dev.wix.com/docs/go-headless/wix-managed-headless/develop-your-project.md)
- [The wix.config.json File](https://dev.wix.com/docs/go-headless/wix-managed-headless/other-frameworks/the-wix-config-json-file.md)
- [About Authentication for Self-Managed Headless](https://dev.wix.com/docs/go-headless/authentication/about-authentication.md)
- [About Wix-Managed Headless](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-wix-managed-headless.md)