Deploy from Git
Setup
- Add a
captain-definitionfile to your repository. - Create the CapRover app.
- In its deployment settings, enter the repository URL, branch, and credentials.
- Save and copy the generated webhook URL.
- Add that URL as a push webhook in your Git provider.
- Push a commit. Check the CapRover deployment logs.
Private repositories: Use a read-only SSH deploy key or a limited service account. For SSH, generate a dedicated key with ssh-keygen -t ed25519 -f ./deploykey -N "". Add deploykey.pub to the repository as a deploy key. Enter the SSH clone URL and the contents of deploykey in CapRover.
GitHub webhook: Choose application/json and the push event. Leave GitHub’s separate Secret field empty.
Important:
- A webhook push makes CapRover fetch the configured branch and build the app.
- Treat the webhook URL as a secret.
- Repository URL formats, SSH keys, and webhook screens depend on your provider.
- For reproducible builds away from the server, use CI/CD to deploy an image.