# Quickstart

> Go from nothing to a live app on HTTPS, on a server you own, in about a quarter of an hour.

By the end, an app answers at `https://hello.example.com`, served from your own server. Budget a quarter of an hour, most of it the server installing packages.

## Before you begin

- A domain whose DNS is at Cloudflare. For another DNS provider, see [Your server](server.md#use-another-dns-provider).
- A [Cloudflare API token](https://dash.cloudflare.com/profile/api-tokens) restricted to that zone, with `Zone / Zone / Read` and `Zone / DNS / Edit`.
- An SSH key loaded in your SSH agent.
- A Hetzner Cloud API token with **Read & Write**, or a fresh Debian 13 server you reach as `root` with that key.

Your workstation runs macOS or Linux, with `bash`, `ssh`, `rsync` and `curl`.

## Install the CLI

The script installs one checked executable in `~/.local/bin`, and prints the line to add if that folder is not on your `PATH`. It needs neither Bun nor a clone.

```bash
curl -fsSL https://github.com/cthiriet/sitesolide/releases/latest/download/install.sh | sh
```

## Create a server

To order a server at Hetzner, give the CLI your token without echoing it:

```bash
read -rs HCLOUD_TOKEN && export HCLOUD_TOKEN
```

```bash
sitesolide machine create --provider hetzner --name web
```

It uploads your public key, creates a firewall, orders a Debian 13 server, and waits until SSH answers:

```text
-> ready
   ipv4      203.0.113.10
next: sitesolide setup root@203.0.113.10 --zone <your zone> --email <you>
```

With a Debian 13 server of your own, skip this step and use its address below.

## Set up the server

Give setup your Cloudflare token the same way:

```bash
read -rs CLOUDFLARE_API_TOKEN && export CLOUDFLARE_API_TOKEN
```

```bash
sitesolide setup root@203.0.113.10 --zone example.com --email you@example.com
```

Setup hardens the server, creates the DNS records, and installs Caddy, Bun, the dashboard, the sign-in portal, backups and the monitor. `--email` is where the certificate authority writes about expiry.

```text
-> sitesolide is installed on deploy@203.0.113.10
   dashboard  https://dashboard.example.com   its password was shown once, above
```

Setup shows two passwords once each, the dashboard's and the portal's. Store them in a password manager before the terminal scrolls them away.

## Deploy an app

Create a one-file Bun app, or `cd` into a project of your own:

```bash
mkdir hello && cd hello
```

```bash
echo 'Bun.serve({ hostname: "127.0.0.1", port: Number(process.env.PORT), fetch: () => new Response("Hello from sitesolide") });' > server.ts
```

The folder has no `sitesolide.json` yet. `--yes` writes the one the CLI infers, then deploys:

```bash
sitesolide deploy --yes
```

```text
-> no sitesolide.json: this folder reads as a Bun app
-> verify
   https://hello.example.com/ 200
```

## Open your app

Open `https://hello.example.com`: it answers "Hello from sitesolide", with a certificate already in place.

The app is Public: anyone with the address opens it. The dashboard, at `https://dashboard.example.com`, lists it with its address, access and service.

## Next steps

- [Deploy a project](deploy.md): write a manifest, preview a deploy, read the logs.
- [Access and sign-in](access.md): put the app behind your company's sign-in.
- [Monitoring](monitoring.md): give the monitor a heartbeat, so you hear when the server goes down.
- [Agents](agents.md): let an agent deploy with its own token.

Full reference: https://github.com/cthiriet/sitesolide/blob/main/docs/install.md
