selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

oceanbase logo

Self-host oceanbase

v4.2.5_CE_BP8

Distributed HTAP database with MySQL compatibility

ReleaseOpen SourceApache-2.0
docker run -p 2881:2881 --name oceanbase-ce -d oceanbase/oceanbase-ce
Updated3 weeks ago
LanguageC++
Setup difficultyModerate
Stars
10 401
CPU
at least 2 physical cores
RAM
8GB
Ports
2881 (SQL service port used by MySQL/obclient connections), 10000 (mysql_port of a manually built observer deployed with obd.sh single.yaml)
Docker
oceanbase/oceanbase-ce

What is oceanbase?

OceanBase is an Apache-2.0 distributed SQL database engine built entirely in-house by Ant Group, designed to run on ordinary server clusters rather than specialised hardware. It relies on the Paxos protocol for availability and scales linearly, staying MySQL compatible so existing MySQL workloads can be migrated over; the same engine covers OLTP and OLAP together as HTAP, adds vector and full-text search, and separates a sys tenant from general tenants for workload isolation. Reported figures include clusters of 1,500 nodes holding petabytes and a trillion rows, RPO = 0 with recovery under 8 seconds, and 70%-90% storage cost savings, with more than 2,000 production customers cited across finance, telecom and retail. Self-hosting the community edition means a container from the published oceanbase-ce image listening on 2881, a Linux-only all-in-one installer driven by the obd demo command, Kubernetes through ob-operator, or a from-source observer built with build.sh and deployed via the bundled obd.sh scripts and single.yaml. Note that the container image is documented as single-instance and testing-only, unsuitable for production or Kubernetes, and its host wants two physical cores and 8 GB of RAM at minimum.

oceanbase alternatives

Should you self-host oceanbase?

oceanbase scores 70/100 on selfhost.directory (how scoring works) and ranks #14 of 38 in Databases. It has 10 401 GitHub stars, +101 in the last 30 days.

It shipped 15 stable releases in the past year. The latest, v4.2.5_CE_BP8, came out on 22 September 2026. New versions land roughly every 2 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in C++.

Its closest alternative on selfhost.directory is Redis (86/100, 77 491 stars). It scores higher overall, so compare the two before you pick. See oceanbase vs Redis side by side.

Features

  • Built-in benchmarking toolingtesting tooling in the container image
  • Cost-efficient storage
  • Distributed architecture with Paxos consensus
  • Full-Text Search
  • High availability with zero data loss
  • Horizontal Scalability
  • HTAP real-time analytics
  • Multi-tenancy
  • Vector Search

oceanbase README

How to install oceanbase

Install oceanbase with Docker

Docker should be installed and running on the host machine.
Environment variables
MODE, EXIT_WHILE_ERROR, OB_CLUSTER_NAME, OB_TENANT_NAME, OB_DATABASE, OB_MEMORY_LIMIT, OB_DATAFILE_SIZE, OB_LOG_DISK_SIZE, OB_SYS_PASSWORD, OB_TENANT_PASSWORD, OB_SYSTEM_MEMORY, OB_TENANT_MIN_CPU, OB_TENANT_MEMORY_SIZE, OB_TENANT_LOG_DISK_SIZE, OB_CONFIGSERVER_ADDRESS
# Deploy a mini mode instance
docker run -p 2881:2881 --name oceanbase-ce -d oceanbase/oceanbase-ce

# Deploy an instance to utilize the full resource of the container
docker run -p 2881:2881 --name oceanbase-ce -e MODE=normal -d oceanbase/oceanbase-ce

# Deploy an instance using fastboot mode
docker run -p 2881:2881 --name oceanbase-ce -e MODE=slim -d oceanbase/oceanbase-ce

Image is for testing only, supports a single-instance cluster only and is not designed for Kubernetes.

How to configure oceanbase

  • MODE{mini, slim, normal}mini indicates that the container will use the least amount of resource normal indicates that the container will use as much as possible of the container resource slim indicates that the container will only start observer and using fastboot mode, the tenant is named as test, cluster and tenant resource configurations will not take effect.
  • EXIT_WHILE_ERRORtrueWhether quit the container when failed to start observer. if you set EXIT_WHILE_ERROR=false, the container will not exit and you can use log into the container for debugging.
  • OB_CLUSTER_NAMEobclusterThe oceanbase cluster name
  • OB_TENANT_NAMEtestThe oceanbase mysql tenant name
  • OB_DATABASEThe database to create in the tenant, and to run init scripts in.

oceanbase releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in Databases

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…