Self-Hosted Alternatives to Bitbucket

Why Replace Bitbucket?

Atlassian has steadily pushed Bitbucket users toward higher-priced tiers while discontinuing self-hosted options:

  • Bitbucket Server discontinued. Atlassian ended sales of Bitbucket Server (self-hosted) in February 2024 and will end support entirely in February 2027. If you’re running Bitbucket Server, migration is mandatory.
  • Bitbucket Data Center pricing. The only remaining self-hosted option costs $2,300/year for 25 users. At 500 users, you’re paying $67,000/year.
  • Cloud pricing escalation. Bitbucket Cloud Standard costs $3/user/month. Premium is $6/user/month. For 50 users, that’s $3,600/year — for a Git host.
  • Pipeline minutes. Free tier: 50 minutes/month. Standard: 2,500 minutes. Premium: 3,500 minutes. Self-hosted alternatives: unlimited.
  • Atlassian ecosystem lock-in. Bitbucket’s value proposition is integration with Jira and Confluence. Once you use one Atlassian product, switching any piece gets harder.
  • Mercurial support dropped. Atlassian removed Mercurial support from Bitbucket in 2020, forcing all Mercurial users to migrate. This demonstrated willingness to break backward compatibility for business reasons.

Best Alternatives

Forgejo — Best for Most Teams

Forgejo provides pull requests, issue tracking, CI/CD (Forgejo Actions), package registries, and container registries — covering everything Bitbucket Cloud offers except Jira integration. At ~100 MB of RAM, it runs on hardware Bitbucket Data Center couldn’t touch.

For teams migrating from Bitbucket’s built-in CI Pipelines, Forgejo Actions uses GitHub Actions-compatible syntax. Most Bitbucket Pipeline workflows can be translated to Actions syntax in an afternoon.

Read our full guide: How to Self-Host Forgejo

GitLab CE — Best for Enterprise Teams

If your team relies on Bitbucket + Jira for project management, GitLab CE replaces both with a single platform. GitLab’s built-in issue boards, milestones, and epics provide project management that Forgejo doesn’t match. GitLab CI is more mature than Forgejo Actions for complex multi-stage pipelines.

The tradeoff: GitLab CE needs 4+ GB of RAM and more operational attention.

Read our full guide: How to Self-Host GitLab CE

Gitea — Established Lightweight Choice

Same capabilities as Forgejo (they share a codebase). Choose Gitea if you prefer commercial support from Gitea Ltd. Choose Forgejo for community governance.

Read our full guide: How to Self-Host Gitea

OneDev — Best Single-Binary Option

OneDev bundles Git, CI/CD, issues, and kanban boards into a single Java application. No external runners needed — CI builds run in local Docker containers. Good for small teams who want minimal operational complexity.

Read our full guide: How to Self-Host OneDev

Migration from Bitbucket

Repository Migration

Forgejo, Gitea, and GitLab CE all include Bitbucket migration tools:

Forgejo/Gitea:

  1. Go to New Migration → Bitbucket
  2. Enter your Bitbucket username and app password
  3. Select repositories

GitLab CE:

  1. Go to New Project → Import project → Bitbucket Cloud
  2. Authenticate with Bitbucket credentials
  3. Select repositories

Both import: repository content (branches, tags), issues, pull requests, and wiki content.

Manual Migration (Any Platform)

For a clean repository transfer:

# Clone from Bitbucket with all branches and tags
git clone --mirror https://bitbucket.org/team/repo.git

# Push to your self-hosted instance
cd repo.git
git remote set-url origin https://git.yourdomain.com/team/repo.git
git push --mirror

CI/CD Pipeline Translation

Bitbucket Pipelines use a YAML syntax that doesn’t directly translate to other platforms. Key differences:

ConceptBitbucketForgejo ActionsGitLab CI
Config filebitbucket-pipelines.yml.forgejo/workflows/*.yml.gitlab-ci.yml
Stepsstep:jobs: / steps:stages: / script:
Docker imageimage:container:image:
Cachingcaches:actions/cache@v3cache:
Artifactsartifacts:actions/upload-artifact@v3artifacts:
Parallelparallel:Matrix strategyparallel:

Cost Comparison

Bitbucket FreeBitbucket StandardForgejoGitLab CE
Monthly (25 users)$0 (5 users max)$75/month$0$0
Annual (25 users)N/A$900/year~$36/year (VPS)~$72/year (VPS)
CI/CD50 min/month2,500 min/monthUnlimitedUnlimited
LFS storage1 GB5 GBYour diskYour disk
Private reposUnlimited (5 users)UnlimitedUnlimitedUnlimited
Data locationAtlassian CloudAtlassian CloudYour serverYour server

What You Give Up

  • Jira integration. Bitbucket’s deepest value is Jira linking — commit messages auto-reference tickets, branches auto-create from issues. Forgejo/Gitea have basic issue tracking; GitLab CE has built-in issue management that replaces most Jira workflows.
  • Bitbucket Pipes. Pre-built CI/CD integrations (deploy to AWS, Slack notifications, etc.). Forgejo Actions has the GitHub Actions marketplace. GitLab CI has a template library.
  • Atlassian Access. SSO and user management across Atlassian products. Self-hosted alternatives integrate with LDAP, SAML, or OAuth2 directly.
  • Managed infrastructure. Bitbucket Cloud handles all operations. Self-hosted means you own uptime and backups.
  • Code Insights. Bitbucket’s code quality annotations in pull requests. Alternatives: integrate SonarQube or Semgrep as CI/CD steps that post review comments via API.

FAQ

Can Forgejo Actions replace Bitbucket Pipelines for CI/CD?

Yes. Forgejo Actions uses GitHub Actions-compatible YAML syntax. Most Bitbucket Pipeline steps translate to Actions equivalents: Docker image builds, test runners, deployment scripts, and artifact uploads. The main difference is syntax — Bitbucket uses step: blocks while Actions uses jobs: and steps:. Expect 1-2 days to convert a typical pipeline configuration.

How do I migrate private repos with full history from Bitbucket?

Use git clone --mirror to capture all branches, tags, and commit history. Push with git push --mirror to your Forgejo/Gitea/GitLab instance. Alternatively, use the built-in migration tools: Forgejo and GitLab both have “Import from Bitbucket” options that handle repository content, issues, and pull requests automatically.

Does Forgejo support Bitbucket’s pull request approval workflows?

Forgejo supports branch protection rules with required reviews, status checks, and merge restrictions. You can require 1+ approvals before merging, dismiss stale reviews on new commits, and restrict who can push to protected branches. This matches Bitbucket’s merge checks functionality.

What about Jira integration — is there a self-hosted alternative?

If you use Bitbucket primarily for Jira linking, GitLab CE replaces both Bitbucket and Jira with built-in issue boards, milestones, epics, and time tracking. Forgejo has simpler issue tracking — for teams that need project management depth, GitLab CE is the better migration target.

Can I run Forgejo with LDAP or SAML for enterprise SSO?

Yes. Forgejo supports LDAP, LDAP+StartTLS, OAuth2, and SAML authentication. Connect to Active Directory or any LDAP-compatible directory service. User provisioning can be automatic — new users authenticate via LDAP and their Forgejo account is created on first login.

How much server resources does Forgejo need compared to Bitbucket Data Center?

Forgejo runs on ~100 MB RAM with SQLite, or ~200 MB with PostgreSQL. A $5/month VPS handles a team of 50+ developers. Compare that to Bitbucket Data Center’s minimum recommendation of 4+ GB RAM and dedicated hardware. GitLab CE needs 4+ GB RAM but is still dramatically cheaper than Data Center licensing.

Will my team notice a workflow difference switching from Bitbucket to Forgejo?

The day-to-day workflow is nearly identical: clone repos, create branches, push commits, open pull requests, review code, merge. Forgejo’s web UI is clean and GitHub-like. The main adjustments are CI/CD configuration (Pipelines → Actions syntax) and any Bitbucket-specific integrations that need equivalent replacements.

Comments