System and Environment

Technical documentation of the host system and Claude Code setup.


Host System

PropertyValue
OSUbuntu 20.04.4 LTS (Focal Fossa)
KernelLinux 5.4.0-132-generic x86_64
Hostnamevps-da425822
VirtualizationKVM (VPS)
CPUIntel Core (Haswell) - 1 core @ 2394 MHz
Memory~2 GB total
Disk39 GB

User Environment

PropertyValue
Userubuntu (UID 1000)
ShellZsh with Oh-My-Zsh (robbyrussell theme)
EditorNeoVim (nvim)
Home/home/ubuntu
Working Directory/home/ubuntu/claude-workspace

Claude Code Setup

ComponentDetails
Claude Config~/.claude.json
Claude Directory~/.claude/
ModelClaude Opus 4.5 (claude-opus-4-5-20251101)
EntrypointSDK CLI
Environment FlagCLAUDECODE=1

MCP Servers:

  • Obsidian (stdio): npx @mauricio.wolff/mcp-obsidian@latest /home/ubuntu/claude-workspace
  • Google Calendar (stdio): calendar-mcp — read/create calendar events
  • Google Tasks (stdio): tasks-mcp — task management

Authentication: Claude Code authenticates via OAuth through claude.ai (not API key). Uses the Claude Max subscription for inference.

  • Credentials stored in ~/.claude/.credentials.json
  • Login via claude login (OAuth flow in browser)
  • No ANTHROPIC_API_KEY needed when using Max subscription

Claude Directory Structure:

~/.claude/
├── .credentials.json # OAuth tokens (claude.ai auth)
├── cache/            # Cached data
├── debug/            # Debug information
├── downloads/        # Downloaded files
├── history.jsonl     # Session history
├── plans/            # Plan files
├── plugins/          # Marketplace plugins
├── projects/         # Project metadata
├── session-env/      # Session environment
├── shell-snapshots/  # Shell snapshots
├── todos/            # Todo management
└── stats-cache.json  # Statistics

Development Tools

ToolVersionLocation
Node.jsv20.20.0via NVM (~/.nvm)
npm10.8.2via NVM
Python3.8.10/usr/bin/python3
Go1.21.6/usr/local/go
Rubysystem/usr/bin/ruby
Git2.25.1system
Dockerinstalled/usr/bin/docker
Podmaninstalledcontainerized services

PATH includes:

  • ~/.nvm/versions/node/v20.20.0/bin
  • ~/go/bin
  • /usr/local/go/bin
  • ~/.local/bin
  • ~/.fzf/bin

Running Services

ServiceDescription
TakopiTelegram bot interface for Claude
Claude CLIActive session (~258 MB)
MCP ObsidianObsidian vault integration (~70 MB)
Webhook Server/usr/bin/webhook -hooks ~/hooks.json
Powerline DaemonTerminal prompt enhancement
RedisPodman container (port 6379, password-protected)
MemezisApplication container
Memezis-botBot service container

Takopi

Telegram bot that provides Claude interface.

Source code: /home/ubuntu/takopi (editable install from GitHub)

Scripts:

  • ~/start-takopi.sh — start with auto-restart loop
  • ~/stop-takopi.sh — stop bot and restart loop

Files:

  • ~/.takopi/takopi.pid — PID file
  • ~/takopi.log — log file
  • ~/.takopi/takopi.toml — configuration

Development Setup

Takopi is installed in editable mode, so changes to /home/ubuntu/takopi take effect after restart:

# Edit source code
nvim ~/takopi/src/takopi/telegram/client_api.py
 
# Restart to apply changes
~/stop-takopi.sh && ~/start-takopi.sh &

To update from upstream:

cd ~/takopi && git pull && ~/stop-takopi.sh && ~/start-takopi.sh &

Custom Scripts

/home/ubuntu/bin/send-photo — Send photos to Telegram chat

# Single photo
send-photo /path/to/image.jpg "Caption text"
 
# Multiple photos (album)
send-photo photo1.jpg photo2.jpg --caption "Album caption"

Uses Takopi’s bot token and sends to the configured chat.

Takopi Plugins

Location: /home/ubuntu/takopi-plugins/

Commands:

  • /publish — publish Quartz notes to web
  • /restart — restart Takopi bot
  • /health — bot health status

Files:

  • takopi_plugins/backend.py — publish command
  • takopi_plugins/restart.py — restart command
  • takopi_plugins/health.py — health command
  • pyproject.toml — package config

Installation:

uv tool install --force --reinstall ~/takopi --with ~/takopi-plugins

What /publish does:

  1. Analyzes changes (compares workspace with published content)
  2. Runs Claude agent to organize vault (update knowledge-index, fix links)
  3. Runs linting & formatting (up to 3 attempts):
    • ensure_frontmatter.py — adds/updates created, updated, title
    • mdformat — formats markdown consistently
    • markdownlint-cli2 — validates markdown
    • If errors found → Claude agent fixes them → retry
  4. Syncs /home/ubuntu/claude-workspace//home/ubuntu/quartz/content/
  5. Runs npx quartz sync to push to GitHub
  6. Waits for Cloudflare Pages deployment (checks API every 5s, timeout 120s)
  7. Returns URL + deployment status

See Vault Linting Setup for linting configuration details.

Key implementation details:

  • Uses RenderedMessage with extra={"parse_mode": "Markdown"} for formatted output
  • Takopi’s CommandResult does NOT support parse_mode — must use ctx.executor.send() with RenderedMessage directly
  • Cloudflare API credentials: CF_TOKEN, CF_ACCOUNT_ID, CF_PROJECT_NAME

Workspace Structure

/home/ubuntu/claude-workspace/
├── .claude/         # Local Claude config
├── .git/            # Git repository
├── .obsidian/       # Obsidian vault config
├── tech/            # Technical documentation (English)
├── profiles/        # User profiles
├── recipes/         # Food and recipes
├── ideas/           # Ideas and inspiration
├── incoming/        # Incoming files
├── CLAUDE.md        # Main instructions
├── README.md        # Project README
└── ...              # Notes and documents

See also: Knowledge Index | Claude Instructions | Deployment Guide