This article will introduce in detail how to build your own image bed on Alibaba Cloud, including steps such as purchasing OSS services, configuring domain name resolution, creating OSS buckets, and setting image upload rules. Hope this helps!
1. Purchase OSS services
First, we need to purchase the OSS (Object Storage Service) service on the Alibaba Cloud official website. OSS is a massive, secure, low-cost, and highly reliable cloud storage service provided by Alibaba Cloud. It can be used to store various types of files such as pictures, videos, and documents. When purchasing OSS services, please select appropriate configurations such as storage space, access permissions, and data transmission methods based on your needs.
1.1 Log in to Alibaba Cloud official website
Open the browser, visit the Alibaba Cloud official website: https://www.aliyun.com/, and log in with your Alibaba Cloud account.
1.2 Enter the OSS product page
On the homepage of Alibaba Cloud's official website, click "Products" > "Object Storage OSS" to enter the OSS product page.
If you use it for the first time, you can apply for free 20G and try it for 3 months.
1.3 Purchase OSS services
If you have already used it, click "Activate Now" on the OSS product page, fill in the relevant information, and complete the purchase. After a successful purchase, you will receive an exclusive AccessKey ID and AccessKey Secret, which will be used for subsequent operations.
2. Configure domain name resolution
2.1 Copy regional nodes
Copy the regional node oss-cn-hangzhou.aliyuncs.com. The subsequent .aliyuncs.com is not needed; this regional node will be used later.
2.2 Create AccessKey ID and AccessKey Secret
3. Create an OSS bucket
Next, we need to create a bucket on Alibaba Cloud OSS to store the user's image files.
Most of them are fine by default, but be sure to select public reading.
3.1 Log in to the OSS management console
Enter in the browser: https://oss-cn-hangzhou.aliyuncs.com/
, use the AccessKey ID and AccessKey Secret obtained previously to log in. After successful login, you will see an interface similar to the following:
[你的AccessKey ID]@oss-cn-hangzhou.aliyuncs.com # 请替换为实际的AccessKey ID和AccessKey Secret组成的字符串
3.2 Create bucket
Click "Resource Management" in the left navigation bar, then click "New Resource" in the upper right corner, and select "Create Storage Space". Fill in the storage space name, region and other information, and then click the "OK" button. After successful creation, you will see an interface similar to the following:
名称:yourbucketname # 请替换为实际的存储空间名称
地域:oss-cn-hangzhou # 请替换为实际的地域代码(如:oss-cn-hangzhou)
创建时间:2022-01-01T00:00Z # 请替换为实际的创建时间
At this point, you have successfully created an yourbucketname
OSS bucket named. Next, we need to bind this bucket to your domain name.
4. Set image upload rules
Download and configure PicGo.
Set Keyld: Fill in the AccessKeyID you just obtained. Set
KeySecret: Fill in AccessKeyIDSecret.
Set Bucket: Fill in the bucket name. Fill in the bucket name you created here, not the domain name in the browser.
In order to facilitate uploading and managing images, Can be used together with Typora.