> ## Documentation Index
> Fetch the complete documentation index at: https://craftspace.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install

> Docker, a release binary, or from source.

Craftspace is one process. It serves the API, the web app, the MCP endpoint and the connection gateway,
and it runs its own Postgres (PGlite) inside itself. There is nothing to install alongside it.

## Docker

```sh theme={null}
docker run -d --name craftspace \
  -p 8080:8080 \
  -v craftspace-data:/data \
  -e CRAFTSPACE_URL=https://craftspace.example.com \
  --restart unless-stopped \
  ghcr.io/abuaboud/craftspace:latest
```

`/data` is the whole durable surface: the database, the generated secrets, the unpacked assets. Back up
that volume and you have backed up the install.

To build the image yourself, `docker build -t craftspace .` from a checkout.

## Binary

Each release carries a single executable for `linux-x64`, `linux-arm64` and `darwin-arm64`. It holds the
server, the web app, PGlite's wasm and every extension bundle.

```sh theme={null}
curl -fsSL -o craftspace \
  https://github.com/abuaboud/craftspace/releases/latest/download/craftspace-linux-x64
chmod +x craftspace
CRAFTSPACE_URL=https://craftspace.example.com ./craftspace supervise
```

`craftspace supervise` starts the app, restarts it if it dies, and can swap itself for a newer version
from the Settings screen. `craftspace serve` runs the server alone, without the supervisor.

Data goes under `CRAFTSPACE_HOME`, which is `/data` in production and `~/.craftspace` otherwise.

## Behind a proxy

The app speaks plain HTTP on `8080` and does not terminate TLS. Put Caddy, nginx, Traefik or a cloud load
balancer in front of it.

<Note>
  Forward `X-Forwarded-Proto` and `X-Forwarded-Host`. The auth layer builds callback URLs from the host it
  was reached on, and a proxy that drops those headers produces sign-in redirects pointing at the wrong
  origin.
</Note>

An example with Caddy:

```caddy theme={null}
craftspace.example.com {
  reverse_proxy 127.0.0.1:8080
}
```

## From source

```sh theme={null}
git clone https://github.com/abuaboud/craftspace.git
cd craftspace
npm install
npm run build
npm start
```

Node 22 or newer. See [local development](/development/local-dev) for the watch-mode setup.
