OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Cloud Platform

V4.3.2

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Cloud Platform
    3. V4.3.2
    iconOceanBase Cloud Platform
    V 4.3.2
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    • V 4.3.6
    • V 4.3.5
    • V 4.3.4
    • V 4.3.3
    • V 4.3.2
    • V 4.3.1
    • V 4.3.0
    • V 4.2.2
    • V 4.0.0 and earlier

    Use Docker to deploy OCP

    Last Updated:2026-04-20 07:26:00  Updated
    Share
    What is on this page
    Prerequisites
    Pull an OCP image
    Start the OCP container
    Check the OCP deployment result

    folded

    Share

    This topic describes how to deploy OceanBase Cloud Platform (OCP) Community Edition by using Docker.

    Prerequisites

    • You have created two connections to OceanBase Database in MySQL mode. We recommend that you use two tenants to store metadata and monitoring data respectively.

      For more information about how to create an OceanBase cluster, see Deploy a cluster. For more information about how to create an OceanBase Database tenant, see Create a tenant.

    • You have installed Docker on the host where OCP is deployed, and docker commands can be found in the PATH system variable. OCP is not compatible with podman-docker. For more information about how to install Docker, see Install Docker.

    • The deployment user has permissions to run docker commands.

    Pull an OCP image

    Before you deploy OCP, you need to pull an OCP image to your local environment.

    • Online environment If your deployment environment can access Docker Hub, you can run the following command to pull the OCP image:

      docker pull oceanbase/ocp-ce:4.2.2
      
    • Offline environment If your deployment environment cannot access Docker Hub, you need to pull the image to a host that can, and then import the image to your deployment environment. Here is sample code:

      # execute at a host being able to access dockerhub
      docker pull oceanbase/ocp-ce:4.2.2
      docker save -o ocp-ce.tar oceanbase/ocp-ce:4.2.2
      scp ocp-ce.tar ${user}@${target}:/tmp/
      # execute at target host
      docker load < /tmp/ocp-ce.tar
      

    Run the following command to check whether the image has been pulled or imported to your deployment environment. The result shown in the following figure indicates a successful pull or import.

    docker images | grep ocp-ce
    

    1

    Start the OCP container

    Run the following commands to start the OCP container:

    ## set environment parameters
    export OCP_CPU_COUNT=4
    export OCP_MEMORY_GB=8
    export OCP_METADB_HOST=xxx.xxx.xxx.xxx # do not use 127.0.0.1 or localhsot
    export OCP_METADB_PORT=2881
    export OCP_METADB_USER=root@ocp_meta
    export OCP_METADB_PASSWORD=ocp_meta_password
    export OCP_METADB_DBNAME=ocp_meta
    export OCP_MONITORDB_USER=root@ocp_monitor
    export OCP_MONITORDB_PASSWORD=ocp_monitor_password
    export OCP_MONITORDB_DBNAME=ocp_monitor
    export OCP_INITIAL_ADMIN_PASSWORD=****** #should match ocp's password validation
    export OCP_CONFIG_PROPERTIES=`cat << EOF
    server.port:8080
    ocp.site.url:http://xxx.xxx.xxx.xxx:8080
    obsdk.ob.connection.mode:direct
    EOF
    `
    
    # start ocp container
    docker run -d --name ocp-421 \
    --network host \
    --cpu-period 100000 --cpu-quota ${OCP_CPU_COUNT}00000 --memory=${OCP_MEMORY_GB}G \
     -e OCP_METADB_HOST="${OCP_METADB_HOST}" \
     -e OCP_METADB_PORT="${OCP_METADB_PORT}" \
     -e OCP_METADB_DBNAME="${OCP_METADB_DBNAME}" \
     -e OCP_METADB_USER="${OCP_METADB_USER}" \
     -e OCP_METADB_PASSWORD="${OCP_METADB_PASSWORD}" \
     -e OCP_MONITORDB_DBNAME="${OCP_MONITORDB_DBNAME}" \
     -e OCP_MONITORDB_USER="${OCP_MONITORDB_USER}" \
     -e OCP_MONITORDB_PASSWORD="${OCP_MONITORDB_PASSWORD}" \
     -e OCP_INITIAL_ADMIN_PASSWORD="${OCP_INITIAL_ADMIN_PASSWORD}" \
     -e OCP_CONFIG_PROPERTIES="${OCP_CONFIG_PROPERTIES}" \
    oceanbase/ocp-ce:4.2.1
    

    The following table describes the environment variables:

    Variable
    Description
    OCP_CPU_COUNT The number of CPU cores allocated to the OCP container. For more information, see Host planning.
    OCP_MEMORY_GB The size of memory, in GiB, allocated to the OCP container. For more information, see Host planning.
    OCP_METADB_HOST The IP address of OCP MetaDB.
    OCP_METADB_PORT The port number of OCP MetaDB.
    OCP_METADB_DBNAME The name of OCP MetaDB.
    OCP_METADB_USER The username of the OCP MetaDB user. If the OBServer node is directly connected, you can specify the username in the user@tenant format. If the OBServer node is connected through OBProxy, you can specify the username in the user@tenant#cluster format.
    OCP_METADB_PASSWORD The password of the OCP MetaDB user.
    OCP_MONITORDB_DBNAME The name of OCP MonitorDB.
    OCP_MONITORDB_USER The username of the OCP MonitorDB user. If the OBServer node is directly connected, you can specify the username in the user@tenant format. If the OBServer node is connected through OBProxy, you can specify the username in the user@tenant#cluster format.
    OCP_MONITORDB_PASSWORD The password of the OCP MonitorDB user.
    OCP_INITIAL_ADMIN_PASSWORD The logon password of the OCP admin user. The password must meet the following requirements:
  • The length is 8 to 32 characters.
  • It contains at least three of the following character types: digits(0~9), uppercase letters(A~Z), lowercase letters(a~z), and special characters (ie: ~!@#%^&*_-+=|(){}[]:;,.?/$`'"<>\).
  • OCP_CONFIG_PROPERTIES The system parameters of OCP. Specify one parameter in each row and separate the name and value of a parameter with a colon (:).

    Check the OCP deployment result

    After the OCP container is started, you need to wait about 2 minutes for OCP to initialize MetaDB and start the service. If the logon page appears after you visit the URL of the OCP console in a browser, the service is started.

    If the OCP service fails to be started after a long time, you can view the logs to check the status of OCP.

    # use the following command to log into ocp container
    docker exec -it ocp-421 bash
    
    # check ocp bootstrap log
    less /home/admin/logs/ocp/bootstrap.log
    
    # check ocp runtime log
    less /home/admin/logs/ocp/ocp.log
    

    Previous topic

    Deploy OCP on the GUI
    Last

    Next topic

    Post-deployment check
    Next
    What is on this page
    Prerequisites
    Pull an OCP image
    Start the OCP container
    Check the OCP deployment result