# Deploy an Astro app to production

> This guide assumes that you have already installed Clerk in your application locally and are ready to deploy. If you haven't installed Clerk yet, see [the quickstart guide](https://clerk.com/docs/astro/getting-started/quickstart.md).

This guide will walk you through the steps to deploy your Astro app to production.

## Deploy your Clerk app to production

Follow the [guide on deploying your Clerk app to production](https://clerk.com/docs/guides/development/deployment/production.md).

## Deploy to a hosting platform

To deploy to a hosting platform, it's recommended to choose one of the [official adapters](https://docs.astro.build/en/guides/server-side-rendering/#official-adapters) Astro offers. While the Node.js and Cloudflare adapters work out-of-the-box with Clerk, the Netlify and Vercel adapters have caveats. See the following sections for more information.

### Netlify

Due to Netlify's caching strategies, one of Clerk's core mechanisms is unable to work as expected, resulting in infinite redirects that cause an app to fail. This also affects preview environments that use **development** API keys. It's recommended to use [production API keys with a new domain](https://clerk.com/docs/guides/development/managing-environments.md#acquire-an-additional-root-domain).

Additionally, read [this section](https://clerk.com/docs/guides/development/deployment/astro.md#issues-with-edge-middleware) about **Edge middleware**.

### Vercel

Read [this section](https://clerk.com/docs/guides/development/deployment/astro.md#issues-with-edge-middleware) about **Edge middleware**.

## Issues with Edge middleware

The Netlify and Vercel adapters allow developers to convert the Astro middleware to an Edge middleware.

Currently, this is expected to not work for the following reasons:

- Our Astro SDK populates `Astro.locals.auth` with a function that cannot be serialized.
- For developers using Astro and React, SSR would not work as expected, as `clerkMiddleware` uses Async Local Storage, and it's stored value will not persist across the runtimes.

---

## Sitemap

[Overview of all docs pages](https://clerk.com/docs/llms.txt)
