Platform/OS
Linux / Cross-platform (Server)
Category
Data Science & Analytics

ClickHouse

ClickHouse is a super-fast database system built to analyze huge amounts of data quickly. It lets companies run lightning-fast reports on billions of sales records, website clicks, or sensor readings without waiting minutes for answers. It stores and processes all that information using regular S3-compatible object storage, treating cheap cloud buckets as its own high-speed disk. This clever use of S3 means you can keep petabytes of historical data without buying expensive hard drives while still getting fast query results.

Connection / Setup

  1. Create an account and log in to DiskSpace
  2. Click I'm ready to set up my storage
  3. Enter Bucket Name following the instructions
  4. Click Create Bucket and wait for it to be generated
  5. Find your Endpoint URL, Access Key, and Secret Key in the S3 Client Configuration section for use below

Connecting ClickHouse to DiskSpace.sh (S3-compatible storage)

DiskSpace.sh provides fully S3 API compatible storage. Follow the steps below to configure ClickHouse to use DiskSpace.sh as an S3 object storage backend.

Connection Steps:
  1. Log in to your ClickHouse server or client configuration environment.
  2. Open or create your ClickHouse configuration file (usually config.xml or a user profile XML file).
  3. Add an S3 disk configuration using the credentials and endpoint provided by DiskSpace.sh.
  4. Restart ClickHouse or reload the configuration to apply the changes.
  5. Test the connection by creating a table that uses the new S3 disk.
Credential Fields
Endpoint URL:
https://s3.diskspace.sh
Access Key:
Your DiskSpace.sh Access Key
Secret Key:
Your DiskSpace.sh Secret Key
Important: DiskSpace.sh requires path-style requests. Virtual-hosted style URLs are not supported.
Example Configuration
<disks>
  <disk_space>
    <type>s3</type>
    <endpoint>https://s3.diskspace.sh/your-bucket-name/</endpoint>
    <access_key_id>YOUR_ACCESS_KEY</access_key_id>
    <secret_access_key>YOUR_SECRET_KEY</secret_access_key>
    <region>us-east-1</region>
    <use_virtual_hosted_style>false</use_virtual_hosted_style>
  </disk_space>
</disks>

<storage_configuration>
  <disks>
    <disk_space>...</disk_space>
  </disks>
</storage_configuration>
Troubleshooting
  • Ensure the endpoint uses path-style requests: https://s3.diskspace.sh/bucket-name/key
  • Region can be left empty or set to us-east-1
  • Verify your bucket name is included in the endpoint URL
  • Check ClickHouse logs for detailed error messages (clickhouse-server.log)
  • Confirm IAM permissions allow s3:GetObject, s3:PutObject, and s3:ListBucket
  • If using a custom bucket, make sure it exists and is accessible with your credentials