Creating a Nextcloud server on AWS

I wrote how to throw up a Nextcloud server using Linode. Nexcloud is a free file sharing software, but you have to host it. Let's begin...

Have a domain

I don't want to tell you how to setup a domain and such. I will say that you should buy the domain name to go with this nextcloud and then move on.

I'm using a sub-domain tho

Well then figure out how to setup/deal with A records per your dns provider.

Get the Instance Created

  1. Choose a free tier EC2 instance and select the first Ubuntu one with a x86.
  2. Go straight to review
  3. Go to the security group section and make sure that you have the following rules:
    • SSH Port 22
    • HTTP Port 80
  4. Save and then start your instance (P.S. If you want to tag it now then feel free to do that here)
  5. Create a .perm for this instance and save it where you can get to it (I like the Desktop)
  6. While the instance is starting then go down to elastic ips and go through the steps
  7. Once the ip is created click actions > associate address
  8. Let's login

Setup Nextcloud

Now that we are in our Ubuntu instance let's have some fun. We will be downloading Nextcloud using snap so run the following:

sudo snap install nextcloud

Once we verify that your setup ran without a problem we are going to set up an admin account by running:

sudo nextcloud.manual-install <username> <password>

You should then see another verification that Nextcloud was installed successfully. If you didn’t add a domain in step 2 then skip this step. Add your custom domain to the trusted list by typing:

sudo nextcloud.occ config:system:set trusted_domains 1 --value=<domain-name>
sudo nextcloud.occ config:system:get trusted_domains

Want SSL

Awww we getting safe af in these streets. Run the following:

sudo nextcloud.enable-https lets-encrypt
y
<email-address>
<domain-name>

Once you get a confirmation you are done! To logon either put in the ip-address of your server or your domain. Now you can can share all your secret work with your siblings and friends. lol

P.P.S.- if you want to use https (which of course you do) then you should change your security group again to allow inbount HTTPS Port 443

edit 10/23/19: Edited some steps because I forgot to add the right security group permissions 🙃