Skip to content

Self-host GitBucket

updated Aug 2026prices checked · Aug 2026Install verified on Ubuntu 26.04 · Aug 2026 · how we test

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

CategoryCode hosting
LicenseApache-2.0
StackScala
Min RAM1024 MB
Dockerno
Difficulty
Our recommendation

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 immediately

What you take on

GitBucket is easy to start and entirely un-opinionated about how it keeps running:

non-negotiableThere is no container path worth trusting. The official Docker image's latest tag has not been rebuilt since 2022 while releases kept shipping, which is why this entry treats the WAR as the install. That means you write the service wrapper yourself — a systemd unit, log rotation, a restart policy and a Java upgrade path are all yours, and nothing restarts it after a reboot until you do.
non-negotiableThe RAM figure on this page is our own estimate, not an upstream requirement — GitBucket does not document one. It is a JVM process, so resident memory tracks the heap you allow it rather than the size of the app; size it against your own repositories and watch it under real load instead of trusting the number here.
non-negotiableThe defaults need changing before it is reachable. First login is root / root, it serves plain HTTP on 8080 with no TLS of its own, and everything — repositories, the embedded H2 database and configuration — lives in one home directory. Change the password, put a reverse proxy in front, back up that directory, and move to PostgreSQL or MySQL through database.conf before H2 is holding a team's history.

An alternative to

More in Code hosting

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.

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.