DYEWARE TECHNOLOGY SOLUTIONS
DYEWARE HOW-TO CENTER · Cloud Infrastructure & Storage

Backblaze B2 Bucket Configuration

Create and configure Backblaze B2 buckets for private application storage, public assets, backups, and file delivery. This guide covers bucket naming, privacy, lifecycle, CORS, and the decisions to make before connecting an application.

Illustration representing backblaze b2 bucket configuration

B2 buckets define important storage and access boundaries. Public buckets allow downloads without authorization, while private buckets require authorization for downloads. Uploading, listing, and deleting still require authorization. Choose the bucket type based on the data and delivery model, not convenience.

Before You Begin

  • A Backblaze account with B2 Cloud Storage enabled.
  • A bucket naming plan and data-retention requirements.
  • A decision about whether downloads must be private or public.

Recommended Approach

1. Create the bucket

In the Backblaze console, open B2 Cloud Storage and create a bucket with a globally unique name. Use a descriptive name that does not contain customer names, secrets, or personal information.

2. Choose private or public

Use a private bucket for customer documents, backups, and application data. Use a public bucket only for content intentionally available to anyone. Public downloads may incur account charges and should be monitored.

3. Configure file behavior

Review lifecycle rules, version retention, encryption options, and any Object Lock requirements. Decide how long prior versions should remain and how deleted files should be handled.

4. Configure CORS only when needed

If a browser must call B2 directly, define allowed origins, methods, and headers narrowly. CORS is a browser policy, not an authorization mechanism; the bucket and application key still control access.

5. Create a restricted application key

Create a key limited to the bucket, required capabilities, and optional filename prefix. Store it only on the server or in a secrets manager.

6. Test operations

Test upload, list, download, and delete separately with the intended key. Confirm private files cannot be downloaded without a valid authorization token.

Operational Considerations

Cloud storage and compute designs should account for security, availability, lifecycle, and cost together. Decide where data resides, how long it is retained, which identities can reach it, and how the service behaves during a regional or credential failure. Separate production and test resources when their access needs differ. Review data-transfer charges, request volume, version retention, and abandoned multipart uploads as part of routine operations.

How to Verify the Result

Test the workflow using the same role and network path that the deployed application will use. Verify successful access to the intended object or service, denial for an unrelated object, and behavior after a temporary credential expires. Check logs for the principal and operation, and confirm that lifecycle, versioning, and backup settings match the data-retention policy.

Example Configuration

Illustrative example — adapt values to your environment

# Design note
# Private bucket + server-authorized short-lived download token
# Public bucket only for assets intentionally available to everyone.

Common Mistakes to Avoid

  • Do not make a private bucket public just to simplify browser downloads.
  • CORS does not make a private object public and does not replace signed authorization.
  • Avoid personal or sensitive data in bucket names, file names, and metadata.
Practical recommendation

Make one change at a time, test it from the perspective of the actual user or application, and record the reason for the change. Keep a rollback path for network, identity, and production configuration changes.

Final Checklist

  • The configuration matches the intended environment and service version.
  • Access is limited to the required identities, resources, ports, and operations.
  • The expected workflow has been tested, including a negative test for unauthorized access.
  • Secrets and temporary credentials are protected and excluded from logs and source control.
  • The configuration owner, purpose, and review or expiration date are documented.

Official Documentation

🔒

Terms of Service

By accessing or continuing to use the Dyeware website, you acknowledge that you have read, understood, and agree to our Terms of Service and Privacy Policy. If you do not agree, please discontinue use of this website.