curl -fsSL https://raw.githubusercontent.com/f1th4p/pc-services/main/scripts/setup-linux.sh | bash
Skrypt robi 11 kroków idempotent: apt deps + fsearch + Chrome + Tailscale + NVIDIA verify + env restore + rclone + git clone repos + venvs + Claude Code + state restore + systemd units. ETA ~15-20 min. Log: ~/setup-linux.log.
3 warstwy state:
| Warstwa | Co zawiera | Migracja |
|---|---|---|
CLAUDE.md (w repo) |
Project conventions: PowerShell pwsh syntax (post-Linux: bash), Tailscale IPs, FastAPI defaults, "DO NOT public exposure", komunikacja PL | ✅ Auto: git clone pc-services przywróci |
Memory files~/.claude/projects/<cwd>/memory/*.md |
~30 persistent memory entries: user profile, feedback rules, project state (Linux migration, Drive backup, Gemini PRIMARY v22, watchdog tuning, Supabase claude_handoff scripts, drukarka USB, _Projekty na D:...) | Manual copy z D:/backups/pre-linux-migration/claude-state/ |
Past sessions*.jsonl |
32+ MB conversation history z 2026-05-19+ — pełen kontekst architectural decisions, sweep audyt iteracji v15→v22, decisions log | Manual copy (optional, przydatne dla claude --resume) |
# Method A: curl one-liner (recommended)
curl -fsSL https://claude.ai/install.sh | sh
# Method B: npm (wymaga Node.js >= 20)
sudo apt install -y nodejs npm
npm install -g @anthropic-ai/claude-code
# Verify
claude --version
claude
# Prompt asks for API key OR browser OAuth flow
# Bartek's account: f1th4p@gmail.com (Anthropic Console)
Linux Claude Code folder encoding różni się od Windows:
Windows: C:\Users\bartekp\Developer\pc-services → C--Users-bartekp-Developer-pc-services
Linux: /home/bartekp/Developer/pc-services → -home-bartekp-Developer-pc-services
mkdir -p ~/.claude/projects
SRC=/mnt/d/backups/pre-linux-migration/claude-state/C--Users-bartekp-Developer-pc-services
DST=~/.claude/projects/-home-bartekp-Developer-pc-services
cp -r "$SRC" "$DST"
# Verify
ls -la ~/.claude/projects/-home-bartekp-Developer-pc-services/memory/
# Powinno pokazać ~30 .md files: feedback_*.md, project_*.md, etc.
mkdir -p ~/Developer
cd ~/Developer
git clone https://github.com/f1th4p/pc-services.git
git clone https://github.com/f1th4p/health.git
# Env vars z backup → ~/.bashrc
cat /mnt/d/backups/pre-linux-migration/env-vars.txt | grep '^[A-Z]' | sed 's/^/export /' >> ~/.bashrc
# Supabase PAT
mkdir -p ~/.config
cp /mnt/d/backups/pre-linux-migration/supabase-cli-pat ~/.config/
chmod 600 ~/.config/supabase-cli-pat
# rclone gdrive (Drive backup target)
mkdir -p ~/.config/rclone
cp /mnt/d/backups/pre-linux-migration/rclone.conf ~/.config/rclone/
chmod 600 ~/.config/rclone/rclone.conf
rclone lsd gdrive: # verify Drive access
cd ~/Developer/pc-services
claude --resume # continue last Windows session
# OR fresh start (Claude czyta CLAUDE.md + memory automatically):
claude
Claude od razu wie:
CLAUDE.md z repo: PowerShell→bash adapt, Tailscale 100.109.129.16, project intent, hardware constraintsiOS-Claude na Macu + Bartek manual używają Supabase table claude_handoff. Linux Claude na hub ma te same scripts.
# Sprawdź pending handoffs (od iOS lub Bartek)
.\scripts\handoff.ps1 list
# Reply lub action
.\scripts\handoff.ps1 send ios "subject" "body" urgent
# Mark read / close
.\scripts\handoff.ps1 ack <UUID>
.\scripts\handoff.ps1 resolve <UUID>
Scripts są PowerShell (.ps1) — na Linux użyj sudo snap install powershell --classic żeby odpalić, lub port do Bash (.sh) jeśli wolisz.
Pop!_OS NVIDIA ISO ships driver, ALE PyTorch CUDA wymaga manual match version:
pip install torch>=2.2 --index-url https://download.pytorch.org/whl/cu121
Po sudo tailscale up (browser OAuth), re-enable Funnel z path-mount config:
tailscale serve reset
tailscale funnel reset
tailscale funnel --bg 8001
tailscale serve --bg --set-path=/webhook/github http://localhost:8080/webhook/github
Tailscale node ID jest nowy on Linux. Żeby iPhone HealthIOS używał same Funnel URL:
# Expire Windows node w Tailscale admin (https://login.tailscale.com/admin/machines)
sudo tailscale up --hostname=desktop-e7102ja # re-claim same hostname
Cert desktop-e7102ja.tailc2b192.ts.net regenuje automatic.
Po apt install docker.io, użytkownik musi być w grupie docker (setup-linux.sh to robi, ale wymaga logout/login):
sudo usermod -aG docker $USER
# logout + login (lub: newgrp docker w bieżącym shell)
docker ps # verify
Dual-boot powoduje clock drift 2h. Fix Linux side:
sudo timedatectl set-local-rtc 1 # match Windows RTC convention
cd ~/Developer/pc-services/services/pose_server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python app.py # → http://localhost:8001/health should return 200
# Then convert do systemd timers (per migration plan step #7)
sudo cp ~/Developer/pc-services/services/systemd/*.{service,timer} /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now pc-services-pose pc-services-dashboard
sudo systemctl enable --now pc-services-sweep-nightly.timer