docs/self-hosting/advanced/s3/tencent-cloud.mdx
We need to configure S3 storage service for file storage in the server-side database.
Create a new bucket on Tencent Cloud COS:
<Image alt={'Tencent Cloud COS Storage Interface'} src={'/blog/assets0f244d5fe648127774636a54ae9ffafc.webp'} />
Name the bucket (e.g., 'lobe'). Choose 'Public Read, Private Write', select any region, and keep other settings default.
<Image alt={'COS Create Bucket'} src={'/blog/assets2ad69e4e124f49710fcedf8e9827f2f3.webp'} />
View bucket information in COS bucket overview:
<Image alt={'View Bucket Information'} src={'/blog/assetsc51018f1581b769727ad1bb3bb641567.webp'} />
Corresponding environment variables:
S3_BUCKET=lobe-130xxxxxx2
S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
S3_REGION=ap-chengdu
<Callout type={'warning'}>
Note: S3_ENDPOINT should be https://cos.ap-chengdu.myqcloud.com, not https://lobe-130xxxxxx2.cos.ap-chengdu.myqcloud.com
Include `https://` in the URL
Add the following in 'Security Management - CORS Settings':
<Image alt={'Configure CORS'} src={'/blog/assetsb6af626eeb0e1e638d80dc9ff7a6eba9.webp'} />
Create a new SecretId and SecretKey at Tencent Cloud API Key Management. Use as S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY.
</Steps>