---
title: Deployment Overview
description: Deploy your documentation to Syntext's global CDN or self-host.
icon: rocket
---

# Deployment Overview

Syntext offers multiple deployment options: managed hosting on our global CDN, CI/CD integration, or self-hosted deployment.

## Managed Hosting

The easiest option. Deploy with a single command:

```bash
stx deploy
```

Your docs are instantly available at `your-project-docs.syntext.dev`.

### Features

- **Global CDN** — 300+ edge locations via Cloudflare
- **Automatic SSL** — HTTPS enabled by default
- **Instant cache invalidation** — Changes propagate in seconds
- **Preview deployments** — Test changes before going live
- **Custom domains** — Host at `docs.yourcompany.com`
- **Analytics** — Built-in pageview and search analytics

## Deployment Options

<CardGroup cols={2}>
  <Card title="GitHub Actions" href="/deployment/github-actions">
    Auto-deploy on push to main
  </Card>
  <Card title="GitLab CI" href="/deployment/gitlab-ci">
    Integrate with GitLab pipelines
  </Card>
  <Card title="Custom Domains" href="/deployment/custom-domains">
    Host at your own domain
  </Card>
  <Card title="Self-Hosted" href="/deployment/self-hosted">
    Deploy to your infrastructure
  </Card>
</CardGroup>

## Quick Start

### First Deployment

1. Install the CLI:
   ```bash
   curl -fsSL https://get.syntext.dev | sh
   ```

2. Log in or create an account:
   ```bash
   stx login
   ```

3. Deploy:
   ```bash
   stx deploy
   ```

### Subsequent Deployments

Just run `stx deploy` again. The CLI handles building and uploading.

## Preview Deployments

Test changes without affecting production:

```bash
stx deploy --preview
```

Creates a unique URL like `preview-abc123-docs.syntext.dev`.

### Branch Previews

```bash
stx deploy --preview --branch feature/new-api
```

Creates `feature-new-api-docs.syntext.dev`.

## Environment Configuration

### API Key

Set your API key for authenticated deployments:

```bash
export SYNTEXT_API_KEY=stx_abc12345_...
```

### Project Configuration

The CLI reads project configuration from `syntext.json`. No additional setup needed.

## Deployment Status

Check current deployment status:

```bash
stx status
```

Output:

```
Project:      my-docs
Status:       Live
URL:          https://my-docs-docs.syntext.dev
Last Deploy:  2024-01-20 10:30:00 UTC
Build Time:   2.3s
```

## Rollbacks

If a deployment causes issues, rollback via CLI:

```bash
stx rollback
```

Or specify a deployment ID:

```bash
stx rollback --deployment dpl_abc123
```

## Self-Hosting

Build a static site and host anywhere:

```bash
stx build --output dist
```

Deploy the `dist/` folder to:
- AWS S3 + CloudFront
- Cloudflare Pages
- Vercel
- Netlify
- GitHub Pages
- Any static file server

<Note>
Self-hosted deployments don't include AI search, analytics, or the embedded AI assistant. These features require the managed platform.
</Note>

## Architecture

```
                    ┌─────────────────┐
                    │   Syntext CDN   │
                    │  (Cloudflare)   │
                    └────────┬────────┘
                             │
         ┌───────────────────┼───────────────────┐
         │                   │                   │
         ▼                   ▼                   ▼
   ┌───────────┐      ┌───────────┐      ┌───────────┐
   │  Edge POP │      │  Edge POP │      │  Edge POP │
   │ (London)  │      │ (Tokyo)   │      │  (NYC)    │
   └───────────┘      └───────────┘      └───────────┘
```

- Static assets cached at edge (indefinite TTL)
- HTML pages cached with instant purge on deploy
- < 50ms TTFB globally
- DDoS protection included
