This page isn’t applicable to ClickHouse Cloud. The feature documented here isn’t available in ClickHouse Cloud services.
See the ClickHouse Cloud Compatibility guide for more information.
s3 table function and S3 disk type are compatible with SeaweedFS, an open-source distributed object store with an S3-compatible gateway. SeaweedFS serves path-style requests natively, so a self-hosted store works without wildcard DNS. SeaweedFS also supports Iceberg tables: its table buckets store the table data as Parquet files, and the built-in Iceberg REST catalog serves the table metadata - see the SeaweedFS catalog guide for querying them through the same endpoint.
Use SeaweedFS 4.42 or newer. Earlier versions can delete an object whose write commits while its parent folder is being removed for being empty, which surfaces as Object ... suddenly disappeared right after a successful write.
Running SeaweedFS locally
For a local test setup, create a files3config.json with the S3 credentials:
-bucket flag creates the bucket on startup:
echo "s3.bucket.create -name mybucket" | docker exec -i seaweedfs weed shell.
By default a write is acknowledged once it is handed to the operating system. To fsync every write to disk before acknowledging it, enable fsync on the bucket:
S3-backed MergeTree
The S3-backed merge tree configuration is compatible with minor changes:SETTINGS disk = 's3_cache' instead - the cache disk defined above wraps the S3 disk.
The s3 table function
Thes3 table function reads and writes objects against the same endpoint:
Backup and restore
BACKUP and RESTORE accept a SeaweedFS endpoint as the S3 destination: