Deploy from GitHub to a VPS, then redeploy on every push.

To deploy from GitHub to a VPS with Opslin, connect the server with one command, connect GitHub, import the repository and press Deploy. After that, a push to the same branch deploys the new version.

Last checked 29 November 2026

You need
A Linux server and a GitHub repository
Deploys on
A button press, then every push to the branch
No need for
SSH keys stored in GitHub or a workflow file
Free plan
Works, with a temporary Opslin address

Who is this guide for?

You keep your code on GitHub and want it running on your own Linux server, without SSH deploy scripts, workflow files or web server configuration.

What you need

  • A Linux server you control, with root or sudo: Ubuntu, Debian, Fedora, Alpine or Arch, on 64-bit x86 or ARM.
  • At least 1.5 GB of free disk to install the agent. 5 GB or more is comfortable.
  • About 1 GB of memory or more. Smaller servers may run out of memory during a build.
  • Outbound HTTPS (port 443). Open inbound ports 80 and 443 so visitors and SSL certificates can reach your app.
  • A GitHub repository, and permission to install a GitHub app on its account.
  • An Opslin account with a verified email. The Free plan covers 1 server and 2 apps.

What do you set up by hand, and what does Opslin do?

Deploying from GitHub to a VPS by hand and with Opslin
TaskA usual do-it-yourself setupWith Opslin
Connect GitHub and the serverCreate an SSH key and store it as a GitHub secret, or run a webhook scriptInstall the GitHub app; the server agent connects out
Deploy on pushWrite and maintain a workflow filePush to the app's branch
Build and runInstall the language runtime and a process managerBuilt and run in Docker on your server
Web address and HTTPSConfigure a web server and request certificatesA temporary address with SSL, or your own domain with one DNS record
A release that will not startLog in and restore the old versionFor a single app, the old version keeps serving
Still your jobAll of itYour code, secrets, server updates, database changes and backups

How do I deploy a GitHub repository to my VPS?

Six steps. The first two are needed only once.

  1. Connect your server

    In the dashboard, open Servers, press Add server and choose Run one command. Copy the command it shows, open a terminal on your server and paste it.

    The installer needs administrator rights. If you do not log in as root, it must run with sudo; choose your provider on that screen to get the right command.

    It installs Docker if needed and starts the Opslin agent, which connects out to Opslin. If the terminal prints a link to verify the server, open it while signed in. The link works for 1 hour.

    Choose a method, then run the command your dashboard shows.
    Check the agent on your server (systemd)
    sudo systemctl status opslin-agent --no-pager

    Prefer not to use a terminal? The connect screen also offers a password or SSH key login, and an AWS account connection for EC2.

  2. Connect GitHub

    Open Apps and press Deploy app. On the GitHub tab press Connect GitHub, install the Opslin GitHub app on your account or organisation and choose which repositories it may use.

    The repositories then appear in the list. Manage access changes the selection later.

    The GitHub tab lists the repositories you allowed.
  3. Import the repository and choose the server

    Press Import next to the repository. Opslin opens a review screen.

    Check the project name, pick your server and read any warning before you go on.

    Name the project, pick your server and press Deploy.
  4. Add environment variables

    Add the settings your app needs, such as an API address or a database URL, with Add variable before you deploy. Keep them out of the repository.

    You can change them later in the app's Environment tab, then press Save and redeploy.

    Add values in the dashboard instead of committing them.
  5. Press Deploy and watch the release

    Press Deploy. Your server fetches the code, builds it, starts the new version and checks that it responds before sending visitors to it.

    You can leave the page and the deploy keeps going. When it finishes, the app shows as Live.

    The new version takes traffic only after its health check passes.
  6. Push to deploy the next version

    Commit and push to the branch you chose. Opslin receives the push through the GitHub app and deploys that commit.

    To test before going live, open the app's Deployments tab and change Deploy mode. Fast goes live as soon as the build is ready. The safer modes run your tests first and depend on your plan.

    Send your changes (use your branch name)
    git push origin main

How do I know it worked?

  • The app shows Live, and its address opens in your browser.
  • The Deployments tab marks the new release Current.
  • The Logs tab shows runtime output without errors, and the build output of the release.
Check the response (use your app's address)
curl -I https://shop.example.com

How do I add my own domain with HTTPS?

Add the domain in the app, create one A record at your domain provider and let Opslin check it.

  1. Open the app, go to Domains, press Add domain and type the name without https://.

  2. At your DNS provider, add the A record the dashboard shows: the name (@ for the root domain) and your server's IP address.

  3. Opslin checks every minute, and Verify domain checks now. It usually takes under 10 minutes.

  4. Opslin then requests a free Let's Encrypt certificate. Ports 80 and 443 must be open. Retry HTTPS tries again.

One A record at your domain provider, then Opslin checks it.
See which IP your domain points to
dig +short shop.example.com

Custom domains on server apps need the Starter plan or higher. The Free plan gives each app a temporary Opslin address with SSL. Compare plans.

How do I roll back a bad release?

Open the app's Deployments tab, press Roll back next to an earlier successful release and confirm.

Opslin deploys that version again and re-applies your domain. The release you replaced stays in the history. Rolling back changes your code, not the data or structure of your database.

An earlier successful release can be deployed again.
Rollback by plan
PlanFreeStarterProBusiness
RollbackLimitedLast releaseAny releaseAny release

What can go wrong, and how do I fix it?

  • Git repository could not be cloned

    What it means
    Opslin could not read the repository or the branch.
    Fix
    Check that the repository is selected for the Opslin GitHub app, that the branch exists and that the app was not removed on GitHub.
  • A push did not start a deploy

    What it means
    Push deploys work for apps added from the GitHub tab, on the branch the app uses.
    Fix
    Check the branch you pushed. An app added with a Git URL does not deploy on push. If you use a safer deploy mode, Opslin waits for your tests to pass.
  • Build command failed

    What it means
    The code was fetched, but installing packages or building ended with an error.
    Fix
    Open Logs, switch to build and fix the first error. Run the same build on a clean copy on your computer, then commit and push.
  • Container crashed before health check

    What it means
    The app exited before Opslin could reach it.
    Fix
    Open Logs and read the runtime output. Common reasons are a wrong start file, a missing dependency or a missing environment variable.
  • App not listening on port

    What it means
    The app started, but nothing answered on the port Opslin expects.
    Fix
    Listen on 0.0.0.0, not localhost, and use the PORT environment variable.
  • Required environment variable is missing

    What it means
    The app started without a value it needs.
    Fix
    Add it in the app's Environment tab and press Save and redeploy.
  • Server is out of disk space

    What it means
    Docker could not write the build to disk.
    Fix
    See what is using the space and free some on the server, then deploy again.
    Free disk space
    df -h /
    Space used by Docker
    docker system df
  • Agent disconnected

    What it means
    Opslin could not reach the agent on your server.
    Fix
    Check that the server is on and the agent is running, then deploy again.
    Agent status (systemd)
    sudo systemctl status opslin-agent --no-pager
    Recent agent logs (systemd)
    sudo journalctl -u opslin-agent -n 80 --no-pager

What should I do next?

  • Node.js appsStart file, port and health check for a smooth first release.Node.js guide
  • Next.js appsBuild modes and environment variables.Next.js guide
  • How releases workWhat the server does between your push and a live app.How it works

Questions people ask

Do I need GitHub Actions to deploy to my VPS?

No. The Opslin GitHub app tells Opslin about a push and your server builds it. GitHub Actions is only used if you choose to run tests there before a release.

Does Opslin need SSH access to my server?

Not with the one-command method: the agent on your server connects out to Opslin. If you choose the password or SSH key method, the login is used for the install and is not stored.

Can I deploy a private repository?

Yes. Select it when you install the Opslin GitHub app. The Git URL tab is for public repositories.

Can I use GitLab or another Git host?

You can deploy a public HTTPS Git address from the Git URL tab. Deploying on push works with GitHub.

What happens if a new version fails to start?

For a single app, Opslin removes the new version and the previous one keeps serving. The dashboard shows why the release failed.

Is it free to deploy from GitHub to my own server?

The Free plan covers 1 server and 2 apps that you own, with deploys from GitHub. Custom domains on server apps need the Starter plan or higher. You pay your server provider separately. See pricing

Related pages

Try it with your own project.

  • Free plan: 1 server and 2 apps
  • Your server or your Cloudflare account