Self-host GitBucket
A Git platform that ships as a single Java WAR file — put it on a box with a JVM, run java -jar, and you have repositories, issues, pull requests and a wiki. Its two selling points are a GitHub-compatible REST API and a plugin system; it has no built-in CI runner.
Key facts
Reach for GitBucket when you already run JVM services and you want a forge with a GitHub-compatible REST API — tooling written against GitHub often points at GitBucket unchanged, which is one of the project's two stated priorities alongside ease of installation. It ships as a single WAR you start with `java -jar` on Java 17, with repositories, issues, pull requests, a wiki and a plugin system, and no CI runner. Gitea and Forgejo are the lighter, better-supported default here — one container, a much larger community, a runner included. Pick GitBucket for the API compatibility, the plugins, or because a JVM is what your team already operates.
What you need
- Any VPS with at least 1024 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- Under an hour if you've used Docker before
Install
Run these commands on your server:
# GitBucket — upstream ships a WAR, not a container. Java 17 or newer.
sudo apt update && sudo apt install -y openjdk-17-jre-headless git
sudo mkdir -p /opt/gitbucket && sudo chown "$USER" /opt/gitbucket && cd /opt/gitbucket
curl -LO https://github.com/gitbucket/gitbucket/releases/latest/download/gitbucket.war
java -jar gitbucket.war --port=8080 --gitbucket.home=/opt/gitbucket/data
# for a real install wrap that same command in a systemd unit
# → http://SERVER_IP:8080 — first login is root / root, change it immediatelyWhat you take on
GitBucket is easy to start and entirely un-opinionated about how it keeps running:
An alternative to
More in Code hosting
Forgejo
Gitea
GitLab CE
Gogs
Common questions
Can I run GitBucket in Docker?
There is a gitbucket/gitbucket image on Docker Hub, but it has not been rebuilt in years and lags the current release by several minor versions — check its tags before you rely on it. Upstream's own instructions are the WAR: install a JVM, run java -jar gitbucket.war. You can also deploy the WAR into any Servlet 3.0 container such as Jetty or Tomcat, though not a Jakarta EE one.
How GitHub-compatible is the API?
API compatibility with GitHub is one of the project's two stated priorities, alongside ease of installation, and feature requests that conflict with either are rejected on principle. That means tools written against GitHub's REST API often work against GitBucket unchanged — but it implements a subset, so verify the specific endpoints your tooling calls rather than assuming full coverage.
Where does GitBucket store its data?
In HOME/.gitbucket by default — repositories, the embedded H2 database and configuration all live there, so backing GitBucket up is copying one directory. Pass --gitbucket.home= to put it somewhere predictable like /opt/gitbucket/data, and point the database at PostgreSQL or MySQL through database.conf if H2 is not enough.
Does GitBucket have CI?
No runner of its own. You get repositories over HTTP, HTTPS and SSH, Git LFS, issues, pull requests, wikis, an activity timeline, email notifications, and LDAP-backed accounts and groups — then wire CI up externally, which is what the Jenkins integration in the wiki exists for. Plugins add gists, emoji, pages and notifications.