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:

  1. Install nextcloud with snap package manager

    sudo snap install nextcloud

  2. Create admin user account

    sudo nextcloud.manual-install

  3. Adding your trusted domain

    sudo nextcloud.occ config:system:set trusted_domains 1 –value=

  4. Using Route 53, create A record to the IP address of your nextcloud server

  5. Setting up SSL certificate with let’s encrypt, enter your email and domain after:

    sudo nextcloud.enable-https lets-encrypt

  1. Go to the your domain and you can now login to your nextcloud:

  1. Click on Apps and enable “Default encryption mode” and “External Storage Support mode”

  2. Open IAM (Identity and Access Management) in AWS, create a new user with programmatic access.

  3. 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": [
                "Resource": "arn:aws:s3:::*"
                "Effect": "Allow",
                "Action": "s3:*",
                "Resource": [
  1. 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.

  2. 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._