跳到主要内容

Deploying with Object Storage

Introduced or updated: v1.2.168

This topic explains how to deploy Databend with your object storage. For a list of supported object storage solutions, see Understanding Deployment Modes.

Before You start

Before deploying Databend, ensure that you have successfully set up your object storage and downloaded the latest version of Databend.

1

Set up object storage

  1. Create a bucket or container named my_bucket.
  2. Get the endpoint URL for connecting to the bucket or container you created.
  3. Get the Access Key ID and Secret Access Key for your account.

For information about how to manage buckets and Access Keys for your cloud object storage, refer to the user manual from the solution provider. Here are some useful links you may need:

2

Download Databend

  1. Create a folder named databend in the /usr/local directory.
  2. Download the latest Databend release for your platform (Linux aarch64 or x86_64) from the GitHub Release page.
  3. Extract the downloaded package into /usr/local/databend.

Step 1: Deploying Meta Node

Follow the instructions below to deploy a Meta node:

1

Start Meta Node

  1. Open a terminal window and navigate to the folder /usr/local/databend/bin.
  2. Run the following command to start the Meta node:
./databend-meta -c ../configs/databend-meta.toml > meta.log 2>&1 &
2

Check Meta Node

Run the following command to check if the Meta node was started successfully:

curl -I  http://127.0.0.1:28101/v1/health

Step 2: Deploying Query Node

Follow the instructions below to deploy a Query node:

1

Configure Query Node

  1. Locate the file databend-query.toml in the folder /usr/local/databend/configs.
  2. In the file databend-query.toml, set the parameter type in the [storage] block and configure the access credentials and endpoint URL for connecting to your object storage.

To configure your storage settings, comment out the [storage.fs] section by adding # at the beginning of each line. Then, uncomment the relevant section for your object storage provider by removing the # symbol and fill in your values.

databend-query.toml
[storage]
# s3
type = "s3"

[storage.s3]
# https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-overview.html
bucket = "my_bucket"
endpoint_url = "https://s3.amazonaws.com"

# How to get access_key_id and secret_access_key:
# https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html
access_key_id = "<your-key-id>"
secret_access_key = "<your-access-key>"
  1. Configure an admin user with the [query.users] sections. For more information, see Configuring Admin Users. To proceed with the default root user and the authentication type "no_password", ensure that you remove the '#' character before the following lines in the file databend-query.toml:
警告

Using "no_password" authentication for the root user in this tutorial is just an example and not recommended for production due to potential security risks.

databend-query.toml
...
[[query.users]]
name = "root"
auth_type = "no_password"
...
2

Start Query Node

  1. Open a terminal window and navigate to the folder /usr/local/databend/bin.
  2. Run the following command to start the Query node:
./databend-query -c ../configs/databend-query.toml > query.log 2>&1 &
3

Check Query Node

Run the following command to check if the Query node was started successfully:

curl -I  http://127.0.0.1:8080/v1/health

Step 3: Verifying Deployment

In this step, you will run a simple query against Databend using BendSQL to verify the deployment.

1

Install BendSQL

Follow Installing BendSQL to install BendSQL on your machine.

2

Connect to Databend

Launch BendSQL and retrieve the current time for verification.

➜  ~ bendsql
Welcome to BendSQL 0.24.7-ff9563a(2024-12-27T03:23:17.723492000Z).
Connecting to localhost:8000 as user root.
Connected to Databend Query v1.2.714-nightly-59a3e4bd20(rust-1.85.0-nightly-2025-03-30T09:36:19.609323900Z)
Loaded 1406 auto complete keywords from server.
Started web server at 127.0.0.1:8080

root@localhost:8000/default> SELECT NOW();

SELECT NOW()

┌────────────────────────────┐
│ now() │
│ Timestamp │
├────────────────────────────┤
│ 2025-04-11 02:36:18.343596 │
└────────────────────────────┘
1 row read in 0.004 sec. Processed 1 row, 1 B (250 rows/s, 250 B/s)

root@localhost:8000/default>

Next Steps

After deploying Databend, you might need to learn about the following topics: