How to Host Your Own Website with Docker and Nginx Proxy Manager

3 weeks ago 9

Summary

  • A work similar Cloudflare DDNS automatically updates your domain's IP with your home's IP.
  • Nginx Proxy Manager routes postulation and provides SSL certificates done Let's Encrypt and deploys successful Docker.
  • Ghost is simply a user-friendly blogging level with markdown and plugin enactment that is casual to deploy utilizing Docker.

Have you wanted to tally your ain website, but hatred the thought of paying hosting fees? That's wherever I precocious recovered myself, truthful here's however I spun up a speedy website utilizing Docker, Nginx Proxy Manager, and Ghost.

What Do You Need to Run a Personal Website?

Running a idiosyncratic website has a fewer prerequisites. By the clip you're up and running, you should person a domain name, a server to big your website connected (which tin adjacent beryllium an aged laptop, NUC, oregon Raspberry Pi), Docker, and a fewer containers deployed.

Four hard   drivers sticking retired  of a rack-mount server that's being utilized  arsenic  a NAS.

Related

First up is the server to big your website on. It doesn't person to beryllium ultra-powerful, and it tin adjacent beryllium a machine you person lying astir astatine the house. A Raspberry Pi, NUC, aged desktop, oregon adjacent an aged laptop could enactment large for this service. You conscionable request thing made wrong the past 15 years oregon truthful that tin inactive tally a modern operating strategy (idealy Linux, but Windows oregon macOS volition enactment too).

Next is simply a domain name. You tin bargain your domain from anywhere, but I'd urge uncovering 1 that supports DDNS natively, similar Cloudflare. While you get a fixed IP erstwhile utilizing a virtual backstage server (VPS) oregon different hosting platform, erstwhile hosting your website astatine home, there's a bully accidental your IP volition alteration implicit time. That's wherever a DDNS (dynamic DNS) comes in. Essentially, arsenic your IP astatine location changes, DDNS updates the A grounds of your domain to constituent to your caller IP.

In summation to a domain and DDNS setup, you'll besides request Docker for the hosting method I'm going to urge here. Docker is susceptible of moving truthful much, but, for your website, we'll request a DDNS container, Nginx Reverse Proxy, and, of course, your website itself.

 Docker logo placed implicit    a laptop machine  keyboard.

Related

Docker for Beginners: Everything You Need to Know

Learn to usage this incredibly fashionable improvement tool.

To configure the Cloudflare DDNS Docker container, you'll request an API cardinal for Cloudflare that tin alteration the DNS records for the circumstantial domain you'll beryllium using, the domain itself, and immoderate subdomains you privation to support updated. All of this volition beryllium acceptable by biology flags successful Docker, making it casual to alteration oregon adhd caller subdomains and domains successful the future.

The Portainer web UI showing however  to configure a Cloudflare DDNS container. Patrick Campanale / How-To Geek

To rapidly get disconnected the ground, you tin sojourn a tract similar What's My IP Address to find your nationalist IP. Go up and input that IP into the A grounds of the domain you privation to usage for your website. Your DDNS volition support that updated should the domain change, but manually inputting it present volition conscionable assistance velocity things up down the road.

Nginx Proxy Manager Handles Your Reverse Proxy Needs

The archetypal Docker instrumentality to rotation up aft your DDNS volition beryllium Nginx Proxy Manager. With Nginx Proxy Manager, you'll beryllium capable to way the incoming postulation to your website's Docker container.

Servers connected crossed  a satellite   map.

Related

What Is a Reverse Proxy, and How Does It Work?

Reverse proxies are a utile instrumentality successful immoderate strategy administrator's toolkit.

Nginx Proxy Manager is simply a reverse proxy. It takes incoming postulation connected ports :80 and :443 (unsecured and SSL connections) and forwards them determination other connected your network. You'll request to configure your network's firewall to guardant the outer 443 and 80 ports to immoderate those ports are mapped to for your Nginx Proxy Manager install.

Nginx Proxy Manager Starting Steps. Patrick Campanale

Once you person the Nginx Proxy Manager Docker instrumentality up and moving with your ports forwarded, it's clip to get the routing acceptable up. Start by navigating to hosts past click adhd caller host. You'll spot a popup, and that's wherever you'll participate the accusation successful for your website. Just benignant the domain, server IP, and the larboard that you'll beryllium moving the tract on. The larboard tin beryllium immoderate you want, and is typically dictated by the bundle you run.

Setting up   a caller   big   successful  Nginx Proxy Manager's web UI. Patrick Campanale / How-To Geek

For instance, you could person blog.domain.com guardant to 192.168.1.6:2368, which would beryllium your server's IP with the Ghost larboard connected the end. Whenever idiosyncratic visits blog.domain.com, it would past way to your nationalist IP and past Nginx Proxy Manager would way it to the due container.

Not lone does Nginx Proxy Manager grip the routing, but it besides takes attraction of SSL certificates done Let's Encrypt. These escaped SSL certificates tin springiness those browsing your blog bid of mind, adding an other furniture of information to the browsing session. The full SSL process, commencement to finish, is seamless wrong Nginx Proxy Manager, too.

Once you're capable to acceptable up 1 reverse proxy, past it's beauteous elemental to acceptable up arsenic galore arsenic you want. I person implicit 30 reverse proxies connected my ain network, for services similar Calibre Web, audiobookshelf, Tautulli, Minecraft servers, a Satisfactory server, an Ark Survival: Evolved server, and truthful overmuch more.

Ghost Is a Simple Blogging Platform That’s Easy to Use

Now that you've got conscionable astir everything acceptable up, it's clip to get Ghost installed.

You mightiness person expected maine to usage WordPress, arsenic it runs a bulk of the internet. While WordPress is great, and I've utilized it for implicit 15 years, Ghost is what I'm moving my ain idiosyncratic blog connected this clip around. It's lightweight, easy-to-use, and, honestly, conscionable simpler than WordPress.

Ghost is geared toward being a blog that tin besides person a newsletter constituent to it. Posts are written successful markdown (my favourite mode to write), and determination are respective plugins for immoderate of the bigger services retired there, similar Instagram, Discord, MailChimp, YouTube, Patreon, and others.

The admin interface of the Ghost blogging and publishing platform. Ghost

To motorboat Ghost, you'll request to bash a fewer things. We're going to commencement successful Nginx Proxy Manager. Go up and make a caller proxy big with your domain sanction successful the archetypal blank, permission the strategy arsenic HTTP, input your Docker server's IP next, and past the larboard 2368.

I typically cheque the toggles for cache assets, artifact communal exploits, and websockets support. Skip implicit adjacent to the SSL tab, skipping implicit the customized locations tab. Here, take Request New SSL Certificate and hold to the terms, past input your email. Click save, and your reverse proxy is acceptable up.

The configuration options for the Nginx Proxy Manager setup for a Ghost blog. Patrick Campanale / How-To Geek

Now, caput backmost to your Docker host. I personally usage Portainer arsenic a web GUI for Docker, but since it's each done done Docker Compose, the setup files are identical either way.

If you privation to usage the aforesaid Docker Compose record that I usage for my Ghost blog, past check retired my homelab GitHub repo. Be definite to alteration retired the domain with your ain domain, and alteration the MySQL password for thing much unafraid too.

Once you deploy the Docker Compose file, past your Ghost blog should beryllium up and moving astatine your caller domain!

Your Website Is Live! Now What?

If each was done right, and you person the larboard forwarding settings configured decently connected your router, past you should beryllium capable to navigate to your domain sanction that you acceptable up and entree the Ghost lawsuit externally.

Now that your website is life, what's next? Well, you'll privation to commencement with configuring the Ghost blog. There are galore YouTube videos and different articles that locomotion you done step-by-step what to bash there. I've not adjacent afloat figured retired each the configuration options yet.

At this point, your website is unrecorded connected the net and anyone tin entree it. You mightiness privation to enactment a landing leafage up portion you're moving connected it, oregon conscionable simply permission it beryllium portion it's nether construction. Start publishing blog posts, sending email newsletters, and bask hosting your ain idiosyncratic website connected hardware astatine your house, escaped of hosting fees!


Starting a full-blown blog mightiness not beryllium precisely what you're after. If that's you, past microblogging mightiness beryllium conscionable what you're looking for. It's somewhat antithetic from accepted blogging, and is overmuch easier to acceptable up since it's typically done connected societal media, meaning determination are nary databases to configure, DDNS oregon reverse proxies to acceptable up, and it's often free!

Read Entire Article