Skip to main content
Version: Nightly

Use RustFS as Object Storage

RustFS is an open-source, S3-compatible object storage written in Rust. GreptimeDB connects to it through the standard S3 storage type, so no RustFS-specific options are needed. RustFS also publishes a GreptimeDB integration guide on its side.

Start RustFS​

Start a single RustFS instance with Docker:

docker run -d --name rustfs -p 9000:9000 -p 9001:9001 rustfs/rustfs:latest

Port 9000 serves the S3 API and port 9001 serves the web console. The default access key and secret key are both rustfsadmin. Change them before any production use.

Create a bucket​

GreptimeDB does not create the bucket automatically. Create it in RustFS first, through the console at http://127.0.0.1:9001/rustfs/console/ or with any S3 client. The configuration below uses a bucket named greptimedb. If the bucket is missing, GreptimeDB still starts, but the first CREATE TABLE fails with a 404 error from the object store.

Configure GreptimeDB​

Add the following [storage] section to the configuration file of a standalone instance or of each datanode:

[storage]
type = "S3"
bucket = "greptimedb"
root = "greptimedb"
access_key_id = "rustfsadmin"
secret_access_key = "rustfsadmin"
endpoint = "http://127.0.0.1:9000"
region = "us-east-1"

RustFS serves path-style requests. GreptimeDB sends path-style requests to a custom endpoint by default, so you do not need to set enable_virtual_host_style. See Storage options for the other S3 options.