---
title: Deploy your documentation site
description: Publish with Thally managed hosting or deploy the open-source runtime to Vercel, Cloudflare, or Docker.
url: https://pr-6-a9c4e9fe1b6c.thally.app/guides/deploying
---

# Deploy your documentation site

Publish with Thally managed hosting or deploy the open-source runtime to Vercel, Cloudflare, or Docker.

Use Thally managed hosting when you want production releases, pull-request
previews, custom domains, rollback, and runtime upgrades managed from one
workspace. Self-host the open-source runtime when your team needs to own the
hosting layer as well as the repository.

## Publish with Thally Cloud

The [quickstart](/quickstart) creates or connects a GitHub repository and
publishes its first immutable release to a `thally.app` address. After that:

- pushes to the production branch create production candidates;
- documentation pull requests receive isolated previews;
- content-only changes can reuse a validated runtime;
- failed candidates leave the previous release online; and
- a rollback moves the route to an earlier validated release without
  rewriting Git history.

Open **Deployments** for the live release, previews, searchable history,
repairs, redeploys, and rollback. See [Managed hosting](/guides/managed-hosting)
for the complete release contract.

For a self-hosted deployment, complete the checks below and choose the provider
that matches your operational requirements.

## Before you deploy

1. Set the production origin:

   ```bash
   THALLY_SITE_URL=https://docs.example.com
   ```

2. Validate content and navigation:

   ```bash
   npx thally check --ci
   ```

3. Create a production build:

   ```bash
   npm run build
   ```

`THALLY_SITE_URL` supplies canonical links, Open Graph metadata, sitemaps, and
agent-facing URLs. Set it in the hosting provider rather than committing it to
the repository.

## Choose a self-hosted target

#### [Deploy to Vercel](/guides/deploy-vercel)

    Import the repository or deploy it with the Thally CLI.

#### [Deploy to Cloudflare](/guides/deploy-cloudflare)

    Build and publish the OpenNext Worker artifact.

#### [Deploy with Docker](/guides/deploy-docker)

    Run the site on a container host with persistent storage when needed.

## Choose the required runtime

Use a server-capable deployment for:

- API **Try It** requests;
- AI chat and remote MCP routes;
- the admin dashboard and analytics ingestion;
- password-protected documentation;
- feedback, search, and other runtime server APIs.

A fully static export is suitable only when you need rendered documentation
pages and static assets. The features above depend on server routes and will
not work in an `output: 'export'` build.

Track is managed by Thally Cloud. A managed site does not need to host a Track
webhook or store GitHub App credentials.

## Add production configuration

Only `THALLY_SITE_URL` is required for a basic public site. Add credentials and
storage variables only for features you enable. See the complete
[environment variable reference](/guides/environment-variables).

For serverless hosts, configure remote libSQL storage when analytics, settings,
task state, or rate-limit counters must survive redeploys. A Docker host or VPS
can instead persist the local `.data/` directory on a volume.

## Verify the live site

After deployment:

1. Open the homepage and one nested page on desktop and mobile.
2. Follow sidebar, search, breadcrumb, and previous/next links.
3. Check `/sitemap.xml`, `/robots.txt`, and `/llms.txt`.
4. Test any enabled server feature, including Try It, chat, feedback, admin, or
   access protection.
5. Confirm canonical URLs use the production domain.

## Next steps

- [Operate a managed deployment](/guides/managed-hosting)
- [Protect private documentation](/guides/private-docs)
- [Validate documentation in CI](/guides/ci-checks)
- [Troubleshoot a deployment](/guides/troubleshooting)