Deploy your first app
This takes a few minutes: sign up, buy a block, pick a repository, open your app.
1. Sign up with GitHub#
Go to app.getctrl.dev and choose Continue with GitHub.
CTRL asks GitHub for your profile and access to your repositories. It needs the access to list your repositories, clone the one you deploy, and add the webhook that redeploys it when you push.
2. Buy blocks#
A new account starts on the billing page. Choose how many blocks you want with the stepper, then buy them through Stripe's checkout.
One block is 1 vCPU, 2 GB of RAM and 30 GB of storage, for $5 a month. One block holds about six small apps. You can change the count later on the same page.
3. Deploy a repository#
Open deploy in the dashboard and search for your repository. Pick it, then check the settings:
- branch: the branch to build. Every push to it deploys again.
- region: where it runs.
- app name: how it shows up in the dashboard.
- size: a preset (XS, S, M or L) or your own vCPU, memory and disk. The picker shows how much of your blocks it uses.
- exposed port: the port your app listens on. It's
8080unless you change it. - env vars: any environment variables your app needs.
Choose deploy. You'll see the build log as it runs.
Your app's port#
Your app must listen on the exposed port, on all interfaces (0.0.0.0), not only on localhost.
If your repository has no Dockerfile, CTRL builds one and sets PORT to the exposed port, so read it from the environment:
const port = process.env.PORT ?? 8080;
app.listen(port, "0.0.0.0");
If it has a Dockerfile, CTRL builds that as it is. Make sure the app in it listens on the exposed port.
4. Open your app#
When the deploy finishes, choose view app. Your app's page shows its address, which looks like this:
https://<your-login>-<repo>-<branch>.getctrl.dev
Open it in your browser. From the app's page you can follow its logs, change its size and environment variables, and redeploy it.
Next#
Push a commit to the branch you deployed, and watch CTRL build and roll it out.