Summary
- What you’ll do: Provision a VPS, secure SSH, install tmux, Caddy, a domain, OpenAI tooling, and developer essentials.
- Prerequisites: A computer with macOS/Linux/WSL, a terminal, a credit card, and basic command‑line familiarity.
- Estimated time: 45–75 minutes (DNS may take longer to propagate).
Jump to steps
- 1) Procure a VPS
- 2) Set up SSH keys
- 3) Install tmux
- 4) Install Caddy
- 5) Configure Porkbun DNS
- 6) OpenAI tools
- 7) Dev essentials
1) Procure a VPS at freerangecloud.com
Go to freerangecloud.com → Products → Virtual Private Servers and choose the “Coop” plan (2 vCPU, 3072MB RAM, 60GB SSD, 1 IPv4, 6TB transfer) at 10.99 USD per month. Pick the location closest to the Bay Area (Fremont, USA West) or your preference; select Ubuntu 24.04 LTS if offered; complete checkout; once provisioned, note the public IPv4 address.
2) Set up SSH keys on your local machine and install them on the server
Generate an SSH keypair, add it to the server, and test login.
Generate a keypair:
ssh-keygen -t ed25519 -C “your_email@example.com”
Copy your public key to the server (replace username and SERVER_IP):
ssh-copy-id -i ~/.ssh/id_ed25519.pub username@SERVER_IP
If ssh-copy-id is unavailable, paste your public key into the VPS control panel instead.
Test login:
ssh username@SERVER_IP
Optionally harden SSH by disabling password authentication after confirming key login works.
3) Install tmux on the VPS
Install and verify:
sudo apt update && sudo apt install -y tmux
tmux -V
Primer: Ctrl-b then c (new window), d (detach), ls (list), a (attach).
4) Install the Caddy web server and enable it as a service
Install from the official repository and enable on boot.
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
source /etc/os-release
curl -fsSL https://dl.cloudsmith.io/public/caddy/stable/gpg.key | sudo gpg –dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
echo “deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/ubuntu ${VERSION_CODENAME} main” | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install -y caddy
caddy version
sudo systemctl enable –now caddy
Minimal /etc/caddy/Caddyfile to serve /var/www/html and, once a domain is set, automatically obtain TLS:
example.com {
root * /var/www/html
file_server
}
Reload Caddy after edits:
sudo systemctl reload caddy
5) Buy a domain at porkbun.com and point it to your VPS IP
Create or log in to your Porkbun account; search for and purchase a domain; in Domain Management, open DNS records; add an A record with host @ pointing to SERVER_IP and TTL 300; optionally add an A record or CNAME for host www (either A → SERVER_IP or CNAME → @); save; allow DNS to propagate (usually minutes; up to 24h). Once live, update the Caddyfile to use your real domain and reload Caddy to obtain HTTPS automatically.
6) Install OpenAI tools for coding
Note: OpenAI Codex has been retired; use current code‑capable models via the OpenAI API instead.
sudo apt install -y python3 python3-pip
python3 -m pip install –upgrade openai
echo ‘export OPENAI_API_KEY=your_key_here’ >> ~/.profile && . ~/.profile
Short Python example calling a code‑capable model (gpt-4o-mini) for inline code assistance:
from openai import OpenAI
client = OpenAI()
resp = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are a helpful coding assistant."},
{"role": "user", "content": "Write a Python function to reverse a string."},
],
)
print(resp.choices[0].message.content)
Optional: explore terminal‑friendly CLIs and editors that integrate AI prompts (e.g., Vim/Emacs plugins or small wrapper scripts) for quick “inline” help.
7) Install developer essentials on the VPS
Go (Linux tarball install; example version):
wget https://go.dev/dl/go1.25.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.25.linux-amd64.tar.gz
echo ‘export PATH=$PATH:/usr/local/go/bin’ >> ~/.profile && . ~/.profile
go version
Ripgrep:
sudo apt install -y ripgrep
Editors:
sudo apt install -y emacs-nox vim
Keep the system updated:
sudo apt update && sudo apt upgrade -y
Create a basic /var/www/html/index.html and load your domain in a browser to confirm web serving. When ready, update your Caddyfile with the real domain and reload Caddy to enable HTTPS.
Helpful links: Caddy docs · Go downloads · OpenAI API docs