22 October 2019
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
- Choose a free tier EC2 instance and select the first
Ubuntuone with a x86.
- Go straight to review
- Go to the security group section and make sure that you have the following rules:
- SSH Port 22
- HTTP Port 80
- Save and then start your instance (P.S. If you want to tag it now then feel free to do that here)
- Create a
.permfor this instance and save it where you can get to it (I like the Desktop)
- While the instance is starting then go down to elastic ips and go through the steps
- Once the ip is created click actions > associate address
- Let’s login
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
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 🙃By: Keheira If you would like to donate to keep the content coming or just as a thank you, you can buy me a coffee or use cashapp.
tags: Ubuntu - AWS - Nextcloud