https://prod-files-secure.s3.us-west-2.amazonaws.com/00ca13a9-3fa4-4fd5-a345-67a1f89ff832/58432ced-926f-4f3a-a9ce-c45bc3fe565c/1647a31962c0cc.png

(I hope someone experienced could check this post.)

Disclaimer 0: I decided to post it here so that people in my position could more easily find this information. Almost everything I've written here is taken from the excellent tutorials of the TrueCharts community and from their advice. I only tried to gather the information in one place and organize it. I am not an expert and I will not be able to answer most of the questions. However, there are plenty of people here ready to help you if you encounter any troubles. Also, feel free to ask TrueCharts Discord server for help.

Disclaimer 1: This article is intended for newbies. If you know how to configure reverse proxy, dynamic DNS, port forwarding, etc., you don't need it.

Disclaimer 2: I originally wrote this article in my native language and translated it into English using DeepL, so the wording may sometimes seem odd and technical terms may be misused.

Introduction​

Here I want to describe my way of creating self-hosted alternatives to various cloud services. Namely about how you can access your applications over the Internet as cheap and easy as possible. I myself use TrueNAS and its applications. For other systems, the principle will remain the same. There are tons of tutorials on how to host alternatives to Netflix, Spotify, DropBox and other stuff on TrueNAS and other NAS/hypervisor systems, but I couldn't find any complete tutorial on how to setup access without reverse proxy for TrueNAS. I had to collect pieces of information for this tutorial all over the internet.

Why should one use this method if they can get a static IP from their ISP and open several ports you may ask? By opening ports you become an easier target for malware and vulnerable to DDoS attacks. Also, the method described below seems simpler to set up once you get the idea.

Any additions, edits, and advice are welcome!

If you host services in containers or on virtual machines you may find this video helpful: https://www.youtube.com/watch?v=VrV0udRUi8A&t=293s

How do we do this?​

Cloudflare makes many useful services. Among them is Zero Trust. We won't go into the details of what it is. The main thing is that it is free. This service will allow us to connect to services in our local network by referring to them with a domain name and Cloudflare will hide our IP and ports. And most importantly, we do not need a static IP address.

What does it take?​

  1. The server itself, in this case TrueNAS Scale with TrueCharts library connected. The applications you want to access must be installed from TrueCharts, because they have an Ingress setting that we need. The applications from the default TrueNAS library do not have these settings. If you deploy containers by yourself then you will have to fiddle with settings manually.
  2. Traefik application from the TrueCharts library.
  3. Cloudfalre account. Registration is free.
  4. Certificate. It's not hard to get one, but to avoid stretching this tutorial I'll just send you to watch this video: https://www.youtube.com/watch?v=TJ5fDiDRcbU&t=9s
  5. Domain name. You can try to get one for free, but it's easier to buy one. I bought mine for less than $4 for a whole year. That will be the only expense in this tutorial.

Step 1: Transferring your domain to Cloudflare​

In order for Cloudflare to use our domain, we need to link it to our account. Click the + in the upper right corner and follow the instructions. If you feel unsure, look for video instructions online.