Deploy from Git
Deploy from Git copies the code from a public repository onto your new server the first time it starts. It saves you running git clone by hand.
What it does
When you launch a server you can switch on the optional Git section. At first boot the server downloads your repository into /opt/app. That is all it does: it fetches the code. It does not install dependencies, build, or start your application. You do that yourself, or with a startup script.
Use it
- Open Launch instance and choose your size and image.
- In the Git section, turn on Deploy from Git.
- Pick the provider: GitHub, GitLab, Bitbucket, or Other.
- Paste the repository's https:// address and, if you need one, a branch. The branch defaults to main.
- Launch. Once the server is running, your code is in /opt/app.
What is supported
- Public repositories only. The server cannot sign in to a private repository.
- HTTPS addresses only. Addresses with a query string or fragment are refused, and the form tells you why before you launch.
- The address must match the provider you chose.
⚠️ Never put a password or access token in the repository address. Anything in the address can end up in logs. If your code needs credentials, add them to the server after it starts.
ℹ️ For private code, connect to the server and clone it yourself with a deploy key. See Connecting to your server.
After first boot
Connect to the server and check the files are there:
ls /opt/app
If the folder is empty, check the address and branch you entered. You can reinstall the server to try again; reinstalling erases the disk.