Deploy your first app

This walks through deploying a tiny Node.js app end-to-end. The same shape works for Ruby, Python, Go, PHP, anything dokku-compatible — which is essentially anything that runs on Heroku.

Before you start

  • The CLI installed and authenticated against the control plane.
  • At least one provisioned stack in your account. Create one in the dashboard (Stacks → New) for AWS, GCP, Hetzner, DigitalOcean, OVH, Contabo or OpenStack, or add an SSH stack pointing at a server you already own.
  • A repo to deploy. If you don't have one handy, scaffold this in a fresh directory:
$ mkdir hello && cd hello
$ cat > package.json <<'JSON'
{ "name": "hello", "private": true, "engines": { "node": ">=20" }, "scripts": { "start": "node index.js" } }
JSON
$ cat > index.js <<'JS'
require('http').createServer((_, r) => r.end('hello from ownstack')).listen(process.env.PORT)
JS
$ echo "web: npm start" > Procfile
$ git init -b main && git add . && git commit -m initial

1. Put the repo where the control plane can clone it

Deploys are git-based: the control plane clones your repo onto the stack. Push it to GitHub (a private repo works if your GitHub account is linked in the dashboard):

$ git remote add origin https://github.com/YOU/hello.git
$ git push -u origin main

Prefer not to use GitHub? After step 2, ownstack git push --app=hello pushes the checkout to OwnStack Git and points the app at it instead.

2. Create the app on a stack

List your stacks, then create the app on one. Run this from inside the repo: app create also links the checkout to the new app, so later commands know which app you mean.

$ ownstack stacks
$ ownstack app create hello --stack=YOUR_STACK --git-url=https://github.com/YOU/hello.git --no-services

--no-services skips the database and Redis this app doesn't need. Drop it, or pass --postgres / --redis, for apps that do. To link a different checkout to an existing app later, use ownstack remote -a hello.

3. Deploy

$ ownstack deploy --wait

The control plane enqueues a deployment job, SSHes to the stack, pushes your repo to dokku, runs the buildpack and the release task, and rotates traffic to the new container. --wait streams the build log until it finishes. Without it, fetch the log afterwards with ownstack remote deploy-log.

4. View it

$ ownstack app info hello

Open the app's URL in a browser. If something looks wrong, ownstack remote logs --tail 100 shows the last 100 lines from the running container.

What's next