> For the complete documentation index, see [llms.txt](https://docs.deplace.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.deplace.space/operators.md).

# Operators

This page is for whoever runs the host.

## Why a VPS

D place writes SQLite at `data/dplace.db` and files at `data/files/`. Those need a disk that survives deploys.

Put landing, intro, docs pointer, support, and `/app` on **one** VPS with a custom domain and TLS.

Vercel (or any ephemeral serverless host) is the wrong place for this binary until the database is remote (for example Turso) and files sit in object storage.

Fly.io or Render with a **persistent volume** is the same idea as a VPS.

## Environment

Copy `.env.example`.

| Variable                    | Meaning                                                                      |
| --------------------------- | ---------------------------------------------------------------------------- |
| `NIMIQ_RPC`                 | Albatross RPC used to confirm payments. Default `https://rpc.nimiqwatch.com` |
| `ESCROW_ADDRESS`            | NQ address that receives bounty prizes. Required for bounties                |
| `NEXT_PUBLIC_DOCS_URL`      | Published handbook. Live value: `https://docs.deplace.space`                 |
| `NEXT_PUBLIC_APP_URL`       | Stall origin. Live value: `https://app.deplace.space`                        |
| `NEXT_PUBLIC_SUPPORT_EMAIL` | Support mailbox for the Support page                                         |

## GitBook

Git Sync creates the site from `gitbook-docs.yaml` at the repository root. That file maps the Handbook space to `./gitbook`. Keep `gitbook/.gitbook.yaml`, `gitbook/README.md`, and `gitbook/SUMMARY.md` in place.

Published site: [docs.deplace.space](https://docs.deplace.space). That hostname is owned by GitBook DNS, not this VPS.

## Mini App URL

Point Nimiq Pay at the app host:

```
https://app.deplace.space
```

Landing stays at `https://deplace.space/`. The Mini App root is `https://app.deplace.space/` (shop). `/app` on that host redirects to `/`.

### App subdomain checklist

1. DNS at your registrar for `deplace.space`:
   * `A` record: `app` → VPS IPv4 (`169.58.20.173`)
   * Optional `AAAA` record: `app` → VPS IPv6
2. Reverse proxy (Caddy) serves `app.deplace.space` to the same Next process as the apex.
3. Rebuild after setting `NEXT_PUBLIC_*` env values. Those are baked in at build time.
4. Register the Mini App URL in Nimiq Pay as `https://app.deplace.space`.

## Process

```
npm install
npm run build
npm start
```

Bind to a reverse proxy (Caddy or nginx) that terminates TLS. Persist `data/`. Back up `data/dplace.db` and `data/files/` on a schedule you actually test.

## Hub

Desktop login and checkout open Hub popups. The public origin must be HTTPS. Allow popups for the Hub domain.

## After go-live

* Set `ESCROW_ADDRESS` to an NQ you control and can spend from for winner payouts and refunds
* Keep `NEXT_PUBLIC_DOCS_URL=https://docs.deplace.space`
* Point `app.deplace.space` DNS at the VPS and register that Mini App URL in Pay
* Set `NEXT_PUBLIC_SUPPORT_EMAIL` when the mailbox exists
* Delist any leftover duplicate live titles from early tests


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.deplace.space/operators.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
