# Quickstart

Checked against the code on 2026-10-30 (version 0.1.0).

SeeDropHost publishes sites that are already built: one HTML file, a `.zip` or a folder. There is no public hosted instance yet, so the first step is to run a server — on your computer (below) or on a VPS ([self-host guide](/docs/self-host/)).

> **Note:** billing for hosted plans opens with the first public server ([pricing](/pricing/)). Everything below runs on your own machine at no cost from us.

## 1. Run the server

Requires Node.js 24 (it runs TypeScript directly, no build step).

```bash
git clone <repository-url> seedrophost && cd seedrophost
npm install
npm run dev
```

Development mode (`SDH_DEV=1`) uses the token `dev-token` and serves:

- dashboard and API: `http://localhost:8787`
- sites: `http://<site>.localhost:8787`

In the commands below, set:

```bash
export SDH_API_URL=http://localhost:8787
export SDH_TOKEN=dev-token
```

## 2. Create a site

```bash
curl -X POST "$SDH_API_URL/v1/sites" \
  -H "Authorization: Bearer $SDH_TOKEN" -H "content-type: application/json" \
  -d '{"name":"my-site"}'
```

Or `npx sdh create my-site`. Names: lowercase letters, digits and hyphens, up to 63 characters, no `--`.

## 3. Publish — pick one of three ways

### A single HTML file

```bash
curl --data-binary @index.html -H "content-type: text/html" \
  -H "Authorization: Bearer $SDH_TOKEN" \
  "$SDH_API_URL/v1/sites/my-site/deploys/html"
```

The file becomes `/index.html` of the site.

### A .zip

```bash
curl --data-binary @site.zip -H "content-type: application/zip" \
  -H "Authorization: Bearer $SDH_TOKEN" \
  "$SDH_API_URL/v1/sites/my-site/deploys/zip"
```

If everything in the zip sits inside one top-level folder, that folder becomes the root of the site.

### A folder (CLI)

```bash
npx sdh deploy ./dist --site my-site
```

Expected output (numbers vary):

```text
✓ deploy dpl-… pronto em 0.4s
  12 arquivos, 12 enviados (o resto já estava guardado)
  prévia:  http://dpl-…--my-site.localhost:8787
  no ar:   http://my-site.localhost:8787
  SEO/GEO: nota 91/100, 3 ponto(s) a melhorar
```

The CLI and API messages are in Brazilian Portuguese today. Run the same command again: `0 enviados` — only changed files upload.

## 4. Read the result

The API answer (and `npx sdh deploys my-site`) includes:

- `urls.site`: the live address; `urls.deploy`: the address of this exact deploy.
- `deploy.report.seo.score` (0–100) and `issues`: what to fix for search engines and AI answers.
- `deploy.report.forms`: forms found in the HTML.
- `deploy.report.rules.problems`: lines of `_redirects` / `_headers` that were not understood.

## 5. Draft first, then publish

Add `?draft=1` (API) or `--draft` (CLI). Nothing changes for visitors; you get a preview URL served with `noindex`.

```bash
npx sdh deploy ./dist --site my-site --draft
npx sdh publish my-site dpl-…
```

## Undo

Every deploy stays available. To roll back, publish an earlier one:

```bash
npx sdh deploys my-site           # find the previous deploy id
npx sdh publish my-site dpl-previous
```

## Without an account (if the server allows it)

When the operator starts the server with `SDH_ANON_DROP=1`, anyone can publish without a token. The site lives for 24 hours unless it is claimed.

```bash
curl --data-binary @site.zip -H "content-type: application/zip" "$SDH_API_URL/v1/drop"
# or: npx sdh drop ./dist
```

The answer has `url`, `expires_at` and a `claim_token` that is shown only once. Claim it with a token: `npx sdh reivindicar <claim_token> --nome my-site`. Anonymous sites are never indexed and do not accept form submissions. See [Limits](/docs/limits/).

## Next

- [HTTP API](/docs/api/) · [CLI](/docs/cli/) · [MCP for agents](/docs/mcp/)
- [Migrate from Netlify](/docs/migrate-from-netlify/) · [Self-host on a VPS](/docs/self-host/)
