Before you start
- A Raff account and a project to create the app in.
- A GitHub account that can reach the repository.
- For a website, API or private service: an app that listens on the port in the
PORTvariable. It is 8080 unless you set another port.
Steps
1
Open the create page
Go to Apps and click New service. The Deploy an app page asks where your code is. Choose GitHub.
2
Connect GitHub
Click Continue with GitHub, sign in, and choose the repositories Raff may see. Raff sees only the repositories you share with it. You do this once per account.

3
Pick the repository
Find the repository under Your repositories and click Import. Raff starts from the repository’s default branch.A repository is missing? Click Share more on GitHub to give Raff access to it, then Don’t see it? Refresh from GitHub.
4
Name it and say what it is
Under App, set the Name. Names are unique within a project. For a website, Address shows the https address the app gets, made from the name.Under What it is, pick one:
See App types for how each one runs.
5
Pick a size
Under Size, pick the CPU and memory for each instance. You can change it any time; the app restarts on the new size.
6
Add a database (optional)
Under Database, keep No database, or pick Postgres, free or Postgres to create one with the app. Raff links it before the first deploy, so
DATABASE_URL is already set. See Add a Postgres database to an app.7
Check the build (optional)
The line above the app’s name shows what Raff found in the repository: Dockerfile found, or the stack it detected.Under Optional, open Build and start to change the Branch, the Folder (when the app lives in a subfolder of the repository), the Dockerfile path, the Start command or the Port. Open Environment variables to paste a 
.env file, one KEY=value per line. See Set app environment variables.
8
Deploy
Check the Summary on the right and click Deploy.
- Pay-as-you-go account: the app is created at once and billed by the second from your balance while it runs.
- Monthly account: you pay at checkout, then Raff builds the app and starts it.
Verify
The app page shows the First deploy steps: Got the code, Building, Starting and Live. A first build takes a few minutes. You can leave the page; the deploy goes on. Raff marks the app Live only once it answers on its port, or on its health check path when it has one. Open the address to see it. If the deploy fails, the app page says why in plain words, for example a failed build with the last lines of its build log.After the first deploy
- Every push deploys. Push to the branch and Raff builds and deploys the new commit. The Deploys tab lists each deploy with its build log.
- Roll back. On the Deploys tab, Roll back returns to an earlier deploy that went live. Redeploy at the top of the page runs the live deploy again; it does not fetch a new commit. See Roll back a deploy.
- Change the branch or folder in Settings > Repository.
- Previews. Turn on Preview environments in Settings and every open pull request gets its own address, rebuilt on every push. The number of previews depends on the app’s size, and previews never get the app’s database link. See Preview pull requests.
- Lost GitHub access. If Raff loses access to the repository, the app page shows a banner and the app keeps running its last deploy. Give Raff access again on GitHub and click Reconnect GitHub. See Reconnect GitHub to Raff Apps.
Use the API
Connecting GitHub needs your own GitHub sign-in, so create the app in the dashboard. After that, follow its deploys with the API, for example the ones your pushes start:status (queued, building, deploying, live, superseded, failed or canceled) and, when it failed, an error that says why. Read a deploy’s build log:
SERVICE_ID is the app’s ID from List app services. See List deployments and Get deployment build logs.
Use the CLI
raff apps list shows each app’s ID.
Next steps
Add a Postgres database
Link Postgres and get
DATABASE_URL.Add a custom domain
Serve the app on your own domain.
Set environment variables
Add settings and secrets.
App types
Websites, workers, private services and jobs.