I keep meeting recent CS graduates who are looking for work and cannot tell me how to put a page of basic HTML on the internet under their own name. That is not a character flaw. Nobody showed them. A degree teaches you how a TCP handshake works and never asks you to open port 443 on a real machine.
This is the link I send them. Follow it from top to bottom and you will end with https://<YOUR_DOMAIN> showing Hello World! from a Go program you wrote, on a server you rent for $4 a month, behind two firewalls, with a Let’s Encrypt certificate that renews and reloads itself. Each step says what you are touching and why, so when something breaks later you know which layer to look at. After the procedure come the parts that are judgment rather than commands: serving real HTML, browser caching, hosting at home versus renting, and what you are actually renting from DigitalOcean, AWS or Azure.
Last verified: December 2026. Versions used: Debian 13 “trixie” (point release 13.8), Go 1.27.4 on the build machine, certbot 4.0.0 from Debian 13, systemd 257, DigitalOcean Basic Regular droplet at $4/month.
Why I learned the hard part first
Squarespace and Wix sell a finished website: templates, hosting, a certificate, a domain, support. On December 1, 2026, Squarespace’s US pricing page lists $19 to $99 a month on annual billing ($25 to $139 month to month), and Wix lists premium plans from about $18 a month billed yearly. For a bakery owner who wants an online menu and never wants to think about servers, that is a fair trade, and I would tell them to take it.
For me it was the wrong trade. I did not want to pay a monthly fee forever for something I could not open up. I wanted to understand every layer between a browser and my code, so I learned the hard part first: the server, the network, DNS, TLS. Once you can do that, a website is a small Go program and some HTML, the bill is the price of a droplet and a domain, and the skill is something people will pay you for. It is the same skill I am paid for now: as a systems architect I run a production environment that a multi-million-dollar business depends on. lauden.dev runs this way: a Go server with HTML templates on a DigitalOcean droplet with a Let’s Encrypt certificate.
The rest of this article is the hard part, written down so you only have to learn it once.
What you are building
Every request to your site passes through each of these layers. You will configure all of them.
The browser asks DNS which IP address belongs to your domain, opens a TCP connection to that address on port 443, passes DigitalOcean’s cloud firewall and then the firewall on the server itself, and reaches your Go process. The Go process proves its identity with a certificate, the two sides agree on encryption keys (that is TLS), and then they speak HTTP inside the encrypted connection.
What it costs: a domain (around $11 to $20 a year for a .com) and the droplet ($4 a month). Both are billed to a payment card or account you set up when you sign up.
Step 1: Buy a domain
A domain registrar is a company accredited to sell registrations in a top-level domain such as .com. The registry runs the TLD itself (Verisign runs .com), and the registrar is the shop you buy from. You never own a domain outright. You rent it a year at a time, and if you stop paying, someone else can register it.
Prices: Verisign’s wholesale price for a .com rose to $10.97 a year on November 1, 2026. At-cost registrars such as Cloudflare Registrar pass that through with only the ICANN fee added; most others add a markup. Expect roughly $11 to $20 a year. Registrar prices change, so check the current numbers when you buy.
What to avoid:
- Teaser pricing. A first year for a dollar or two that renews at several times the normal price. Look at the renewal price, not the first-year price.
- Paid privacy. Redacting your name and address from the public registration data should be free. Most reputable registrars include it.
- Upsells. You do not need the registrar’s hosting, email, “SEO” package or website builder for this.
- Novelty TLDs with high renewal prices. Some renew at several times the price of a
.com.
When you have the domain, turn on auto-renew and two-factor authentication on the registrar account. Whoever controls that account controls your site.
Write the domain down. Everywhere below, replace <YOUR_DOMAIN> with it (for example example.com).
Step 2: Make an SSH key on your own machine
SSH is how you will log in to the server. A key pair is two files: a private key that never leaves your laptop, and a public key you hand to the server. The server lets in whoever can prove they hold the private key that matches. No password crosses the network, and nobody can guess one.
On Linux or macOS, open a terminal. On Windows 10 or 11, open PowerShell: the OpenSSH client ships with Windows as an optional feature, and if ssh is not found, search the Start menu for “Optional features” and add “OpenSSH Client”. The commands are the same in all three.
ssh-keygen -t ed25519 -C "laptop key for <YOUR_DOMAIN>"
Press Enter to accept the default file location and type a passphrase when asked. The passphrase encrypts the private key on disk, so a stolen laptop does not mean a stolen server. Ed25519 has been the default key type since OpenSSH 9.5; the -t flag makes it explicit for older clients.
Print the public key and copy the whole line:
cat ~/.ssh/id_ed25519.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... laptop key for example.com
On Windows the file is $env:USERPROFILE\.ssh\id_ed25519.pub; print it with Get-Content $env:USERPROFILE\.ssh\id_ed25519.pub. Never copy or share the file without .pub.
Step 3: Create the droplet
A droplet is DigitalOcean’s name for a virtual machine: a slice of a physical server that behaves like a whole computer with its own operating system, disk and public IP address.
Create a DigitalOcean account, then open the Create Droplet page (https://cloud.digitalocean.com/droplets/new) and fill it in:
- Region: the datacenter closest to you or your visitors.
- Image: the OS tab, Debian, version 13 x64.
- Configuration type, if the page shows it: Bundled. (The newer v5 type sizes CPU and memory separately and starts at a higher price.)
- Plan: Shared CPU, Basic, Regular, then the $4/mo size: 512 MiB of memory, 1 vCPU, 10 GiB SSD and 500 GiB of outbound transfer. Those were the numbers on DigitalOcean’s pricing page on December 1, 2026. Prices change, so check before you click.
- Authentication: SSH Keys, then Add SSH Key. Paste the public key line from Step 2 and give it a name.
- Networking: tick Public IPv6 address. It is off by default and costs nothing extra.
- Hostname: something you will recognise, such as
web1. - Click Create Droplet.
Since January 1, 2026, droplets are billed per second with a monthly cap, so a mistake that you destroy after an hour costs cents. Weekly backups add 20% to the droplet price; I cover snapshots at the end.
Half a gigabyte of memory is plenty for one Go binary serving a small site. It is not enough to compile Go comfortably, run a database with real traffic, or host several applications. More on that in Step 9.
When the droplet is ready, the control panel shows its public IPv4 address (and IPv6 address if you ticked the box). Replace <SERVER_IP> below with the IPv4 address and <SERVER_IPV6> with the IPv6 address.
DNS changes can take a while to show up, so if you like, create the DNS records from Step 8 now and come back. They will be ready by the time you need them.
Step 4: First login and a user that is not root
Log in as root, the only account you can log in as so far:
ssh root@<SERVER_IP>
The first time, SSH prints the server’s key fingerprint and asks whether to continue. Type yes. Your machine records the fingerprint in ~/.ssh/known_hosts and will warn you loudly if it ever changes, which is how SSH detects someone impersonating your server.
You are now root on a machine connected to the internet. Root can do anything, including destroy the system with one typo, so day-to-day work happens as a normal user who borrows root’s power with sudo when needed. Install sudo and vim (both may already be present; apt will say so), then create your user. Replace <USERNAME> with a short lowercase name.
apt update
apt install -y sudo vim
adduser <USERNAME>
usermod -aG sudo <USERNAME>
adduser asks for a password and some optional details. The password is what sudo will ask for. It will never be usable over SSH after Step 5, but make it strong anyway.
Give the new user the same SSH key root has:
install -d -m 700 -o <USERNAME> -g <USERNAME> /home/<USERNAME>/.ssh
install -m 600 -o <USERNAME> -g <USERNAME> /root/.ssh/authorized_keys /home/<USERNAME>/.ssh/authorized_keys
authorized_keys is the list of public keys allowed to log in as that user. SSH refuses to use it if the permissions are looser than this.
Leave this root session open. In a second terminal on your laptop, log in as the new user and check that sudo works:
ssh <USERNAME>@<SERVER_IP>
sudo whoami
root
If that works, you can do everything else from the second terminal. Keep the first one open until the end of Step 5.
Step 5: Lock down SSH
Within minutes of getting a public IP, your droplet will be receiving login attempts from bots that try common usernames and passwords. Two settings make that noise harmless: no password logins at all, and no logging in as root.
Debian’s main config, /etc/ssh/sshd_config, includes every file in /etc/ssh/sshd_config.d/ near its top. Confirm that:
grep -n '^Include' /etc/ssh/sshd_config
13:Include /etc/ssh/sshd_config.d/*.conf
The line number may differ. sshd uses the first value it reads for each keyword, and included files are read in sorted order, so a file whose name sorts early wins over anything later. Create one (in vim, press i to insert text, then Esc and type :wq to save and quit):
sudo vim /etc/ssh/sshd_config.d/10-hardening.conf
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes
KbdInteractiveAuthentication is the other way a password prompt can reach you (through PAM), so it gets turned off too. Check the syntax, then check what sshd will actually use:
sudo sshd -t
sudo sshd -T | grep -E '^(permitrootlogin|passwordauthentication|kbdinteractiveauthentication|pubkeyauthentication) '
sshd -t prints nothing when the config is valid. The second command should print these four lines, in some order:
permitrootlogin no
pubkeyauthentication yes
passwordauthentication no
kbdinteractiveauthentication no
If any line disagrees, another file in sshd_config.d is setting it first; rename yours to sort earlier (for example 00-hardening.conf). Apply the change:
sudo systemctl reload ssh
A reload keeps existing sessions alive, which is why you kept one open. Now, from a third terminal on your laptop, prove both things:
ssh <USERNAME>@<SERVER_IP>
ssh root@<SERVER_IP>
The first logs in. The second must fail with Permission denied (publickey). Only when both behave this way should you close the root session from Step 4.
If you ever lock yourself out, DigitalOcean’s Recovery Console in the control panel (the droplet’s Settings tab, Launch Console) gives you a keyboard-and-screen login that does not depend on SSH. It needs a password, so log in as <USERNAME> with the password from Step 4, or reset the root password on the same tab first. Know it exists; you should not need it.
Step 6: Updates that install themselves
Install unattended-upgrades so security fixes keep arriving without you, then bring everything up to date. Installing it first matters: it adds the kernel hook that flags when a reboot is needed, so the first kernel update gets flagged too.
sudo apt update
sudo apt install -y unattended-upgrades
sudo apt full-upgrade -y
sudo dpkg-reconfigure -plow unattended-upgrades
Answer Yes to the question about automatically downloading and installing stable updates. That writes /etc/apt/apt.conf.d/20auto-upgrades:
cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
Debian’s default policy, in /etc/apt/apt.conf.d/50unattended-upgrades, installs packages from the Debian security archive and from stable point releases. Check that it runs without errors:
sudo unattended-upgrade --dry-run --debug 2>&1 | tail -n 5
It does not reboot the machine by default, and a new kernel only takes effect after a reboot. When /var/run/reboot-required exists, reboot at a time that suits you:
[ -f /var/run/reboot-required ] && sudo reboot
Step 7: Two firewalls
A port is a number from 0 to 65535 that tells the operating system which program an incoming connection is for. SSH listens on TCP port 22, HTTP on 80, HTTPS on 443. A firewall is a set of rules deciding which packets are allowed in. This server needs exactly three ports open to the world, and everything else should be dropped.
You will set up two firewalls with the same three rules. The cloud firewall runs in DigitalOcean’s network, so unwanted traffic never reaches the droplet, and a mistake on the server cannot open a port the cloud firewall blocks. The host firewall runs in the droplet’s own kernel, so the server stays protected if the cloud firewall is ever detached or edited by mistake. Two layers, each covering the other’s failure.
The cloud firewall
In the DigitalOcean control panel, open Networking, Firewalls, Create Firewall.
- Give it a name such as
web. - Inbound rules: an SSH rule on port 22 is already there. Click Add inbound rule, choose HTTP from the Type list, and save; do the same for HTTPS. Each rule’s sources default to All IPv4 and All IPv6, which is what a public website needs.
- Outbound rules: leave the default, which allows all outgoing traffic. The server needs it for updates and to talk to Let’s Encrypt.
- Apply to Droplets: type your droplet’s name and select it.
- Click Create Firewall.
Cloud firewalls cost nothing extra. You could restrict SSH to your home IP address, but home addresses change and you would lock yourself out, and DigitalOcean’s browser-based Droplet Console also needs SSH reachable. With password logins disabled, an open port 22 is acceptable.
The host firewall: nftables
Debian has used nftables as its packet filtering framework since Debian 10, and the familiar iptables commands on Debian are compatibility wrappers around it. I use nftables directly: one readable file, no extra layer. ufw is a friendlier front end and perfectly fine if you prefer it. Pick one. Two tools managing the same kernel rules will confuse you.
sudo apt install -y nftables
sudo vim /etc/nftables.conf
Replace the contents with:
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
ct state established,related accept
ct state invalid drop
iif "lo" accept
# ICMP carries errors and path MTU discovery. IPv6 cannot work without it.
meta l4proto { icmp, ipv6-icmp } accept
# SSH, HTTP, HTTPS
tcp dport { 22, 80, 443 } accept
}
chain forward {
type filter hook forward priority filter; policy drop;
}
chain output {
type filter hook output priority filter; policy accept;
}
}
Read it top to bottom. The inet family covers IPv4 and IPv6 at once. Anything arriving that no rule accepts is dropped (policy drop). Replies to connections the server started are accepted (established,related), loopback traffic is accepted, ICMP is accepted, and new connections are accepted on 22, 80 and 443 only.
Check the file before loading it, because a syntax error here is how people cut off their own SSH session:
sudo nft -c -f /etc/nftables.conf
No output means it parsed. Load it and make it load at every boot:
sudo systemctl enable nftables
sudo systemctl restart nftables
sudo nft list ruleset
Your SSH session survives because it is an established connection and port 22 is allowed anyway. Open a new SSH session from another terminal to confirm before moving on.
What you just touched
Run ip -brief address on the droplet. You will see the public IPv4 address (and IPv6, if you enabled it) on eth0, and usually a second, private address that only works inside DigitalOcean’s network.
- A public IP address is reachable from anywhere on the internet. A private one comes from ranges reserved for internal networks (
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16) and is not routed on the internet. - IPv4 addresses are 32 bits, written like
203.0.113.10. There are about 4.3 billion of them, which ran out years ago. IPv6 addresses are 128 bits, written like2001:db8::10, and there are enough for every device to have its own. - NAT (network address translation) is how the IPv4 shortage gets papered over: your home router has one public IPv4 address and rewrites traffic so every device behind it, each with a private address, can share it. Your droplet does not sit behind NAT like that. Its public address is its own, which is why it can accept connections directly, and why it needs firewalls.
Step 8: Point DNS at the droplet
DNS (the Domain Name System) is the internet’s directory: it turns example.com into an IP address. Your registrar runs name servers that answer for your domain unless you point the domain elsewhere. You can also host DNS at DigitalOcean by pointing the registrar at DigitalOcean’s name servers, but your registrar’s DNS is one less moving part.
In your registrar’s DNS settings, create two records:
| Type | Name (host) | Value | TTL |
|---|---|---|---|
| A | @ |
<SERVER_IP> |
300 |
| AAAA | @ |
<SERVER_IPV6> |
300 |
An A record maps a name to an IPv4 address; an AAAA record maps it to an IPv6 address. @ means the domain itself, with no prefix. Only create the AAAA record if you enabled IPv6 in Step 3: a wrong AAAA record breaks the site for IPv6 visitors and can make Let’s Encrypt’s validation fail. Delete any “parked page” records the registrar created for @.
TTL (time to live) is how many seconds other servers may cache the answer. 300 seconds means a mistake fixes itself in five minutes. Some registrars only offer “Auto” or a fixed list; pick the lowest reasonable value while you are setting up.
How a name becomes an address. The resolver caches each answer for its TTL, so most lookups stop at step one.
Your laptop does not walk this tree itself. It asks a recursive resolver (your ISP’s, or a public one like 1.1.1.1), which asks the root servers who handles .com, asks the .com servers which name servers handle your domain, and asks those for the A record. The answer is cached at every step for the TTL.
Check it from your laptop. dig ships with macOS; on Debian or Ubuntu it is in the bind9-dnsutils package (dnsutils on older releases). On Windows, Resolve-DnsName <YOUR_DOMAIN> in PowerShell does the same job.
dig +short A <YOUR_DOMAIN>
dig +short AAAA <YOUR_DOMAIN>
dig @1.1.1.1 +short A <YOUR_DOMAIN>
203.0.113.10
2001:db8::10
203.0.113.10
Each command must print your droplet’s address. If the answer is empty or shows an old parking address, wait a few minutes and try again. Do not continue until all three match; Let’s Encrypt will look up the same records.
How HTTPS works, and the setup I chose
TLS (Transport Layer Security, the S in HTTPS) does two jobs: it encrypts the connection, and it proves the server is really <YOUR_DOMAIN>. The proof is a certificate: a small file that says “this public key belongs to this domain,” signed by a certificate authority (CA). Your browser and operating system ship with a list of CAs they trust. When your server presents a certificate signed by one of them, for the name in the address bar, and not expired, the browser trusts it.
Let’s Encrypt is a free CA. It signs a certificate only after your server proves it controls the domain, using a protocol called ACME. The proof used here is the HTTP-01 challenge: Let’s Encrypt gives your client a random token, your client puts it in a file, and Let’s Encrypt fetches http://<YOUR_DOMAIN>/.well-known/acme-challenge/<TOKEN> on port 80. If the file is there, you control the domain. That is why port 80 stays open even though the site itself will be HTTPS only.
There are three reasonable ways to wire this up for a Go program:
- (a) certbot plus
http.ListenAndServeTLS. certbot, the EFF’s ACME client, obtains and renews the certificate and writes it to/etc/letsencrypt/. The Go program reads it at startup. systemd lets the program bind port 443 without root (AmbientCapabilities=CAP_NET_BIND_SERVICE) and hands it a private copy of the key (LoadCredential=). A certbot deploy hook restarts the program after each renewal. - (b)
golang.org/x/crypto/acme/autocert. The Go program talks to Let’s Encrypt itself and keeps certificates in a cache directory. Fewer moving parts, but the ACME logic is now inside your binary as an extra module dependency, the process needs a writable directory, and when something fails you are reading your own logs rather than a tool thousands of people use. - (c) Caddy or nginx in front of a plain-HTTP Go program. Caddy obtains and renews certificates automatically and redirects HTTP to HTTPS by default. This is the usual answer once one server hosts several sites.
I use (a) here. Each piece is visible and checkable on its own: you can watch certbot get a certificate, see the files, and see the Go program pick them up. When something breaks, you know which piece to look at. It is also close to how lauden.dev runs, and it taught me the most important failure mode in this whole setup, which I describe in Step 13. If you later prefer (b) or (c), everything you learned here still applies; you will just be moving where the same steps happen.
The loop you are about to build. Nothing in it needs you once it works.
Step 9: Write and build the Go server on your own machine
Which Go
Debian 13’s golang-go package is Go 1.24. Upstream Go supports each major release until two newer ones exist, so 1.24 lost upstream support when Go 1.26 came out on February 10, 2026. The current release is Go 1.27.4 (November 10, 2026). Debian’s release notes also say Go-based packages get only limited security support. Debian’s backports repository carries 1.27 if you need Go on a Debian box.
The droplet does not need Go at all. Go compiles to a single binary with no runtime to install, and it can build a Linux binary from macOS, Windows or Linux. Install Go 1.27.4 or newer on your laptop from go.dev/dl: the .pkg installer on macOS, the .msi on Windows, or on Linux:
curl -LO https://go.dev/dl/go1.27.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.27.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
Add the export line to ~/.profile so it survives a new terminal. If a newer Go is out when you read this, use it and change the file name.
Building on your laptop is also a lesson I learned the slow way. Compiling on a 1 GB droplet ran out of memory until I added swap. Build where you have memory, copy the binary up, and the server only ever runs it.
The program
mkdir hello
cd hello
go mod init hello
vim main.go
package main
import (
"flag"
"fmt"
"log"
"net"
"net/http"
"os"
"path/filepath"
"time"
)
// certbot writes challenge files under this directory.
const acmeWebroot = "/var/www/acme"
func main() {
httpAddr := flag.String("http", ":80", "plain HTTP listen address")
httpsAddr := flag.String("https", ":443", "HTTPS listen address")
flag.Parse()
// The site itself.
site := http.NewServeMux()
site.HandleFunc("GET /{$}", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello World!")
})
// Port 80 always answers Let's Encrypt challenges.
plain := http.NewServeMux()
plain.Handle("GET /.well-known/acme-challenge/", http.FileServer(http.Dir(acmeWebroot)))
// systemd sets CREDENTIALS_DIRECTORY when the unit has LoadCredential= lines.
creds := os.Getenv("CREDENTIALS_DIRECTORY")
if creds == "" {
log.Printf("no certificate: serving plain HTTP on %s", *httpAddr)
plain.Handle("/", site)
log.Fatal(newServer(*httpAddr, plain).ListenAndServe())
}
// With a certificate, port 80 redirects everything else to HTTPS.
plain.HandleFunc("/", redirectToHTTPS)
go func() {
log.Fatal(newServer(*httpAddr, plain).ListenAndServe())
}()
log.Printf("certificate loaded: serving HTTPS on %s", *httpsAddr)
log.Fatal(newServer(*httpsAddr, site).ListenAndServeTLS(
filepath.Join(creds, "fullchain.pem"),
filepath.Join(creds, "privkey.pem"),
))
}
func redirectToHTTPS(w http.ResponseWriter, r *http.Request) {
host, _, err := net.SplitHostPort(r.Host)
if err != nil {
host = r.Host // no port in the Host header
}
http.Redirect(w, r, "https://"+host+r.URL.RequestURI(), http.StatusMovedPermanently)
}
// newServer sets timeouts. A bare http.ListenAndServe has none, so a slow
// or stalled client can hold a connection open forever.
func newServer(addr string, h http.Handler) *http.Server {
return &http.Server{
Addr: addr,
Handler: h,
ReadHeaderTimeout: 5 * time.Second,
ReadTimeout: 10 * time.Second,
WriteTimeout: 30 * time.Second,
IdleTimeout: 120 * time.Second,
}
}
What it does:
GET /{$}matches only the root path (the{$}means “end of path”), using the routing patterns added in Go 1.22. Anything else on the site gets a 404.- Port 80 always serves files under
/var/www/acme/.well-known/acme-challenge/, which is where certbot will drop the challenge tokens. - The program runs in one of two modes. Before a certificate exists, it serves the site over plain HTTP on port 80. Once systemd hands it a certificate (Step 12), it serves the site over HTTPS on 443 and port 80 answers everything except challenges with a 301 redirect to
https://. This lets you prove each layer works before adding the next. ListenAndServeTLStakes the certificate file and the key file. The certificate file must contain your certificate followed by the intermediate certificates, which is exactly what certbot’sfullchain.pemholds.- The four timeouts stop slow or malicious clients from holding connections open forever.
ReadHeaderTimeoutis the one that defends against clients that send headers one byte at a time.
Try it locally on an unprivileged port, then hit it from another terminal:
go run . -http 127.0.0.1:8080
curl http://127.0.0.1:8080/
Hello World!
On Windows, type curl.exe so PowerShell does not substitute its own curl alias. Stop the server with Ctrl+C. Now build for the droplet, which is Linux on 64-bit x86:
go vet ./...
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o hello .
On Windows PowerShell, set the variables first: $env:CGO_ENABLED="0"; $env:GOOS="linux"; $env:GOARCH="amd64"; go build -o hello .
GOOS and GOARCH pick the target operating system and CPU, so a Mac with Apple silicon produces an x86-64 Linux binary. CGO_ENABLED=0 matters most when you build on Linux: Go enables cgo by default for native builds, which can link the binary against your laptop’s C library, and a newer C library than the server’s makes the binary refuse to start. (I wrote about that trap in Linux release builds: glibc is too new and musl cannot load Wayland.) With cgo off, the binary is fully static.
Copy it to your home directory on the server:
scp hello <USERNAME>@<SERVER_IP>:
Step 10: Run it under systemd as an unprivileged user
On the droplet, put the binary in place, create a system account for it, and create the challenge directory:
sudo install -m 0755 ~/hello /usr/local/bin/hello
sudo useradd --system --user-group --no-create-home --shell /usr/sbin/nologin hello
sudo install -d -m 0755 /var/www/acme
The hello account cannot log in and owns nothing. If someone finds a bug in your program and takes it over, they get the powers of that account, not root’s.
Ports below 1024 normally require root. Instead of running as root, you give the process one capability, CAP_NET_BIND_SERVICE, which allows binding low ports and nothing else. systemd does that for you. Create the unit file:
sudo vim /etc/systemd/system/hello.service
[Unit]
Description=Hello World Go web server
After=network-online.target
Wants=network-online.target
[Service]
User=hello
Group=hello
ExecStart=/usr/local/bin/hello
Restart=on-failure
RestartSec=2
# Let an unprivileged process bind ports below 1024, and nothing more.
AmbientCapabilities=CAP_NET_BIND_SERVICE
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
NoNewPrivileges=yes
# Read-only view of the filesystem, no access to /home, private /tmp and /dev.
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
[Install]
WantedBy=multi-user.target
AmbientCapabilities grants the capability to the unprivileged process; CapabilityBoundingSet makes it the only one the process could ever hold; NoNewPrivileges stops it gaining more through setuid programs. ProtectSystem=strict mounts the whole filesystem read-only for this service, which is fine because it only reads. Restart=on-failure brings it back if it crashes.
Start it and enable it at boot:
sudo systemctl daemon-reload
sudo systemctl enable --now hello
sudo systemctl status hello --no-pager
The sudo on status matters: a normal user is not allowed to read the system journal, so without it you would not see the program’s log lines. Look for active (running) and the log line no certificate: serving plain HTTP on :80. From your laptop:
curl http://<YOUR_DOMAIN>/
Hello World!
That one line proves DNS, both firewalls, the binary and the service. If it fails, test each layer: dig for DNS, curl http://<SERVER_IP>/ to skip DNS, sudo ss -tlnp on the droplet to see whether anything listens on port 80, and sudo journalctl -u hello for the program’s own errors.
Step 11: Get the certificate
Install certbot from Debian:
sudo apt install -y certbot
Debian 13 ships certbot 4.0.0. Run a dry run first. It uses Let’s Encrypt’s staging environment, which has much higher rate limits, so mistakes cost nothing:
sudo certbot certonly --webroot -w /var/www/acme -d <YOUR_DOMAIN> --dry-run
certonly means “get a certificate but do not edit any web server config.” --webroot -w /var/www/acme tells certbot to prove control by writing the token under /var/www/acme/.well-known/acme-challenge/, which your Go program is already serving. certbot asks for an email address and agreement to the terms of service the first time it talks to each environment, so expect the same questions on the real run. The email is optional (press Enter to skip it); Let’s Encrypt no longer sends expiry warnings, as covered below. When the dry run reports success, do it for real:
sudo certbot certonly --webroot -w /var/www/acme -d <YOUR_DOMAIN>
The output starts like this, followed by notes about renewal:
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/example.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/example.com/privkey.pem
This certificate expires on 2027-03-01.
The private key is privkey.pem. certbot creates it readable by root only, inside directories only root can enter. Never copy it anywhere, never chmod it open, and never commit it to Git.
If you also want www.<YOUR_DOMAIN>, add an A (and AAAA) record for www, then rerun the command with -d <YOUR_DOMAIN> -d www.<YOUR_DOMAIN> and let certbot expand the existing certificate.
Step 12: Hand the certificate to the service
The hello account cannot read /etc/letsencrypt/live/, and it should stay that way. systemd’s LoadCredential= solves this: at service start, systemd (running as root) reads the files and places copies in a private directory that only the service’s user can read, and tells the program where with the CREDENTIALS_DIRECTORY environment variable. Your key’s permissions never change.
The files in live/ are symlinks into /etc/letsencrypt/archive/. Pointing LoadCredential= at each file, as below, follows them. Do not point it at the live/<YOUR_DOMAIN> directory instead: when loading a directory, systemd skips symlinks, so the program would find no certificate files and exit.
Edit the unit file again:
sudo vim /etc/systemd/system/hello.service
Add these two lines at the end of the [Service] section, with your real domain in the paths:
LoadCredential=fullchain.pem:/etc/letsencrypt/live/<YOUR_DOMAIN>/fullchain.pem
LoadCredential=privkey.pem:/etc/letsencrypt/live/<YOUR_DOMAIN>/privkey.pem
Reload systemd and restart the service:
sudo systemctl daemon-reload
sudo systemctl restart hello
sudo journalctl -u hello -n 3 --no-pager
The last line should read certificate loaded: serving HTTPS on :443. Open https://<YOUR_DOMAIN> in a browser. You should see Hello World! and a padlock.
Step 13: Make renewal reach the running program
Let’s Encrypt certificates expire, so renewal has two halves: getting a new certificate, and getting the running program to use it. The Debian package installs certbot.timer, which runs certbot renew twice a day. Check it:
systemctl list-timers certbot.timer
certbot 4.0 renews a certificate once less than a third of its lifetime remains. That covers the first half. The second half is where I got burned.
lauden.dev runs in Docker, and my Go server read its certificate once, at startup. certbot renewed on schedule and certbot certificates showed a valid certificate, but openssl s_client showed the site still serving the old one, which had expired, because the process had been running for months without a restart. Nothing reloads a certificate the program has already read. Restarting the container fixed it that day; the lasting fix is a certbot deploy hook that restarts it after every successful renewal.
The setup here has the same property on purpose: systemd credentials are copied at service start and do not change while the service runs. So add the hook. Executables in /etc/letsencrypt/renewal-hooks/deploy/ run after each successful certificate issuance:
sudo vim /etc/letsencrypt/renewal-hooks/deploy/restart-hello.sh
#!/bin/sh
systemctl restart hello
sudo chmod 755 /etc/letsencrypt/renewal-hooks/deploy/restart-hello.sh
Test the hook directly, then test renewal against staging:
sudo /etc/letsencrypt/renewal-hooks/deploy/restart-hello.sh
systemctl is-active hello
sudo certbot renew --dry-run
systemctl is-active should print active, and the dry run should end with a line saying the simulated renewal succeeded. A restart drops connections that are open at that instant and takes a fraction of a second. For a personal site that is fine. If it is not fine for you, the next step is a tls.Config.GetCertificate function that rereads the files without restarting.
Let’s Encrypt in December 2026
The rules are changing under you, so here is where they stand:
- Lifetimes are shrinking. Default certificates last 90 days today. From February 10, 2027, new certificates last 64 days, and from February 16, 2028, 45 days. The time a successful validation can be reused drops from 30 days to 10 days in February 2027 and to 7 hours in February 2028. You can already opt in to 45-day certificates (the
tlsserverprofile) or 6-day certificates (theshortlivedprofile). certbot’s “renew at one third remaining” rule handles all of these. Let’s Encrypt’s advice is to use ARI (ACME Renewal Information, where the CA tells the client when to renew), which certbot added in 4.1.0; Debian 13’s 4.0.0 does not have it, and the one-third rule is enough. - No more expiry emails. Let’s Encrypt stopped sending expiration warnings on June 4, 2025. If renewal breaks, nobody tells you. Use an external certificate monitor (Let’s Encrypt points to third-party services) or check by hand with the
opensslcommand in Step 14. - OCSP is gone. OCSP URLs were removed from certificates on May 7, 2025, and the service shut down on August 6, 2025. Revocation is published through CRLs instead. There is nothing for you to configure.
- New intermediates. Certificates are now issued from the YE1/YE2 (ECDSA) and YR1/YR2 (RSA) intermediates. certbot creates ECDSA keys by default, so expect YE1 or YE2 as the issuer.
- Rate limits. 50 new certificates per registered domain per 7 days, 5 certificates for the exact same set of names per 7 days, and 5 failed validations per name per account per hour. This is why you used
--dry-runfirst.
Step 14: Verify from the outside
From your laptop, check that plain HTTP redirects:
curl -I http://<YOUR_DOMAIN>/
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: https://example.com/
Date: Tue, 01 Dec 2026 17:00:00 GMT
Check HTTPS. Go’s server negotiates HTTP/2 automatically:
curl -I https://<YOUR_DOMAIN>/
HTTP/2 200
content-type: text/plain; charset=utf-8
content-length: 13
date: Tue, 01 Dec 2026 17:00:00 GMT
curl verifies the certificate by default; if it were wrong, you would get an error instead of headers. Now look at the certificate itself:
openssl s_client -connect <YOUR_DOMAIN>:443 -servername <YOUR_DOMAIN> </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates
subject=CN=example.com
issuer=C=US, O=Let's Encrypt, CN=YE1
notBefore=Dec 1 16:00:00 2026 GMT
notAfter=Mar 1 15:59:59 2027 GMT
openssl ships with macOS and Linux; on Windows, run the same command on the droplet. The spacing differs between OpenSSL versions. What matters: the subject is your domain, the issuer is Let’s Encrypt, and notAfter is in the future. This is the command that would have caught my stale-certificate problem: it shows what the server is actually serving, not what is sitting on disk. Run it after the first automatic renewal to see the dates move.
That is the whole procedure. You own a domain, rent a hardened server, and run your own program on it over HTTPS that maintains itself.
Serve a real page
Hello World! in plain text proves the plumbing. A website is HTML, CSS and JavaScript files, and the simplest way to serve them from Go is to compile them into the binary with embed, so deploying is still one file.
On your laptop, inside the hello directory, create a static directory with three files:
mkdir static
vim static/index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello World!</title>
<link rel="stylesheet" href="/style.css?v=1">
</head>
<body>
<h1>Hello World!</h1>
<p id="note">Served by my own Go program.</p>
<script src="/app.js?v=1"></script>
</body>
</html>
vim static/style.css
body { font-family: system-ui, sans-serif; margin: 3rem; }
vim static/app.js
document.getElementById("note").textContent += " JavaScript ran.";
The ?v=1 on the CSS and JavaScript links looks odd now. The next section explains it.
In main.go, the site needs to serve files from static instead of a fixed string. The complete file, with the caching headers from the next section already in it, is below. Replace your main.go with it, then rebuild and deploy:
go vet ./...
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o hello .
scp hello <USERNAME>@<SERVER_IP>:
ssh -t <USERNAME>@<SERVER_IP> 'sudo install -m 0755 ~/hello /usr/local/bin/hello && sudo systemctl restart hello'
That last command runs on the server over SSH; -t gives it a terminal so sudo can ask for your password. Those four lines are your whole deploy process. Reload https://<YOUR_DOMAIN> and you should see a heading, the sentence, and “JavaScript ran.” at the end of it.
Browser caching, the pain you will hit next
Change style.css, deploy, reload, and unless the file’s URL changed too, there is a fair chance your browser shows the old styles. Your visitors may see a mix: new HTML with old CSS, or old JavaScript calling things your new HTML no longer has. Every web developer hits this. It is caching doing what the HTTP specification allows.
A browser keeps copies of responses. For each one, it decides whether the copy is fresh (use it without asking the server) or stale (ask the server first). The server controls that decision with headers:
Cache-Controlstates the policy.max-age=31536000means “fresh for a year.”no-cachemeans “you may store it, but check with me before every use” (despite the name, it does not mean “do not cache”; that isno-store).immutablemeans “this URL will never have different content.”ETagis a validator: a tag that changes when the content changes. The browser sends it back inIf-None-Match, and the server answers304 Not Modifiedwith no body if it still matches.Last-Modifiedis the older validator, a timestamp checked withIf-Modified-Since.
When a response has no Cache-Control at all, the browser guesses. RFC 9111 calls this heuristic freshness and suggests a typical value of 10% of the time since Last-Modified. A CSS file last changed 30 days ago can be treated as fresh for about three days without the browser ever asking your server. That is your stale-styles bug.
What Go’s http.FileServer actually sends
These headers come from running both kinds of Go file server on a test machine (Go 1.24.7, Linux) and checking with curl -I; the file server code in Go 1.27.4 handles validators the same way. Serving files from a directory on disk with http.FileServer(http.Dir("static")):
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 59
Content-Type: text/css; charset=utf-8
Last-Modified: Sun, 01 Nov 2026 12:00:00 GMT
Date: Tue, 01 Dec 2026 16:40:21 GMT
Last-Modified, no Cache-Control and no ETag: exactly the case where browsers apply the heuristic. Serving the same files embedded in the binary with http.FileServerFS:
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 59
Content-Type: text/css; charset=utf-8
Date: Tue, 01 Dec 2026 16:40:21 GMT
No validator of any kind. Embedded files carry no modification time, so Go omits Last-Modified, and it never invents an ETag. With nothing to compare, every check means downloading the whole file again, and you have no say in how long the browser trusts its copy. Run the same curl -I against your own build to see what your Go version does.
Seeing it in DevTools
Open your browser’s developer tools (F12, or Cmd+Option+I on a Mac) and go to the Network tab. Reload. The size column shows whether each file came from the network, from the memory or disk cache, or as a 304. Click a file to see its request and response headers. The Disable cache checkbox in that tab turns caching off while DevTools is open, which is what you want while developing. It does nothing for your visitors.
Fixes, in order of effort
- Hard reload (Ctrl+Shift+R, or Cmd+Shift+R on a Mac). Fixes your browser, once. Your visitors still have old copies.
- A version query string. Link to
/style.css?v=2instead of/style.css?v=1when the file changes. To the browser that is a new URL, so there is no stale copy to find. This is what I do on lauden.dev: when I change a CSS or JavaScript file, I bump its?v=number in the HTML. The cost is remembering to do it. - Content-hashed filenames. A build step renames
style.cssto something likestyle.3f2a9c1e.css, where the hash comes from the file’s content, and rewrites the HTML to match. The name changes exactly when the content does, and nobody has to remember anything. Front-end build tools do this for you; for a three-file site it is more machinery than the problem needs. - Explicit headers. Whatever you choose above, tell the browser the rules instead of letting it guess. HTML pages get
Cache-Control: no-cacheplus anETag, so the browser checks every time and usually gets a cheap 304. Versioned assets getmax-age=31536000, immutable, because a new version will have a new URL.
The final main.go does 2 and 4. It computes an ETag from each embedded file’s content at startup, and sets Cache-Control depending on whether the URL has a ?v= parameter:
package main
import (
"crypto/sha256"
"embed"
"flag"
"fmt"
"io/fs"
"log"
"net"
"net/http"
"os"
"path/filepath"
"strings"
"time"
)
// certbot writes challenge files under this directory.
const acmeWebroot = "/var/www/acme"
// The static directory is compiled into the binary.
//
//go:embed static
var embedded embed.FS
func main() {
httpAddr := flag.String("http", ":80", "plain HTTP listen address")
httpsAddr := flag.String("https", ":443", "HTTPS listen address")
flag.Parse()
static, err := fs.Sub(embedded, "static")
if err != nil {
log.Fatal(err)
}
etags, err := hashFiles(static)
if err != nil {
log.Fatal(err)
}
// The site itself.
site := http.NewServeMux()
site.Handle("GET /", cacheHeaders(etags, http.FileServerFS(static)))
// Port 80 always answers Let's Encrypt challenges.
plain := http.NewServeMux()
plain.Handle("GET /.well-known/acme-challenge/", http.FileServer(http.Dir(acmeWebroot)))
// systemd sets CREDENTIALS_DIRECTORY when the unit has LoadCredential= lines.
creds := os.Getenv("CREDENTIALS_DIRECTORY")
if creds == "" {
log.Printf("no certificate: serving plain HTTP on %s", *httpAddr)
plain.Handle("/", site)
log.Fatal(newServer(*httpAddr, plain).ListenAndServe())
}
// With a certificate, port 80 redirects everything else to HTTPS.
plain.HandleFunc("/", redirectToHTTPS)
go func() {
log.Fatal(newServer(*httpAddr, plain).ListenAndServe())
}()
log.Printf("certificate loaded: serving HTTPS on %s", *httpsAddr)
log.Fatal(newServer(*httpsAddr, site).ListenAndServeTLS(
filepath.Join(creds, "fullchain.pem"),
filepath.Join(creds, "privkey.pem"),
))
}
// hashFiles returns an ETag for every embedded file, built from its content.
func hashFiles(fsys fs.FS) (map[string]string, error) {
tags := make(map[string]string)
err := fs.WalkDir(fsys, ".", func(name string, d fs.DirEntry, err error) error {
if err != nil || d.IsDir() {
return err
}
data, err := fs.ReadFile(fsys, name)
if err != nil {
return err
}
sum := sha256.Sum256(data)
tags[name] = fmt.Sprintf(`"%x"`, sum[:8])
return nil
})
return tags, err
}
// cacheHeaders tells the browser how long it may reuse each response and
// gives it a validator so it can ask "has this changed?" cheaply.
func cacheHeaders(etags map[string]string, next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
name := strings.TrimPrefix(r.URL.Path, "/")
if name == "" || strings.HasSuffix(name, "/") {
name += "index.html"
}
if tag, ok := etags[name]; ok {
w.Header().Set("ETag", tag)
}
if r.URL.Query().Has("v") {
// Versioned URL: new content gets a new URL, so keep it for a year.
w.Header().Set("Cache-Control", "public, max-age=31536000, immutable")
} else {
// Everything else: keep a copy, but check with the server before using it.
w.Header().Set("Cache-Control", "no-cache")
}
next.ServeHTTP(w, r)
})
}
func redirectToHTTPS(w http.ResponseWriter, r *http.Request) {
host, _, err := net.SplitHostPort(r.Host)
if err != nil {
host = r.Host // no port in the Host header
}
http.Redirect(w, r, "https://"+host+r.URL.RequestURI(), http.StatusMovedPermanently)
}
// newServer sets timeouts. A bare http.ListenAndServe has none, so a slow
// or stalled client can hold a connection open forever.
func newServer(addr string, h http.Handler) *http.Server {
return &http.Server{
Addr: addr,
Handler: h,
ReadHeaderTimeout: 5 * time.Second,
ReadTimeout: 10 * time.Second,
WriteTimeout: 30 * time.Second,
IdleTimeout: 120 * time.Second,
}
}
When the ETag header is already set, Go’s file server uses it to answer If-None-Match itself, so the 304 handling comes for free. Running this version locally on the same test machine with go run . -http 127.0.0.1:8090:
curl -I http://127.0.0.1:8090/
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: no-cache
Content-Length: 355
Content-Type: text/html; charset=utf-8
Etag: "825fb19a1309e3be"
Date: Tue, 01 Dec 2026 16:51:41 GMT
curl -I -H 'If-None-Match: "825fb19a1309e3be"' http://127.0.0.1:8090/
HTTP/1.1 304 Not Modified
Cache-Control: no-cache
Etag: "825fb19a1309e3be"
Date: Tue, 01 Dec 2026 16:51:41 GMT
Your hash will differ unless your index.html is byte-for-byte the same. And curl -I "http://127.0.0.1:8090/style.css?v=1" shows Cache-Control: public, max-age=31536000, immutable. The rule you now live by: when you change a CSS or JavaScript file, bump its ?v= in the HTML. The HTML itself is always revalidated, so the new number reaches visitors on their next visit.
Learning the front end
The server is the hard part I insisted on learning first. What runs in the browser is three languages:
- HTML describes the structure and content of the page. People still say “HTML5,” but HTML is now a single “Living Standard” maintained by the WHATWG and updated continuously.
- CSS controls how it looks. “CSS3” likewise means modern CSS, which is published as separate modules rather than numbered versions.
- JavaScript makes it do things after it loads.
I learned all three from two free resources, and both were live when I checked on December 1, 2026:
- HTML Dog has short, plain tutorials for HTML, CSS and JavaScript, plus references for tags, attributes and CSS properties. Good for a first pass, when you want to know what exists and see a small working example.
- MDN Web Docs is the reference you will keep open for the rest of your career: every element, CSS property and JavaScript API, with browser compatibility tables, plus a structured “Learn web development” curriculum and guides on HTTP itself, including caching.
The method that works is tinkering. Change index.html, rebuild, deploy, look at the result, and open DevTools to see why it looks the way it does. Break things on purpose. You now have a real server where a change takes thirty seconds to go live, which is the best possible place to learn.
Hosting at home instead
You could run the same Go program on an old laptop or a Raspberry Pi in your living room. It is not that hard, and doing it once teaches you more about networking than a semester of slides. Here is what changes.
The same Go program, two very different networks around it.
- Your public IP can change. Most residential connections get a dynamic IPv4 address that the ISP may reassign. A dynamic DNS service updates your A record whenever it changes, usually through a small client on the router or the server. Between the change and the update, your site is down.
- Port forwarding. Your server has a private address such as
192.168.1.50behind the router’s NAT. You tell the router to forward incoming TCP 80 and 443 to that address. - CGNAT. Some ISPs put customers behind carrier-grade NAT, so even your router has no public IPv4 address. If your router’s WAN address is in
100.64.0.0/10(the range reserved for this) or does not match what a “what is my IP” site reports, port forwarding cannot work over IPv4. IPv6, if your ISP offers it, may still work. - ISP terms and blocked ports. Many residential service agreements restrict running servers, and some ISPs block certain inbound ports; Comcast, for example, says it blocks a limited number of ports commonly used for spam. Read your terms before you rely on it.
- Uptime and power. A power cut, a router reboot, or the cat on the power strip takes your site down. Datacenters have redundant power and network links.
- Your home network is now exposed. If someone breaks into the server, they are inside the same network as your laptop, your phone and everything else. At minimum, put the server on its own network segment (a separate VLAN or a guest network) that cannot reach the rest.
- Tunnels. Services like Cloudflare Tunnel and Tailscale Funnel avoid port forwarding entirely: a small client on your server makes an outbound connection to their network, and they forward visitors to you. That works behind CGNAT and opens no inbound ports, at the cost of routing all your traffic through a third party. Tailscale Funnel, for one, only listens on ports 443, 8443 and 10000.
My advice: for anything other people depend on, rent. Four dollars a month buys a static IP, datacenter power, and a machine that has nothing of yours next to it. Do the home version once anyway, for the education.
What you actually rented: IaaS, PaaS and SaaS
My notes for this article said “Software as Infrastructure.” The correct term is Infrastructure as a Service (IaaS), one of three service models in NIST’s definition of cloud computing:
- IaaS: you rent virtual machines, disks and networks, and manage everything from the operating system up. A droplet is IaaS. So are AWS’s EC2 instances and Azure Virtual Machines.
- PaaS (Platform as a Service): you hand over your code or a container and the provider runs it, including the OS, patches and scaling. DigitalOcean’s App Platform is PaaS.
- SaaS (Software as a Service): you use finished software in a browser. Squarespace and Wix are SaaS.
DigitalOcean, AWS and Azure all rent you the same basic pieces: virtual machines, block storage, networks, firewalls, load balancers, DNS and managed databases. The closest AWS equivalent to a $4 droplet is Amazon Lightsail, which sells fixed monthly bundles (from $5 a month with a public IPv4 address, or $3.50 IPv6-only, as listed on December 1, 2026); Amazon EC2 is the full-control version with far more options and more complex pricing. On Azure, the equivalent is Azure Virtual Machines.
Why you need to learn this even if your first job is “just” writing code: your code will run on one of these, and somebody has to understand the layers between it and the user. The consoles differ. The layers do not: an IP address, a firewall, DNS, a certificate, a process running as some user. You just set up every one of them by hand.
What next
- Snapshot before you change anything important. A DigitalOcean snapshot of a 10 GiB droplet costs cents a month and turns a broken upgrade into a five-minute restore. I wrote about the habit in Virtual Machines: Snapshot Before You Touch Production.
- Read your logs.
sudo journalctl -u hello -ffollows your program’s output live.sudo journalctl -u certbotshows renewal runs.sudo journalctl -u sshshows the login attempts your hardening is turning away. - Keep Go and the OS current. Unattended upgrades handle Debian’s packages. They do not touch your binary. Go point releases regularly include security fixes (1.27.4 had several, including in
net/http), and those fixes reach your server only when you rebuild with the new Go and redeploy. Do it whenever a point release comes out. - Check the certificate after the first renewal. Run the
opensslcommand from Step 14 again once the first certificate has renewed, and confirm the dates moved. - Know what not to put on a $4 server. Do not compile on it. Do not run a database holding data you cannot lose unless you also pay for backups (weekly backups are 20% of the droplet price). Do not run a mail server: outbound email from cloud IP addresses has deliverability problems that are a whole article of their own. Do not store other people’s secrets on it. And when you outgrow 512 MiB, resize the droplet rather than fighting the memory limit.
Sources and further reading
- DigitalOcean Droplet pricing supports the $4 plan specs, per-second billing from January 1, 2026, backup pricing and the Bundled/v5 distinction.
- DigitalOcean: Linux images for Droplets confirms the Debian 13 x64 image.
- DigitalOcean: How to create a Droplet supports the creation steps and the IPv6 checkbox being off by default.
- DigitalOcean: Create a cloud firewall and Configure firewall rules support the firewall steps, default rules and no-cost statement.
- DigitalOcean: Droplet Console and Recovery Console support the console notes.
- Debian news lists Debian 13.8, released November 21, 2026.
- Debian 13 release notes: issues to be aware of supports limited security support for Go packages and systemd 257.
- Debian Administrator’s Handbook: packet filtering supports nftables as Debian’s default framework.
- sshd_config(5) supports first-value-wins,
Includeordering and the authentication keywords. - OpenSSH 9.5 release notes supports Ed25519 as the default key type.
- Microsoft: Get started with OpenSSH for Windows supports the Windows client notes.
- unattended-upgrades default configuration supports the default origins and the no-reboot default; the same repository’s
kernel/postinst.dhook is what creates/var/run/reboot-required. - Go release history supports the support policy, Go 1.26 and 1.27 release dates, and 1.27.4’s security fixes; go.dev/dl the current version.
- Debian package tracker: golang-defaults, python-certbot and systemd support Go 1.24, certbot 4.0.0 and systemd 257 in Debian 13.
- Certbot changelog supports the 4.0.0 renewal threshold, ARI arriving in 4.1.0, and directory hooks running for every subcommand since 3.2.0.
- Go net/http documentation supports
ListenAndServeTLS,ServeContentvalidator handling and server timeouts; cmd/cgo the cgo defaults. - systemd.exec(5), version 257 and systemd credentials support
LoadCredential=(including that directory loads skip symlinks),AmbientCapabilities=and the sandboxing options. - Certbot user guide supports webroot, deploy hooks, the one-third renewal rule, ECDSA default and key permissions.
- Let’s Encrypt: Decreasing certificate lifetimes to 45 days and 64-day certificates support the lifetime and authorization reuse schedule.
- Let’s Encrypt: Expiration notification service has ended, OCSP service has reached end of life, Chains of trust and Rate limits support the remaining Let’s Encrypt notes.
- Caddy: Automatic HTTPS and autocert support the alternatives.
- RFC 9111, HTTP Caching and MDN: HTTP caching support the caching section.
- RFC 6598 defines the CGNAT shared address space.
- Cloudflare Tunnel and Tailscale Funnel support the tunnel notes.
- NIST SP 800-145 defines IaaS, PaaS and SaaS; DigitalOcean App Platform and Amazon Lightsail pricing support the provider examples.
- Squarespace pricing and Wix plans support the price ranges; Domain Name Wire the
.comwholesale price; Cloudflare Registrar at-cost pricing.