---
title: Deploy
description: Put your Hollware on your Cloudflare account with one command, then create your site in the remote database.
section: start
order: 4
---

# Deploy

Hollware deploys to your own Cloudflare account as a Worker, with a D1 database, a KV namespace and two queues. The Workers free plan is enough to start.

## Log in and deploy

```sh
npx wrangler login
npm run deploy
```

`npm run deploy` runs `hollware deploy`, which:

1. deploys the Worker with wrangler. The first time, wrangler creates the database, the namespace and the queues that `wrangler.jsonc` names, and writes their ids into it;
2. sets `HOLLWARE_PUBLIC_URL` in `wrangler.jsonc` to the URL of the Worker, and deploys again with it;
3. applies the migrations to the remote database.

Commit `wrangler.jsonc` afterwards: it now holds the ids and the public URL.

## Create your site

The remote database starts empty. Create your site and its owner in it, with the key of the site in `hollware.config.ts`:

```sh
npx hollware init --site my-site --remote
```

It prints a token for your agents and a link to set up your passkey on the deployed admin.

## Your own domain

To serve Hollware at a domain of yours, add it in the Cloudflare dashboard as a custom domain of the Worker, then deploy with it as the public URL:

```sh
npx hollware deploy --url https://cms.example.com
```

`HOLLWARE_PUBLIC_URL` matters: Hollware answers only requests for that host, and refuses every other one. That is its guard against DNS rebinding.

## Check it

```sh
npx hollware doctor --remote
```

It checks the flags, the bindings, the migrations and the owner, and says what to fix.

::callout{type="note"}
Updating Hollware is an update of its packages and a deploy: `hollware deploy` applies the new migrations. Before it applies anything to a database that already has data, it exports a backup to `.wrangler/hollware-backups`.
::
