I want more privacy, so I decided to minimize the use of Google products. I can replace Chrome with Firefox, replace Gmail with ProtonMail and replace Google Drive with Nextcloud. Nextcloud allows me to self-host of cloud storage and gives me control over my own data. Here are the steps to install it on AWS:
- Install nextcloud with snap package manager
sudo snap install nextcloud
- Create admin user account
sudo nextcloud.manual-install <admin_username> <admin_password>
- Adding your trusted domain
sudo nextcloud.occ config:system:set trusted_domains 1 --value=<your-domain>
Using Route 53, create A record to the IP address of your nextcloud server
Setting up SSL certificate with let’s encrypt, enter your email and domain after:
sudo nextcloud.enable-https lets-encrypt
- Go to the your domain and you can now login to your nextcloud:
Click on Apps and enable “Default encryption mode” and “External Storage Support mode”
Open IAM (Identity and Access Management) in AWS, create a new user with programmatic access.
Create new policy with JSON below, replace your NAMEOFYOURBUCKET with your s3 bucket name. Attached the policy to the new user created above.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListAllMyBuckets"
],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::NAMEOFYOURBUCKET",
"arn:aws:s3:::NAMEOFYOURBUCKET*"
]
}
]
}
Go to nextcloud setting and select External storage. Fill in the Bucket with NAMEOFYOURBUCKET, checked enable SSL, enable Path Style and fill in the information with credentials of your newly created user.
Done. Now go to your d3 folder, and you should be able to upload your file.
Originally published at https://victorleungtw.com on December 7, 2019.