August 21, 20223 yr Hey everyone, I just recently setup a personal website running on my Unraid server with Google Domains complete with SSL courtesy of Let's Encrypt. It took a little while to figure this all out but maybe someone else would like to know what I did. Ok first off, I've got the Asus RT-AC1200 which allows for DDNS support via Google Domains which means you can register your domain there (for cheap) and have your domain.com point to your router. I think a lot of the other higher end ASUS routers do this. No idea what the other brands do. The first thing you'll need to do is head on over there and get your domain. Once purchased, you'll need to add a CNAME record so that www.domain.com resolves to domain.com. You can do that under the DNS menu up top. Next you need to click on "Manage Dynamic DNS" way down at the bottom of the page to add a DDNS entry. It should default to your domain.com so hit save and you're done. Once you hit save, it'll close and then you need to click on the little upside down triangle to expand the DDNS details. From there, click on credentials which will present you with a username/password combo which you will then need to enter into the DDNS screen on your router. On my router, this is done in the WAN section. Enable the DDNS client, select DOMAINS.GOOGLE.COM then enter in your domain name along with the user name/password combo you got from Google Domains in the previous step. I kept WAN IP and hostname verification off as that was the default. Hit apply. Next, you'll need to ensure port forwarding is setup for both HTTP (80) and HTTPS (443) to point to your Unraid server inside your LAN. One thing to note is that the Unraid GUI by default uses port 80, so you'll either have to change which port Unraid uses in the settings (which is what I did) OR map HTTP to an internal port to something other than 80 in your router settings and then ensure your docker server listens to that port. I did it the first way (moved Unraid GUI to use another port) as in the SWAG docs, it said it needed port 80. I didn't try the other way but really.. it should work right? At this point, if you spin up a simple NGINX docker, type in your domain.com, you should see the nginx welcome page. Ensure both domain.com and www.domain.com work! This is what that first step way above back in Google Domain should resolve and is key in getting the SSL working properly below. Ok last step is to get our site working with SSL and SWAG. Luckily SWAG includes an app called CertBot which does all the hard stuff for you, you just need to set a few details and you're off. First remove your test nginx server if you set one up above and from the apps section, install the SWAG server. When filling in the details, ensure you enter in your domain.com and select http for validation. If you used different ports in the port forwarding step on your router, you will enter them here. From what I've understood, the dns method doesn't work with Google Domains but HTTP will work just fine, From there hit apply and let the docker setup do it's thing. Once done, the docker will start up. Click on the SWAG icon and select logs to see what the server is doing. What you want to see is something along the lines of: ``` Using Let's Encrypt as the cert provider SUBDOMAINS entered, processing SUBDOMAINS entered, processing Sub-domains processed are: -d www.domain.com No e-mail address entered or address invalid http validation is selected Certificate exists; parameters unchanged; starting nginx The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am). [custom-init] no custom files found exiting... [ls.io-init] done. Server ready ``` If server IS INDEED ready, you should be able to hit https://www.domain.com and see the nginx welcome page and you are ready to start building up your site all running off your own home server. Hope this helps and hopefully the pro's can weigh in on this as well! The End
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.