From zero to a complete personal AI stack
agent37.club
Not a tutorial for one tool. The complete system — what runs where, how the pieces connect, and what it actually costs.
Key insight: Run what you can locally (free, fast, private). Offload what needs to be persistent or powerful to a VPS or API.
The best setup uses both. Local for the 80% of quick tasks. API for the 20% that need frontier intelligence.
# Install brew install ollama # Pull and run a model ollama run llama3.3 ollama run deepseek-r1:8b ollama run qwen2.5-coder:32b # List installed models ollama list # Serve as API (OpenAI-compatible) ollama serve # http://localhost:11434/v1/chat/completions
| Model | RAM | tok/s |
|---|---|---|
| Llama 3.3 8B | ~5 GB | ~40-60 |
| Qwen 2.5 14B | ~9 GB | ~25-35 |
| DeepSeek-R1 8B | ~5 GB | ~35-50 |
| Qwen 2.5 32B | ~20 GB | ~15-22 |
| Llama 3.3 70B | ~40 GB | ~8-12 |
M3 Pro (18GB) comfortably runs up to ~14B. M3 Max (36-96GB) handles 32B-70B.
# ~/modelfiles/code-reviewer FROM qwen2.5-coder:14b PARAMETER temperature 0.3 PARAMETER num_ctx 32768 SYSTEM """ You are a senior code reviewer. Focus on: - Security vulnerabilities - Performance issues - Readability improvements Be concise. No praise, just actionable feedback with line references. """
# Create and run it ollama create code-reviewer \ -f ~/modelfiles/code-reviewer ollama run code-reviewer
Create personas for different tasks: code-reviewer, commit-writer, doc-generator. Each with tuned system prompts and temperatures.
# Three levels of memory ~/.claude/CLAUDE.md # Global # Your preferences across ALL projects # "I prefer TypeScript, use pnpm, etc." ./CLAUDE.md # Project # Shared with team via git # "Use our API conventions, run tests # with vitest, deploy to Cloudflare" ./src/api/CLAUDE.md # Subdirectory # Auto-loaded when Claude reads # files in this directory
| Command | What it does |
|---|---|
| /init | Bootstrap CLAUDE.md for a project |
| /compact | Compress conversation, save tokens |
| /clear | Fresh start — use between tasks |
| /model | Switch Haiku/Sonnet/Opus mid-chat |
| /review | Code review current changes |
Hot tip: Run /clear often. Old context wastes tokens and confuses the model. Start fresh for each logical task.
# .claude/skills/my-skill/SKILL.md --- name: api-builder description: Build REST APIs using our Hono + D1 + Cloudflare Workers stack --- # API Builder When building API endpoints: - Use Hono router with typed middleware - Validate inputs with Zod schemas - Use D1 for database, KV for cache - Write tests with vitest ...
// .claude/settings.json { "hooks": { "PostToolUse": [{ "matcher": "Write|Edit", "command": "prettier --write $FILE" }] } }
Skills load lazily — only when relevant. No wasted context tokens.
| Model | Input | Output | Best for |
|---|---|---|---|
| Haiku 4.5 | $0.80/M | $4/M | Quick edits, typos, simple refactors, boilerplate |
| Sonnet 4.5 | $3/M | $15/M | Daily driver — features, debugging, code review |
| Opus 4.6 | $15/M | $75/M | Architecture, complex bugs, multi-file refactors |
70% Sonnet (daily work), 20% Haiku (quick tasks), 10% Opus (hard problems). This keeps your monthly bill 60-70% lower than Opus-for-everything.
$20/mo Pro or $100/mo Max. Max gives 5x the usage — worth it if you code with Claude daily. Includes all models.
Tailscale is a WireGuard-based mesh VPN. Every device gets a stable IP and DNS name. No port forwarding, no firewall rules, no VPN server to manage.
# Install brew install tailscale tailscale up # SSH to your VPS by name ssh my-vps # Access Ollama on your home Mac # from anywhere: curl http://macbook:11434/v1/models # Share a dev server publicly tailscale funnel 3000
Up to 100 devices, 3 users. More than enough for personal use. No credit card required.
Tailscale works through NAT, firewalls, and carrier-grade NAT. Your VPS, home Mac, and phone are all on the same private network. No public IPs needed.
| Provider | Spec | Cost |
|---|---|---|
| Hetzner | 2 vCPU, 4GB | $4.50/mo |
| DigitalOcean | 2 vCPU, 4GB | $24/mo |
| Fly.io | shared, 256MB | ~$2/mo |
| Railway | usage-based | $5/mo+ |
Hetzner wins for personal setups — EU-based, dirt cheap, great specs.
# Persistent Claude Code via tmux ssh my-vps tmux new -s agent # Inside tmux: Claude Code keeps running # even when you disconnect claude # Detach: Ctrl-B, then D # Reattach later: tmux attach -t agent
MacBook (daily driver) ├── Claude Code # main coding tool ├── Ollama # local models (8B-32B) ├── VS Code / Cursor # editor └── Tailscale # mesh network │ │ WireGuard tunnel (encrypted, P2P) │ Hetzner VPS ($5/mo) ├── tmux + Claude Code # persistent sessions ├── MCP servers # tools for Claude ├── Cron agents # scheduled tasks ├── Docker # isolation for services └── Tailscale # same mesh │ Phone / iPad (on the go) └── SSH via Tailscale # tmux attach from anywhere
Start a complex task on your Mac, detach the tmux session, reattach from your phone on the bus. The agent keeps running.
Even just Ollama + Claude Code + a good CLAUDE.md is a massive upgrade over using AI tools without configuration. Start there, add layers as needed.
Local models + Claude Code + VPS + Tailscale
The best AI dev setup is the one you actually use every day. Start simple, add complexity only when it solves a real problem.
agent37.club