RCA& SOLUTIONS← Tutorials & insights

FIELD NOTES / 01 · HOSTING AT HOME

A little Mac.
A website.
A way out to the world.

We built a website, then gave it a home on an always-on Mac mini. Here’s how the pieces fit—one simple picture at a time.

By Jay Vaishnav · 27 September 2026 · About 8 minutes

Follow a visitor’s request ↓

01 / START WITH THE PIECES

Owning an address
isn’t the same as owning a shop.

Our GoDaddy account had a domain and a free website builder. We already had custom HTML, CSS and JavaScript files, so we needed a server to deliver those files. Other GoDaddy hosting products exist; this was a decision about the plan we had.

A

GoDaddy

The registrar. It keeps our domain registration and renewal. We used it to change the nameservers.

B

Cloudflare

The DNS provider and public front door. It answers address lookups, handles visitor HTTPS and routes requests into our tunnel.

C

Our Mac mini

The host. Two background programs run here: cloudflared connects the tunnel; Caddy serves the website files.

02 / GIVE THE ADDRESS NEW DIRECTIONS

A change at GoDaddy.
A new entry in the address book.

The domain stayed registered with GoDaddy. Changing its nameservers told the .be registry, DNS Belgium, to direct DNS lookups to Cloudflare.

GoDaddy is not a stop on every website visit.

When someone types the address

The browser and its DNS resolver first check what they remember. When a full lookup is needed, the resolver follows the directory:

Root → .be → Cloudflare DNS

The answer is Cloudflare’s public IP address, not our home IP. The browser then connects to Cloudflare. DNS gives directions; it does not carry the website page.

03 / SEE IT HAPPEN

Follow one page request.

The Mac opens the tunnel first and keeps it connected. The animation below follows a visitor’s request through that existing connection, then follows the answer back.

Why no router port forwarding?

The connector starts an outgoing connection from the Mac. Cloudflare carries requests down that connection. We didn’t open a public incoming port on the home router.

What is protected?

HTTPS protects the browser-to-Cloudflare connection. The tunnel encrypts the Cloudflare-to-Mac connection. Local HTTP between the connector and Caddy stays inside our Mac. This is not a guarantee against every security risk.

04 / THE SETUP WE ACTUALLY USED

From local preview
to a public website.

This is our tested setup, not a promise that every account has identical screens. The examples use generic paths and placeholders. Never copy someone else’s tunnel credentials or assigned nameservers.

1

Put only public files in one folder.

Our dist/ folder holds the website. Notes, credentials, logs and personal documents stay outside it. A local preview let us check the design before publishing.

“127.0.0.1” means this computer. Typing it on your phone points to the phone, not the Mac.

2

Install the server and connector.

With Homebrew already installed, we installed Caddy and cloudflared:

brew install caddy cloudflared

Neither needs an app window. Caddy is the web server; cloudflared is the tunnel connector.

3

Tell Caddy which files to serve.

This simplified configuration accepts the website’s hostname but listens only on the Mac’s loopback interface. Replace the example path with your public website folder.

{
    admin off
    auto_https off
}
http://:8787 {
    bind 127.0.0.1
    root * "/ABSOLUTE/PATH/TO/PUBLIC/dist"
    encode gzip
    file_server
}

Cloudflare handles public HTTPS in this setup. auto_https off here applies to Caddy’s local server, not the visitor’s connection. Directory browsing is not enabled.

Check and run the configuration
caddy validate --config /PATH/TO/Caddyfile --adapter caddyfile
caddy run --config /PATH/TO/Caddyfile --adapter caddyfile

This runs in the foreground. For our ongoing setup, we configured macOS LaunchAgents for both programs, with restart-on-exit and log files. They start at user login; we have not verified recovery before login after a reboot.

4

Create a named Cloudflare Tunnel.

We added our domain to Cloudflare, selected its Free plan, created a named tunnel and connected the Mac. The dashboard supplied a secret connector token. We saved it through hidden input in a private file, readable only by our Mac user.

cloudflared tunnel run --token-file /PRIVATE/PATH/tunnel-token

No real token appears in this article. Keep credentials outside the served folder and source control. A “Healthy” tunnel confirms a connection; it does not yet prove the website is live.

5

Review DNS, then change nameservers.

We compared the complete GoDaddy DNS list with Cloudflare’s import. The scan had missed an email alias, which we restored. We preserved email-related MX, TXT, CNAME and SRV records, and checked DNSSEC status before the move.

Then we entered Cloudflare’s assigned nameservers in GoDaddy. The registrar sent the updated delegation to the .be registry. If DNSSEC is already enabled, follow the provider’s migration instructions before switching.

6

Connect both public addresses.

We added published application routes for the main domain and its www version. Both point to http://127.0.0.1:8787. Their proxied DNS records point to the named tunnel.

Old website A records prevented automatic DNS creation. After recording the old values, we replaced those website records with the tunnel destination. Email records stayed in place.

Use the destination generated for your own tunnel. Don’t delete unrelated DNS records.

7

Verify the page—not just the connection.

We waited for DNS activation and an active Universal SSL certificate, then enabled Always Use HTTPS. On 22 September 2026, both public HTTPS addresses returned the exact homepage served by the Mac, and HTTP redirected to HTTPS.

  • Check the main address and www.
  • Check that the content is the new page, not just an HTTP 200 response.
  • Check styles, scripts and images, plus a separate network such as mobile data.
  • Check that existing email still works. We verified its DNS records; a live mail-delivery test was not part of our recorded checks.

05 / THE THINGS THAT TAUGHT US SOMETHING

It worked. Then we learned
why the old page still appeared.

“Did it fall back to GoDaddy?”

No fallback was configured. The Mac’s cached DNS lookup still returned the old GoDaddy IP while current DNS returned Cloudflare. A direct request to Cloudflare showed the new website. Different caches can expire at different times.

Compare a fresh browser session and mobile data before changing DNS again. Clearing one device’s cache does not clear the router’s or internet provider’s cache.

“The server says OK, but the page is blank.”

Our first Caddy configuration matched only the loopback hostname. Requests using the public hostname returned an empty 200 response. We fixed hostname matching while retaining bind 127.0.0.1, then compared actual page contents.

“Where is the Cloudflare app icon?”

The connector is a background command-line program called cloudflared. It does not need an Applications icon, an open Terminal window or an open browser once configured as a service.

“Will editing the Mac files update the internet?”

Yes. Caddy serves the live dist/ files. Changes there become available immediately, although browsers may cache assets. Preview changes separately, keep backups, and use versioned asset URLs when publishing updates.

“What happens when the Mac is offline?”

Visitors normally receive a Cloudflare error if the tunnel or origin is unavailable. The Mac must stay awake and online. Our services start at user login; power-loss and reboot recovery still need testing.

THE PICTURE TO REMEMBER

The address is at GoDaddy.
The front door is Cloudflare.
The website lives on our Mac.

Start with a small public site. Understand each connection. Keep private files outside the shop window.

Replay the journey ↑