How to Set up a Custom Domain and Certificates with TrueNAS Scale!!

Akash Rajvanshi
3 min readMar 12, 2024

--

TrueNAS Dashboard

🚀 TrueNAS SCALE is a powerful and flexible operating system for network-attached storage (NAS). It is open-source and offers numerous benefits for both home and office networks. TrueNAS is a reliable NAS OS that supports a wide range of hardware. 🖥️ I even use TrueNAS on my older PC, which has an i3–6th gen processor, 16GB RAM, and 2 * 4TB Seagate Ironwolf HDDs. This article primarily focuses on using a custom domain on TrueNAS SCALE, whether you want to access it on a homelab environment or a VPN network. I will provide a step-by-step guide on how to set this up.

📋 Before we begin, make sure you have TrueNAS SCALE installed on hardware. You will also need a public domain name, or you can use one for your home-lab for free.

Here’s a simple trick to obtain certificates for a public domain and find the IP address for use in a homelab setup. Start by using the private IP of the server where you install Traefik or Certbot, and create a wildcard A record in the domain registrar. Then, use your DNS provider credentials to request a DNS challenge. This will allow your Traefik or Certbot instance to fetch wildcard certificates from Let’s Encrypt using DNS. These certificates can be used across your homelab. 🌐 🎉

CloudFlare DNS
OpenSSL Cert

Step 1: Set Hostname and Domain

First navigate to the Network section and modify the global settings. If your full DNS name is truenas.thinkncode.biz, enter truenas.thinkncode in the hostname field and biz in the domain section.

TrueNAS: Network Section

Step 2: Upload Certificates

To upload certificates, navigate to the “credentials” section and locate the “certificates” tab. Next, upload a key and certificate file and then click on the “save” button to finalize the process.

TrueNAS: Certificates
TrueNAS: Add Certificate
TrueNAS: Certificate Status

Step 3: Select your certificate

Finally, go to System Settings -> General -> Edit GUI Settings and select your certificate.

  • Select HTTPS Protocols: TLSv1.2 and TLSv1.3.
  • Check the HTTP -> HTTPS Redirect option.
TrueNAS: General Settings
TrueNAS: Select Custom Certs

Step 4: Add Truenas IP to local DNS Server

Now, ensure that you add your TrueNAS IP to your local DNS server. I am using dnsmasq on a Raspberry Pi.

DNSMASQ
TrueNAS Dashboard

Found something useful? Hold down the 👏 to support and help others find this article. Thanks for reading!!

Follow me on Twitter @akash_Rajvanshi

--

--

Akash Rajvanshi
Akash Rajvanshi

Written by Akash Rajvanshi

Developer || Engineer || Writer 🤟

No responses yet