Learn how to use s4cmd with Filebase.

What is s4cmd?

s4cmd is a python based command-line utility for accessing S3-compatible services. s4cmd is intended as an alternative to s3cmd with enhanced performance for large files and with a number of additional features.
Read below to learn how to use s4cmd with Filebase.


  • Sign up for a free Filebase account.
  • Have your Filebase Access and Secret Keys. Learn how to view your access keys here.
  • Create a Filebase Bucket. Learn how to create a bucket here.
Versions of s4cmd below the 2.1.0 release do not support the --endpoint_url flag, which is required when using s4cmd with Filebase.
This guide was tested and written using Ubuntu 20.04. Commands may vary based on your operating system and version.

1. Install s4cmd.

apt-get install s4cmd
This guide uses Ubuntu 20.04. This command will vary based on your operating system and version.

2. Configure s4cmd.

s4cmd uses the same credentials file as AWS CLI. If this file has already been configured for use with Filebase on your system, you can skip this step.
If you do not already have a credentials file from AWS CLI configured, follow these steps:
mkdir ~/.aws
Then create and edit the credentials file to contain your access key pair:
vi ~/.aws/credentials
aws_access_key_id = FILEBASE_ACCESS_KEY
aws_secret_access_key = FILEBASE_SECRET_KEY
Once configured with credentials, can begin using s4cmd.

List your Filebase buckets

s4cmd --endpoint-url= ls

Create a bucket

s4cmd --endpoint-url= mb s3://filebase-sample-bucket

Copy a file up to Filebase

s4cmd --endpoint-url= cp image.jpg s3://filebase-sample-bucket

Copy a file from Filebase down to the working directory

s4cmd --endpoint-url= cp s3://filebase-sample-bucket/image.jpg .
For a full list of commands and features, visit the official s4cmd page.
If you have any questions, please join our Discord server, or send us an email at [email protected]
Last modified 1yr ago