[Advertising] Use Graviton2 and S3 free packages to build a private online disk

Release your eyes, put on your headphones and listen~!

Online disk It is an online storage service that supports functions such as file storage, access, backup and sharing, and plays an indispensable role in our daily life. Although many Internet companies provide free Online disk Services, but these services usually have some restrictions, such as download speed, file size, multi person management, and customization. If you want to get rid of these restrictions, you usually need to pay a fee. Now let me introduce a free and unlimited private Online disk Solution. We can use the open-source network disk software NextCloud( https://nextcloud.com/ )Combination Amazon Cloud Technology The free service quota provided makes it easy to build a private online disk without use restrictions. The installation process is very simple. You only need to execute three lines of commands. I hope it will help you.

Cost advantage

because Amazon Cloud Technology There are many kinds of services, and the billing is detailed. Many users can't understand it, so they are not familiar with Amazon The clouds flinched. actually Amazon Cloud Technology Many services have free packages to let users experience. The free packages of these services are more than enough to build a private online disk. because Amazon The cloud overseas area only needs personal credit cards to register, so we take the overseas area as an example. We can link from https://aws.amazon.com/cn/free/ See Amazon Which cloud services have free packages:

Service name Free package Package validity
Amazon EC2 (host service) 750 hours of Linux or Windows t2.micro, t3.micro, t4g.micro instances per month (depending on the region) Free within 12 months after registration
Amazon S3 (Object Storage Service) 5GB standard storage is free, and the excess is about 0.023USD per GB (depending on the region) Free within 12 months after registration
Amazon EBS (Block Storage Service) 30GB Free within 12 months after registration
data transmission Data transferred from the Internet is free permanent
Data outgoing from the Internet is free within 1GB every month, and the exceeding part is about 0.09USD per GB (depending on the region) permanent

The table above lists some free service quotas of Amazon Cloud. It can be seen that if you register a new Amazon Cloud account, you can use one EC2 instance host a year for free, and it contains 35GB of storage space. Incoming traffic is completely free, and monthly outgoing traffic is free within 1GB. You may be worried that if the monthly free quota runs out, you will be charged. You can receive email alerts when your Amazon Cloud Technology service usage is close to or exceeds the AWS free package usage limit through the following settings. Log in to your overseas Amazon Cloud Technology console and open the following link: https://console.aws.amazon.com/billing/home#/preferences , check "Receive free package usage alerts" and fill in your email address, so you don't have to worry about costs.
 20240218.png Illustration

Technical advantages

as everyone knows, Asia Masson Cloud Technology It provides stable enterprise level cloud services for many multinational companies. Set up the online disk on Amazon Cloud, and rely on the enterprise services provided by Amazon Cloud to make the online disk performance more excellent and stable. NextCloud is an open source online disk application developed based on php. When you select Amazon Cloud Technology The performance of Graviton2 can be improved by up to 30% when running the code of php7.4 version. (Data source: https://aws.amazon.com/cn/blogs/compute/improving-performance-of-php-for-arm64-and-impact-on-amazon-ec2-m6g-instances/ )In addition, Amazon S3, as the storage medium of the network disk, can achieve the persistence of 99.9999999999% (11 nines) and store the data of millions of applications for companies around the world. So you don't have to worry about data loss.

Operation guide: Create an instance:

  • First of all, let's choose an Amazon Cloud overseas region that has a fast visit in China. Here we take Singapore as an example. Switch to Singapore in the upper right corner of the page.

 20240218-1.png Illustration (1)

  • Click "Service" in the upper left corner of the page, find EC2, and click.

 20240218-2.png Illustration (2)

  • Click the "Start Instance" button on the webpage.

 20240218-3. png illustration (3)

  • On the operating system selection page, we select Ubuntu Server 20.04 LTS and select ARM as the system version on the right. Click the blue "Select" button. Here we notice that if the operating system is included in the free package, it will be marked with "qualified free package".

 20240218-4. png illustration (4)

 

  • On the page of selecting instance type, we select micro, where the letter g indicates that Graviton2 chip is adopted. We see that this type is also marked with "free trial". Click "Next: Configure Instance Details".

 20240218-5.png Illustration (5)

  • Remove the check box behind the "Integral Specification" to avoid additional costs. Click "Next: Add Storage".

 20240218-6.png Illustration (6)

 

  • On the page of adding storage, we changed the size of the root volume to 30GB, because the maximum free package provided by Amazon Cloud is 30GB. Click "Next: Add Label".

 20240218-7. png illustration (7)

  • Without any modification, click "Next: Configure Security Group", select "Create a New Security Group", click the "Add Rule" button at the bottom left corner, select "http" as the type, and confirm that the lower port range is 80 and the source is 0.0.0/0, which means that any IP is accessible. After::/0 stands for IPv6. Click the blue button "Review and Start" at the bottom right.

 20240218-8.png Illustration (8)

  • On the check instance launch page, click the bottom right button "Start". You will be asked to create a key for logging in to the instance, and then create and save it as prompted.

 20240218-9. png illustration (9)

Operation Guide: Assign Fixed IP

  • The instance created in this way only has a temporary IP address. We need to assign a fixed IP address to the instance. We click "Service" in the upper left corner to find the VPC.

 20240218-10.png Illustration (10)

  • Enter the VPC, click "Elastic IP" on the left, and then click "Assign Elastic IP Address" on the right to get a fixed IP address. Select the address, click the "Operation" button, select "Associate Elastic IP Address", select the instance just created on the association page, and associate the fixed IP with the instance just created. Please write down this fixed IP address, which will be used later to access the network disk.

 20240218-11.png Illustration (11)

Operation Guide: Installing NextCloud

  • Returning to the EC2 service interface, we observed that the instance status is "Running" and the status check is "2 checks passed". It means that the instance has been created successfully. Check the check box in front of the instance and click the "Connect" button on the right.

 20240218-12.png Illustration (12)

 

  • We can use EC2 Instance Connect to log in to the EC2 instance from the browser. If it fails, we can use the language switch in the lower left corner of the console interface and switch the console interface to English to solve this problem. However, some regions do not support EC2 Instance Connect. If you encounter regions that do not support EC2 Instance Connect, you can refer to the "Connect to Instance" section in the following tutorial: https://www.amazonaws.cn/getting-started/tutorials/start-ec2-linux-instance/

 20240218-13.png Illustration (13)

 

  • After logging in to the instance, first install the open source network disk software NextCloud, and run the command:

sudo snap install nextcloud

  • After the installation, you will be prompted with "nextcloud 22.1.1snap2 from Nextcloud ✓ installed". After the software installation is completed, you need to configure the user name and password. Use the following commands, where xiayan is replaced with your user name and passw0rd is replaced with your password:

sudo nextcloud.manual-install xiayan passw0rd

  • After the configuration is completed, "Next cloud was successfully installed" will be displayed. Now we need to configure the trust domain. If you want to use IP to access the network disk, then the following command "value=" will be followed by the elastic IP you just configured. If you have your own domain name, then the domain name will be used to access later. Then the following command "value=" will be followed by your domain name and point your domain name to the elastic IP you just configured.

Sudo nextcloud. occ config: system: set trusted_domains 1 -- value=Replace with your IP address or domain name

    1. Now we can use the browser to open the IP address or domain name just now. Pay attention to using http. If the browser fails to open, you can try to enter the completed address, http://plus the IP address. Log in with the user name and password configured just now. However, the current interface is English. You can click Personal Settings in the upper right corner to change the language to Chinese.

 20240218-14.png Illustration (14)

 

Operation Guide: Configure NextCloud back-end storage as S3

  • So far, the network disk has been built. Now, 30G free EBS is used as the storage medium of the network disk. If you need more space and better persistence, we can configure the network disk to use S3 for storage. Click Personal Settings in the upper right corner, select Application, find External storage support in Disabled Applications, and click Enable.

 20240218-15.png Illustration (15)

 20240218-16.png Illustration (16)

  • When adding permissions, we select "Attach existing policies directly", then enter "s3" in the filtering policy, and check "AmazonS3FullAccess".

 20240218-17.png Illustration (17)

  • There is no need to make changes later, and the next step is user creation. After the user is prompted that the creation is successful, "Access Key ID" and "Private Access Key" will be displayed. Please write it down.
  • In Personal Settings, find "External Storage", select Add Storage, and select Amazon S3.

 20240218-18.png Illustration (18)

  • Fill in the bucket name just created and the region code of the bucket in the specified location. Make sure that S3 and EC2 instances are in the same region, otherwise there will be additional costs. For area code query, see this link: https://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts -regions In addition, it is also necessary to fill in the access key ID and "private access key" recorded just now, and click the check box on the right. If the addition is successful, there will be a green circular icon prompt on the left, as shown below:

 20240218-19.png Illustration (19)

  • We can find the newly created Amazon S3 directory in the list of online disks. The files in this directory are placed on S3 and have 11 nines.

conclusion

So far, the private network disk based on the Graviton2 and S3 free packages has been successfully built. NextCloud has desktop, Android and iOS clients, which can be used for synchronous backup. It also has a powerful multi-user system, which can work and share with multiple people, and can also work with WordPress Good integration. This article has only done a bit to attract attention. There are many improvements, such as configuring CloudFront CDN to speed up access to online disks. CloudFront also has a 50GB free package. You can also configure the network disk as https for more secure access. It is worthwhile to pay for good products. According to this scheme, even if the free package expires, EC2 instances can be converted into a package year, which costs only 4.58 USD per month, and S3 storage costs only 0.023 USD per GB per month.

Reward TA
A total of {{data. count}} people
People have rewarded

Related articles

course Ali related

Practical Tutorial: Teach you how to safely log off the suspicious number under Alipay to ensure the security of personal information

2024-2-19 23:30:50

Thinking about Originality Mobile phone related course Problem solving

[Personal test] The new Xiaomi/Hongmi mobile phones completely shut down the 5G online tutorial

2024-3-7 10:37:42

0 replies A Author M administrators
    There is no discussion yet. Tell me your opinion
Personal Center
Shopping Cart
Coupon
Sign in today
There are new private messages Private Message List
search