As of this writing, a new domain can be registered for less than USD $10/year on Cloudflare
Go to Cloudflare Dashboard - https://one.dash.cloudflare.com/?to=/:account/access/tunnels
If you are already enrolled in "Cloudflare Zero Trust", proceed to Step 6 below.
If you haven't configured "Cloudflare Zero Trust" yet, you will be prompted to do so now.
When prompted to select a plan, the "Free" plan should be sufficient for most users.
Finish the Zero Trust plan purchase (no cost if selecting the "Free" plan).
Click on "Create a Tunnel" or "Add a Tunnel", select "Cloudflared" and click "Next".
Give your tunnel a name (e.g., "nc") and click "Next". This will look like https://nc.myname.com if you use nc
as your tunnel name and registered myname.com
as your unique domain name.
On the next Cloudflare page, it will ask for an environment and architecture. Ignore this part. Look below where it says "If you already have cloudflared installed on your machine:" and click the copy icon in that box.
In the Nova's console, paste the command provided by Cloudflare (do not copy the text below as it will not work - you must paste the one provided by Cloudflare).
sudo cloudflared service install eyJhIjoiNjNjYTM1MzdiZTczM2RhY2Easd4jy8oDIyZmRkOGQiLCJ0IjoiYmY4OGUwYjktYmRmMS00ODg4LTk3ZTMtNTA4MsbtjuljMzIwIiwicyI6Ik5UYzFORGc0TURjdE1XRmtZaTAwTmpSbExUbG1ZMll0TldOa1pUWmhOVEZsTnpVqSbyhj
After the installation, proceed to the next step in Cloudflare Dashboard and set up the public hostname, subdomain, and other details. "Subdomain" should be what you set up earlier (nc
for example), "Domain" should be the unique domain name you registered earlier (myname.com
for example), and leave "Path" blank. For the service part, type should be HTTP
, and URL should be set to localhost:11000
.
Once you're done, click "Save Tunnel".
SSH into your IndieDroid Nova and navigate to the /raid/
directory.
cd /raid/
Open the docker-compose.yml
file for editing.
sudo nano docker-compose.yml
Under - NEXTCLOUD_DATADIR=/raid/ncdata
, add the following lines:
Please make sure to make it so it has the same number of spaces as the line above it (6 spaces)
- APACHE_IP_BINDING=127.0.0.1
- APACHE_PORT=11000
- SKIP_DOMAIN_VALIDATION=true
Save and exit by pressing CTRL + S and then CTRL + X.
Remove and recreate the Docker container.
sudo docker-compose stop
sudo docker-compose rm
sudo docker-compose up -d
Navigate to the local IP using port 8080 (e.g., http://local-ip:8080
).
Follow the regular Nextcloud setup steps.
Congratulations! You have successfully configured Cloudflare Tunnel with your IndieDroid Nova Nextcloud Bundle, allowing you to access Nextcloud without opening external ports.