You have a VPS and an app on GitHub. Getting it online usually means installing Docker, writing a Dockerfile, setting up a reverse proxy, managing TLS certificates and writing your own deploy script, then doing it all again for every change.
This guide shows a shorter path with Raklane, a Platform as a Service (PaaS) that runs on your own server. By the end, every git push to your branch deploys on its own, over HTTPS, with an automatic rollback if the new release misbehaves.
Time needed: about 15 minutes.
What you need
- A VPS running Ubuntu 20.04+ or Debian 11+, from any provider. 1 vCPU and 1 GB is enough to try it: builds run on Raklane, not on your server.
- Root or
sudoaccess over SSH. - A public IPv4 address of the server's own. Plans where many servers share one public IP (port forwarding only) aren't supported. Setting Up a BYOC Server shows how to check.
- Ports
80and443open, including in your cloud provider's firewall, not only inside the server. - A Git repository with your app, on GitHub, GitLab or Bitbucket.
- A Raklane account. Sign up here. No credit card.
You don't need Docker installed beforehand. The install command takes care of it.
Step 1: Connect your VPS
-
In the Raklane dashboard, open Clusters and click Add server.
-
Name the server (say,
prod-vps-1), pick its provider, and click Continue. -
Copy the install command shown. It looks like this, with your own token:
curl -fsSL https://api.raklane.com/install/agent-install.sh \ | sudo bash -s -- --token=YOUR_TOKEN --control-plane=https://api.raklane.com -
SSH into your VPS and run it.
It installs Docker, Caddy (for HTTPS) and the Raklane Node Agent, opens ports 80/443 in ufw if it's on, and registers your server. It's safe to run again if it stops halfway.
Back in the dashboard, click I've run the command, then Check now. Once all three checks pass, the server shows Healthy and is ready for deploys.
Raklane never SSHes into your server. The agent opens an encrypted connection from your server to Raklane, and you keep full root access.
Step 2: Link your repository
Create a new app from the dashboard:
- Source: paste the repository URL and pick a branch, such as
main. A private repository needs an access token, once; see Secrets → Private repositories. - Settings: add the environment variables your app needs, like
DATABASE_URL. See Environment Variables. - Location: on the Review step, choose BYOC and pick the server you just connected.
No Dockerfile needed. Raklane builds your app with Cloud Native Buildpacks, which recognise common languages and frameworks. If your repository has a Dockerfile, Raklane can use that instead.
Step 3: Your first deploy
Click Deploy. Raklane then:
- Builds a container image from your code, on Raklane's machines, not your VPS.
- Starts the new replicas on your server and waits for them to pass a health check.
- Moves traffic over only once they're healthy. If the health check fails, the old release keeps serving: no downtime.
- Keeps the previous release on standby for a short while, and rolls back on its own if the new one fails during that window.
Follow along on the Status page. When the release is active, your app is live over HTTPS at its default address, such as https://your-app.203.0.113.10.byoc.raklane.com.
Step 4: Auto deploy on every push
This is where the time savings are: auto deploy is on by default. After the first deploy, Raklane checks your app's branch regularly and deploys every new commit. It works with GitHub, GitLab, Bitbucket and any other Git host, with nothing to set up.
Try it:
git commit -am "Update the home page copy"
git push origin main
Open the app's Settings page. The Automatic checks panel shows the new commit being found and deployed.
Want deploys within seconds?
Add a GitHub webhook, so GitHub tells Raklane about a push the moment it happens instead of waiting for the next check:
-
On the app's Settings page, click Generate secret in the Instant deploys with a GitHub webhook panel, and copy the secret.
-
In GitHub, open your repository's Settings → Webhooks → Add webhook and fill in:
Field Value Payload URL https://api.raklane.com/v1/webhooks/githubContent type application/jsonSecret The secret from step 1 Events Just the push event -
Push a commit. The deploy starts within seconds.
Prefer to review changes before they ship? Switch the deploy mode to Manual Deploy with Diff. Auto-Deploy & Deploy Modes has the details.
Next steps
- Use your own domain. Add it and point its DNS at your server; HTTPS is handled for you. See Custom Domains.
- Add a database. Postgres or MySQL on the same server, reachable only by your apps. See Running Apps & Databases on BYOC.
- Watch the server. CPU, memory, network and disk, per app and per container. See Metrics & Processes.
Something not working? BYOC Troubleshooting covers the usual suspects, from cloud firewalls to expired tokens.