Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions
ICPay

© 2026 ICPay. All rights reserved.

contact@icpay.cloud

Products

  • ICFalcon
  • ICBucket
  • Canisters
  • Top up cycles
  • ICPay Wallet

Explore

  • Channels
  • Blog

Resources

  • Falcon CLI
  • ICP-Hub Packages
  • ICBucket Docs
  • Blog

Company

  • Charity
  • About
  • FAQ
  • Roadmap

Legal

  • Brands
  • Terms
  • Privacy
  • Transparency

Community

  • GitLab
  • X
  • LinkedIn
  • Discord
  • Support
ICPayICPay
  • Blog
Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions

Guides

Configuration

Configure client timeouts, automatic chunk retry strategies, Edge CDN domains, and environment settings.

Configuration

The ICBucket client can be customized to match your infrastructure requirements, from serverless Next.js functions to long-running backup daemons.

Prerequisites

  • icpay-bucket installed in your project
  • A valid API key or Internet Identity identity

Steps

Client Options

Initialize the client with custom network options:

import { ICBucket } from "icpay-bucket"

const bucket = new ICBucket({
  bucketId: process.env.ICBUCKET_ID!,
  apiKey: process.env.ICBUCKET_API_KEY!,
  
  // Custom Edge CDN domain (defaults to https://cdn.icpay.app)
  cdnBase: "https://cdn.icpay.app",

  // Chunk upload configuration
  chunkSizeBytes: 2 * 1024 * 1024, // 2MB default per boundary node guidelines

  // Timeout and retry parameters
  timeoutMs: 30_000,
  maxRetries: 3,
  retryDelayMs: 1_000,
})

Environment Variables

For zero-config framework setups (Next.js, Remix, Astro), define:

# Required
ICBUCKET_ID=my-storage-bucket
ICBUCKET_API_KEY=icp_live_sec_100234

# Optional overrides
ICBUCKET_CDN_BASE=https://cdn.icpay.app
ICBUCKET_CANISTER_ID=6vbhm-nqaaa-aaaan-q6muq-cai

Verification

Verify client connectivity with a ping call:

const isHealthy = await bucket.ping()
console.log("Canister connection:", isHealthy ? "OK" : "FAILED")

Related Pages

  • Authentication
  • Basic Usage
  • Best Practices
PreviousInstallationNextAuthentication

On this page

PrerequisitesStepsClient OptionsEnvironment VariablesVerificationRelated Pages
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions