# Deploy from GitHub

> Connect GitHub, pick a repository and deploy a service with the Deploy an app wizard.

Source: https://daster.io/docs/hosting/deploy-from-github/ · Last updated: 2026-11-21

## Connect GitHub

1. Open **Hosting › Build & deploy settings**.
2. Choose **Connect GitHub** and authorize DASTER on GitHub. DASTER's GitHub App reads your repositories' contents and metadata, nothing else, and receives push and branch-delete events.
3. You come back to the step you left.

**Disconnect GitHub** on the same tab removes your GitHub grant from the project.

## Deploy an app

1. In **Hosting**, choose **Deploy an app** (or in **Compute**, **New service**).
2. **Plan** (or **Service type**): pick a web service, worker, cron job or function, and a size.
3. **Source**: search your repositories, pick one and its branch, and optionally a root directory. DASTER inspects the selected commit and fills in what it detected. It does not run any detected command at this point.
4. **Build settings**: review the install, build and start commands, the port (1024–65535) and the health check path.
5. **Variables**: add the app's variables for Development.
6. **Review**, then **Deploy to Development**.
7. Follow the build to **LIVE**. A web service shows its address on the live card, `https://<app id>.apps.daster.io`.

If you can manage Hosting, **Deploy on every push** is turned on for the new service, so the next push to its branch deploys it. See [Deploy on push and previews](https://daster.io/docs/hosting/deploy-on-push-and-previews/).

If the build fails, the page shows why, and you can retry. **Cancel build** stops a build that is still running.

## Redeploy and roll back

- **Redeploy** or **Deploy now** builds the branch again.
- **Roll back** reuses the image of an earlier deployment. It needs a sign-in within the last 10 minutes.

## Variables

| Where                                                            | Limits                                                                                                                 |
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| A service's **Variables** tab                                    | Up to 64 variables, each value at most 8,192 characters, encrypted at rest. Redeploy to apply a change.                |
| **Compute › Variables** (shared by every app in the environment) | Up to 32 variables and 64 KiB in total. A change redeploys every live app. Names starting with `DASTER_` are reserved. |

Names are `UPPER_SNAKE_CASE`, at most 64 characters. A service's own variable wins over a shared one with the same name. Values are never shown again and are not passed to build commands. Compute › Variables also lets you import a `.env` file.

> **Warning:** Log lines are redacted, but only values of 8 characters or more are searched for. Keep secrets at least 8 characters long.

Hosted apps also receive the project connection automatically; see [Connect once](https://daster.io/docs/getting-started/connect-once/).

## With the API

All routes are below `/v1/projects/{projectId}/compute` with `?organizationId=…`.

```http
POST /v1/projects/{projectId}/compute/detect?organizationId={organizationId}
Content-Type: application/json

{ "repositoryId": 123456, "branch": "main" }
```

```http
POST /v1/projects/{projectId}/compute/services?organizationId={organizationId}
Content-Type: application/json
Idempotency-Key: create-web-1

{
  "name": "web",
  "kind": "application",
  "repositoryId": 123456,
  "branch": "main",
  "commitSha": "<the reviewed 40-character commit>",
  "config": { "startCommand": "npm start", "port": 3000, "healthPath": "/health" },
  "size": "starter",
  "instances": 1
}
```

`kind` is `application`, `worker`, `cron` or `function`. Deploy again with `POST …/services/{serviceId}/deployments`; roll back with `{ "rollbackDeploymentId": "…", "confirmed": true }`.
