# Quickstart

> Create a project, deploy a first page to it, and open it at its own HTTPS address, from the console or the HTTP API.

Source: https://docs.fortly.com/quickstart

This walks you through the shortest path to something live: a project with one HTML page in it. The same project already has its own PostgreSQL database, file storage and address, so once the page is up you can build on it rather than start again.

You need a Fortly account. Each step shows the console and the API side by side; pick one and stay with it.

## Deploy your first page

### Create a project

A project name uses lower-case letters, digits and hyphens, is at least 2 characters long, and cannot start or end with a hyphen.

**Console**

Open [console.fortly.com](https://console.fortly.com) and choose **New project**. Choose **Upload an archive**. Keep this panel open while you prepare the archive in the next step; the project is created when you confirm the deployment.

**API**

Make an API token first: in the console, open **Settings**, find **API tokens** and choose **Create token**. The secret starts with `fly_` and is shown only once. See [API tokens](https://docs.fortly.com/account/tokens).

```bash
export FORTLY_TOKEN=fly_...

curl -X POST https://api.fortly.com/projects \
  -H "Authorization: Bearer $FORTLY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-app"}'
```

The reply is `201 Created` with the new project (trimmed here):

```json
{
  "name": "my-app-ada",
  "label": "my-app",
  "host": "my-app-ada.fortly.com",
  "url": "https://my-app-ada.fortly.com",
  "state": "stopped"
}
```

`label` is the name you chose. `name` is that name joined to your account name, and it is what every other route takes. Keep it:

```bash
export PROJECT=my-app-ada   # the "name" from your reply
```

### Make something to deploy

A folder with an `index.html` at its top is a static site. Fortly serves it straight away, with nothing to install, build or start.

```bash
mkdir site
echo '<h1>Hello from Fortly</h1>' > site/index.html
```

### Deploy it

**Console**

Zip the contents of `site` so that `index.html` is at the top of the archive, not inside a folder. Drop the `.zip` onto **Drop your archive here** (or use **Choose file**). Choose **Continue**, enter `my-app` as the project name, then select **Create and deploy**. These steps stay in the same panel.

For an existing project, open **Deployments**, choose **Upload an archive**, and finish with **Deploy release**. The success panel offers **Open your app**.

The console accepts `.zip` and `.tar.gz` archives up to 256 MB.

**API**

A release is a gzipped tar of the directory you want served, sent as the raw request body.

```bash
tar -C site -czf release.tgz .

curl -X POST "https://api.fortly.com/projects/$PROJECT/deploys" \
  -H "Authorization: Bearer $FORTLY_TOKEN" \
  --data-binary @release.tgz
```

A static site goes live inside the request, so the reply is `201 Created` with the release under `deploy` and the project's address under `url`. A release that has to be built first returns `202 Accepted` with `"building": true` instead, and the build carries on after the request ends.

### Open it

**Console**

The address is at the top of the project's page. Open it and you see your heading.

**API**

```bash
curl https://my-app-ada.fortly.com
```

```text
<h1>Hello from Fortly</h1>
```

Use the `url` from your own reply; the part after `my-app-` is your account name.

**Agent**

Connect your agent once by pasting this into it. It adds Fortly and asks you to sign in:

```text
Connect me to Fortly: fetch https://docs.fortly.com/agent-setup.md and follow the instructions for this agent.
```

Then ask: "What is the address of my-app, and what is its latest deployment?" The agent reads your projects, releases and logs through the access you grant when you sign in. See [Connect an AI agent](https://docs.fortly.com/agents/mcp).

## What you have now

| Part | Where it is |
|---|---|
| Your page | Served at `https://my-app-<account>.fortly.com` |
| A PostgreSQL database | The project's **Data** tab, and the data APIs |
| File storage | The project's **Storage** tab, served at `/_files/…` on the same address |
| Release history | The project's **Deployments** tab, or `GET /projects/{name}/deploys` |

> **Ship a change:**
>
> Deploy again the same way. The new release replaces the live one, and the previous one stays in the history so you can put it back. If a build fails, the release that was live stays live.

## Next steps

- [Deploy your app](https://docs.fortly.com/deploy): Deploy from GitHub, deploy a framework that needs building, and set the start command.
- [Use the database](https://docs.fortly.com/data): Create tables and read and write rows from your server and your frontend.
- [Add your domain](https://docs.fortly.com/domains): Point your own domain at the project and serve it over HTTPS.
- [Core concepts](https://docs.fortly.com/concepts): How projects, releases, data, files and credentials fit together.
