<!-- canonical: https://hostdc.xyz/guides/deploy-from-github · last updated 2026-09-06 · HostDC, Keep your Discord bot online 24/7. -->

# Deploy a Discord bot from GitHub

You can point a HostDC bot at a Git repository instead of uploading files by hand. We clone the branch you name, read the manifest, install your packages through our checked proxy and deploy the tree.

## 1. Point the bot at your repository

On the bot's Files tab, choose Import from Git and give:

- the repository URL, `https://github.com/you/your-bot`
- the branch, usually `main`
- a subfolder, if the bot does not live at the repository root

The repository has to be public. We don't take access tokens, so a private repository can't be imported: add its files with the Upload button on the Files tab instead.

## 2. Commit a manifest

We detect the runtime from what is in the tree:

```
package.json + package-lock.json   ->  Node.js
requirements.txt                   ->  Python
go.mod + go.sum                    ->  Go
```

A lockfile makes a deploy reproducible. Without one we still deploy, but the dependency tree can change between deploys.

## 3. Deploy

Press Deploy. The console shows the clone, the dependency install and the boot. The editor tells you when the deployed tree and the tree you are editing have drifted apart.

## 4. Redeploy after a push

Press Deploy again to pull the branch's current head. We leave your `/app` folder alone, so the files your bot wrote survive the redeploy.

## Related

- [Host a Node.js bot](/host/node)
- [Host a Go bot](/host/go)
- [Pricing and plans](/pricing)

## FAQ

### Does a push deploy automatically?
Only if you turn it on. It is off by default, so a broken commit does not take your bot down while you are away. "Deploy on GitHub push" on the bot's Settings tab deploys every push to one branch you choose, once you add the webhook it shows.

### Can I deploy a monorepo?
Yes, with the subfolder field. We ignore everything outside it, including its lockfiles.

### What if my repository is private?
The import works with public repositories on github.com and gitlab.com only. We don't take access tokens, so a private repository can't be linked. Add its files with the Upload button on the bot's Files tab instead.

### Where does the clone happen?
On the agent, never inside your bot's sandbox. The sandbox has no Git and no registry access.
