TIL: How to Connect PocketBase and BackBlaze S3
By default PocketBase uses the local file system to store uploaded files. If you have limited disk space, you could optionally connect to a S3 compatible storage. - PocketBase
Why BackBlaze ?
Simple the prices are generally cheaper as compared with other S3 compatible storage platforms. How can we set up BackBlaze as our S3 bucket to store uploaded files such as user avatars?
BackBlaze
Go to BackBlaze
- Create an account
- Create a new bucket
- You should be able to make it public or private
- Take note of the
endpoint
i.e.s3.us-west-004.backblazeb2.com
. - Then go to
App Keys
- Create a new
Application key
- Create a new
- Take note of the
keyID
andapplicationKey
PocketBase
Go to your PocketBase instance:
- Go to Settings
- Go to File storage
Add the following details
- In
ENDPOINT
add the endpoint abovehttps://s3.us-west-004.backblazeb2.com
BUCKET
is the name of the bucket we created beforeArticleTest
REGION
you can find in the URLus-west-004
ACCESS KEY
is thekeyID
aboveSECRET
is theapplicationKey
above
Then click Save changes
and you should see S3 connected successfully
.
That’s It!