Custom Apps

How to Deploy From a Private Git Repository

Point Impreza at a private repository with a Dockerfile. The agent clones it with a read-only key, builds it on your VPS and serves it with HTTPS.

Your code lives in a private repository and it should stay private. Impreza can still build it on your server: you give the platform read-only access to the repo, the agent clones it on the VPS, builds the Dockerfile and runs the result. Nothing is pushed to a registry and no source leaves your machine or your server. This guide covers the two ways to grant access and what to do after the first build.

What you get

  • A build on your own VPS from a private repo on GitHub, GitLab, Gitea, Bitbucket or a self-hosted forge
  • Read-only access through an SSH deploy key or a repo-scoped token, never your account password
  • A credential that is encrypted at rest, fetched by the agent only at clone time, and never returned by the API
  • In-place redeploys that keep the same URL, and an optional push webhook so every commit ships

Before you start

Your repository needs a Dockerfile (at the root, or anywhere you point to) and your app must listen on one port. You need a VPS with the Impreza agent online; an offshore VPS with the agent preselected at checkout is enough.

Deploy it

Choose how the agent will read the repo

Deploy key is the recommended path and works with any host that supports SSH deploy keys. You give the SSH URL, such as [email protected]:you/app.git, and Impreza generates a key pair for that deployment. Token keeps the https URL and takes a repository-scoped read token: a GitHub fine-grained token with Contents: Read, or a GitLab access token. Bitbucket users should use the deploy key.

Create the deployment

From My Apps in Advanced view, the CLI, or your AI agent, create a custom deployment in Dockerfile mode with the git URL, the branch or tag to track (default main), the Dockerfile path if it is not at the root, and the port your app listens on. Add environment variables and, if the app writes files, the paths to persist as volumes.

Add the public key to the repository

With the deploy key method, the create response includes a public key. Add it to the repository as a read-only deploy key (GitHub, GitLab, Gitea) or access key (Bitbucket). If the first build already ran and failed on the clone, add the key and redeploy in place; the URL does not change.

Watch the build

A Dockerfile build usually takes 30 to 90 seconds. The deployment moves from installing to running, and the app answers on https://<name>-xxxxxx.imprezaapps.com or on your own domain. If it fails, read the last lines of the logs from the card, the CLI or your agent; a failing RUN step or a private base image are the usual causes.

Ship every push

Once it runs, connect the repository’s push webhook so each commit to the tracked branch rebuilds and redeploys automatically. See how to auto-deploy on every git push.

Give the token the least it needs

If you use a token instead of a deploy key, scope it to that one repository and to read-only contents. Impreza stores it encrypted and only the agent on your VPS ever sees it, but a narrow token limits the damage if your own machine is compromised.

Redeploy, do not recreate

To ship a new build, redeploy the existing deployment in place. It re-clones the tracked ref at HEAD, rebuilds and swaps the container with near-zero downtime, keeping the domain and the URL. Creating a second deployment with the same name is refused; the name is unique on your account.

Resource limits and a Tor mirror

Each custom deployment gets 1 CPU and 512 MB by default; raise them when you create it if the build or the app needs more. Any custom deployment can also publish a .onion mirror, or run onion-only with no clearnet hostname at all.

Start now

Get an offshore VPS with the agent preselected, read the deploy reference at docs.imprezahost.com, or start from a public image or a compose file with deploy a Docker app to an offshore VPS.

Ready to build privacy-first?

No KYC, no email required, crypto payment. Deploy an offshore server in minutes, or do it all by chat with the Impreza agent.