Introduction
Backblaze B2 Cloud Storage is an S3-compatible cloud storage provider. At ¼ the price of AWS S3, Backblaze is a cost-effective option to store and manage data at scale.
A minimal deployment of Minio can be spun up using the minio/minio container published on Docker Hub. Here is the documentation on Github for the Minio B2 Gateway. The MINIOACCESSKEY= and MINIOSECRETKEY= environment variables should be set to the Master Application Key found in the App Keys portion of the Backblaze B2 account area. Connect your Backblaze B2 Bucket to Koyeb. Now that you have generated a Backblaze B2 key pair, you need to connect your Backblaze B2 bucket to Koyeb. This operation allows Koyeb to access your Backblaze B2 bucket and to store your images there. On the Koyeb Control panel, click the Create button on the top right navigation bar and select Store. In terms of new features, FreeNAS 11.1 now has a cloud sync feature that can help manage data both in the FreeNAS NAS but also to a cloud provider such as AWS S3, Azure, GCP and Backblaze B2. The other headline feature is “preliminary” Docker container support based on a RancherOS virtual machine. Docker Backblaze B2 command line tool image. Docker image for the official Backblaze B2 command line tool (Backblaze/B2CommandLineTool)Supported tags and respective Dockerfile links. 0.5.6, 0.5, 0, latest (Dockerfile); How to use it.
You can learn more about Backblaze B2 Storage here.
Koyeb is a serverless to securely add the keyID you previously created.
bbaccesskey
) and enter the keyID you previously saved as the Valuebbprivatekey
) and enter the private applicationKey you previously saved as Value
bb-bucket-koyeb

You have just successfully created a Koyeb Store that mirrors the content of your Backblaze B2 bucket. Koyeb natively provides an S3-compatible API to let you interact with your Store using the S3 protocol to upload and manage your content.
Note: To trigger a function when an event occurs in your Backblaze bucket, you need to use the Koyeb endpoint to upload your content instead of the Backblaze one.
Create a Stack and Deploy the Watermark Function
Once your Store configuration is done, you can create a Stack and deploy the function to generate a watermark each time a new image is uploaded to your Backblaze B2 bucket.
Backblaze Cloud Storage & Backup

Look at the top navigation bar, click the Create button, and select Stack.
You land on the Stack creation page. A Stack is a Koyeb resource used to implement data-processing logic. A Stack is composed of two core elements:
- Event bus: To receive events from a Store or different sources
- Functions: Python, Node.js, Docker containers, or ready-to-use catalog apps triggered on specific events
From the Stack creation view, click the Simple Koyeb Versioning button. This mode allows you to directly manage your Stack via the control panel and API instead of GitHub.
Give your Stack a name, for example: bb-watermark-image
. Then click the Create Stack button.
Unraid Backblaze
You are now prompted to create a new Stack revision. Stack revisions allow you to version your changes, so you can rollback to a previous version in seconds and track your changes.
In the catalog function inputs, search for Watermark image and select this function.
A snippet appears. Replace the configuration variables with your settings.
In this example configuration, the watermark-image@1.0.1
catalog function generates a watermark that:
- Is 10% the size of the image that the watermark is placed on
- Has a margin of 5 pixels
The generated watermarked image is stored in the watermark-images/
folder of the bb-bucket-koyeb
and is saved in the JPEG format.
Unraid Cloud Backup
When you are ready, write a revision message and click Deploy Revision.
This function will be triggered each time an image is uploaded to your Backblaze Store via the Koyeb S3-Compatible API.

Upload Images to the Bucket and View Results
It's now time to upload some images to your Store and see what happens.
On the Koyeb Control Panel, click Stores and select the Store you previously created, i.e. bb-bucket-koyeb
.
Click the Upload button and upload some images. In a few seconds, a folder watermark-images/
will appear. For each image uploaded, you will receive a watermarked version of that image in this folder.
In the folder watermark-images/
, you should see your new file. Hover over the new file, and click Copy to copy the URL that appears. Enter this URL into a new tab to access and view your watermarked image.

An example image watermarked with the function:
Conclusion
In this guide, you saw how to implement a processing function to generate a watermarked image for each image uploaded to a Koyeb Store that is connected to a Backblaze bucket.If you would like to follow this tutorial and use a different third-party cloud service provider than Backblaze B2, please read our documentation about how to connect a third-party store.
Backblaze Personal Docker
Feel free to reach out to us over our Community Slack or here to let us know if you have questions about this feature or would like to suggest a new feature.
