I ended up finding about the Nextcloud Box after searching for a alternative to Dropbox. I’m pretty pleased with the whole Box. It works well and I can sync between all devices just like I can with Dropbox, all without the recurring cost. This is a guide with how I setup my device.
You may be wondering where to put that SD card that came with your Nextcloud Box. It has to go in on the underside of the Raspberry PI 2.
On first boot, the Nextcloud Box will take about 8-10 minutes to install Ubuntu Core on the hard disk. When that is finished, you should be able to access it at
nextcloud.local, if you have Bonjour installed.
You’ll first need to go the browser at one of these addresses and create a user account before SSH-ing in.
Otherwise, if you cannot find the local domain name, follow the rest of Step 1 in the connecting by SSH guide.
1 ssh email@example.com
You’ll be able to log in with the password
ubuntu. Make sure you change this password with the
passwd command after you SSH in.
The version of Nextcloud box that I ordered utilizes Nextcloud Snap with Ubuntu Snap. It was incredibly easy to update. Run a refresh to update the whole nextcloud version. Upon writing this, it brought me from version
1 sudo snap refresh nextcloud
There is a bug sometimes where it won’t take your box off maintenance mode, and thus won’t allow you to go to your box through the browser. You can continue the upgrade process with the below commands. But normally, just a refresh should update everything.
1 2 sudo nextcloud.occ maintenance:mode --off sudo nextcloud.occ upgrade
Connecting to the internet
I ended up exposing the Nextcloud box to the internet by forwarding ports
443 on my router to the Box. I was then also able to access the web application by going to my public ip.
To make life easier, I pointed a domain name I owned to my public facing IP, so that I could sign in from the domain name (using Cloudflare). I then added the domain name to the trusted domains of the Nextcloud box: 
1 sudo nextcloud.occ config:system:set trusted_domains 2 --value=your.domain.com
We can then go ahead and enable HTTPS with the following command: [1:1]
1 sudo nextcloud.enable-https lets-encrypt
It won’t say that the certificate was successful, it will just say it’s done when it finishes with certbot. You should now be able to go to your
https://your.domain.com and have it use TLS.
Since I’m using this behind a router, and my ISP is not always going to give me the same IP, I ended up utilizing this handy Cloudflare DDNS script.
1 git clone https://github.com/thatjpk/cloudflare-ddns.git ~/cloudflare
After going through the setup guide, I was able to successfully use cron (
crontab -e) to have it update the domain records every fifteen minutes.
1 */15 * * * * /home/ubuntu/cloudflare/cloudflare_ddns.py /home/ubuntu/cloudflare/site_naked.yaml >> /home/ubuntu/cloudflare/logs/ddns_cloudflare.log