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.
sudo — a DigitalOcean droplet is the easy way to get one (a $6–12/mo droplet works to start).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 serverOpen 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-IPUpdate the system & install basics
sudo apt update && sudo apt upgrade -y sudo apt install -y curl git build-essentialInstall 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
v22.x.x and 10.x.x).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.
InstallThe 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 | bashStart 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.
claude --version prints a version, and typing claude drops you into a prompt that greets you.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.
Installnpm install -g @openai/codexStart 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.
codex --version prints a version and codex opens its prompt.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.
Installnpm install -g @google/gemini-cliStart 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.
gemini --version prints a version and gemini opens its prompt.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).
InstallOn 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 | bashAlternative: with pip
pip install hermes-agent hermes postinstallSet 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.
hermes --version prints a version, and hermes --tui opens its interface.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.
Installcurl -fsSL https://tailscale.com/install.sh | shBring 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 SSHThis lets you SSH into this box over Tailscale from any of your devices — no public port needed:
sudo tailscale up --ssh
tailscale status — it lists this machine and any others already signed in, each with a 100.x.y.z address.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.
Installcurl -fsSL https://ollama.com/install.sh | shDownload 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.
>>> prompt and answers a question you type.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.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.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.