OS·WholeTech
🐧 Ubuntu & Debian · droplets & servers

The AI stack on Linux.

Everything you need to run modern AI tools on a Linux server — Claude Code, Codex, Gemini, Tailscale, and Ollama. Perfect for a DigitalOcean droplet or any Ubuntu/Debian box you reach over SSH.

You'll be typing into a terminal connected to a server somewhere else. Since the server has no desktop, the AI tools log in by printing a link — you copy it into your own browser to sign in. Every command is here to copy.

Before you start

What you'll need

1

SSH in & package manager

SSH is how you reach a server from your own computer — you type into a terminal on your laptop and it runs on the server. apt is the built-in app installer on Ubuntu and Debian; it downloads and installs software with one line, so you never hunt for download buttons.

Why this first: every tool below installs through the terminal over SSH. Get connected and updated, and the rest is copy-paste.

Connect to your server

Open a terminal on your own PC or Mac and connect. Replace the IP with your droplet's address (and use your sudo user instead of root if you've made one):

ssh root@YOUR-SERVER-IP
Update the system & install basics
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git build-essential
Install Node.js (the engine three of the AI tools run on)

This adds the official NodeSource repository, then installs the current LTS version:

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt install -y nodejs

Confirm it's there:

node --version
npm --version
✓ Working when: both print version numbers (e.g. v22.x.x and 10.x.x).
2

Claude Code

Anthropic's AI coding agent — the same kind of assistant that built this page. It lives in your terminal, reads and edits real files, and runs commands for you.

Why you want it: it does actual multi-step work (build a site, fix a script, organize files), not just chat — and it's right at home on a server.

Install

The simplest, most reliable way is through npm (which you just installed with Node):

npm install -g @anthropic-ai/claude-code

There's also a native one-line installer if you prefer:

curl -fsSL https://claude.ai/install.sh | bash
Start it & log in

Go into any folder you want to work in, then launch:

claude

On a headless server there's no browser, so the first run prints a URL. Copy that link, open it in the browser on your laptop or phone, sign in to your Anthropic account, and you're authorized. After that, just type what you want in plain English.

✓ Working when: running claude --version prints a version, and typing claude drops you into a prompt that greets you.
📘Go deeper: the full Claude playbook — settings, skills, MCP servers — lives at claude.wholetech.com.
3

Codex

OpenAI's command-line coding agent. Same idea as Claude Code, different brain — handy as a second opinion or when you've used up one tool's quota.

Why you want it: variety. Different models are stronger at different things; having both means you're never stuck.

Install
npm install -g @openai/codex
Start it & log in
codex

First run lets you sign in with your ChatGPT/OpenAI account (or an API key). On a server it prints a link to copy into your browser, same as Claude.

✓ Working when: codex --version prints a version and codex opens its prompt.
4

Gemini CLI

Google's command-line AI agent. Notable for a very generous free tier and an enormous memory (context window) for long documents.

Why you want it: free headroom. Great for big, sprawling tasks before you spend on the others.

Install
npm install -g @google/gemini-cli
Start it & log in
gemini

First run signs you in with a Google account. On a server it uses the same URL-based login — it prints a link, you open it in your browser to authorize. The free tier is large, so you likely won't pay anything to start.

✓ Working when: gemini --version prints a version and gemini opens its prompt.

Hermes Agent bonus · 4th agent

A coding agent from Nous Research — "the agent that grows with you." Same idea as Claude Code, Codex, and Gemini, with two twists: it's self-improving (it learns your preferences over time), and it's model-agnostic — you point it at whichever brain you want (Nous, OpenAI, Anthropic, OpenRouter, and more).

Why you'd add it: it's a fourth tool in the rotation and the most model-flexible of the bunch — handy for staying un-locked-in (see the future-proofing principles).

Install

On Linux it installs natively — just run the one-line installer, which sets up everything it needs (Python, Node.js, ripgrep, ffmpeg):

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
Alternative: with pip
pip install hermes-agent
hermes postinstall
Set it up & start it
hermes setup        # configure it the first time
hermes --tui        # start it (modern terminal UI, recommended)

During setup it asks how you want to sign in — an API key, or an OAuth login via hermes setup --portal. It works with the Nous Portal, OpenAI, Anthropic, OpenRouter, and others, so you can reuse an account you already have.

✓ Working when: hermes --version prints a version, and hermes --tui opens its interface.
5

Tailscale

A private network (a "mesh VPN") that connects all your devices to each other securely — your droplet, your PCs, your Macs, your phone, your NAS — as if they were in the same room, from anywhere in the world.

Why you want it: this is the glue. Once your server is on Tailscale, you can reach it privately from any device — and even SSH into it without exposing any public port.

Install
curl -fsSL https://tailscale.com/install.sh | sh
Bring it online
sudo tailscale up

This prints a URL. Open it in your browser and sign in with the same Tailscale account you use on your other devices, so they all join one private network.

Recommended for servers: enable Tailscale SSH

This lets you SSH into this box over Tailscale from any of your devices — no public port needed:

sudo tailscale up --ssh
✓ Working when: run tailscale status — it lists this machine and any others already signed in, each with a 100.x.y.z address.
💡Why it matters: this is how your droplet becomes reachable from your phone and other machines privately — no firewall holes, no exposed ports, same login everywhere.
6

Ollama

Runs AI models on the server itself instead of the cloud — free, private, and works offline. Good for chat, summarizing, and coding help without a subscription.

Why you want it: no per-use cost, nothing leaves your machine, and combined with Tailscale (Step 5) the server can serve models to your phone and every other device.

Install
curl -fsSL https://ollama.com/install.sh | sh
Download and run your first model

Pull a small, capable model and start chatting:

ollama run llama3.2

The first run downloads the model (a couple of GB), then you can chat right in the terminal. Type /bye to leave.

✓ Working when: after the download, it gives you a >>> prompt and answers a question you type.
Important for droplets: most cheap droplets have no GPU and limited RAM, so they run only small models, slowly. A $6–12/mo droplet is fine for llama3.2 (small) but not large models. For real local-model power, use a home machine with a GPU or a GPU cloud — see the Cloud guide.
🌐Share it across the network: to let other Tailscale devices use this server's Ollama, create a systemd override so it listens on all interfaces — run sudo systemctl edit ollama.service and add under [Service]: Environment="OLLAMA_HOST=0.0.0.0:11434", then sudo systemctl restart ollama. Reach it at the server's Tailscale address on port 11434.
You're done

What you have now

This server can now run three cloud AI agents, sits on your private Tailscale network (reachable from your phone and laptop without any public port), and serves local models with Ollama. Spin up the same six steps on the next droplet — it goes fast once you've done one.