I wanted a file-sharing method that avoided the bloat of consumer cloud storage services like Google Drive and Dropbox, while also avoiding paid FTP server subscriptions for occasional file sharing.

The Solution: IBM Cloud COS

IBM Cloud Object Storage provides 5GB of public outbound traffic on their free tier without requiring credit card information. I configured a custom domain (files.bensarmiento.com) using a CNAME record pointing to the COS bucket.

Setup Requirements

  • IBM COS bucket with service credentials
  • rclone installed locally
  • DNS configuration for custom subdomain

Configuration

The rclone configuration file ($HOME/.config/rclone/rclone.conf) includes S3-compatible settings with IBM COS as the provider, including access keys, region, and endpoint information with public-read ACL permissions.

Command-Line Implementation

I created a bash function that uploads files and generates shareable URLs:

function upload {
    rclone copy $1 ibm:<bucket-name>
    a=`basename $1`
    b=`echo $a | urlenc enc`
    echo "https://<your configured url>/<bucket-name>/$b"
}

Bonus Feature

A redirect function creates simple HTML redirects, enabling lightweight URL shortening capabilities.