“The best tools are the ones you forget you’re using”
Homelab Series Index
Digital freedom: building a personal services ecosystem without depending on big tech.
- Homelab: Necessity or Whim?
- Homelab: Proxmox and LXC Containers
- Homelab: Immich Setup
- Homelab: Navidrome Setup
- Homelab: Secure Remote Access
- Homelab: iCloud to Immich Migration
- Homelab: AFFiNE Setup
- Homelab: KISS Backup Strategy
- Homelab: Network Migration and Wireguard
- Homelab: UPS and Network UPS Tools
- Homelab: From AFFiNE to Obsidian with Syncthing
- Homelab: Development Container with tmux and Claude Code
The Problem Link to heading
Every time I lose connection or close a terminal, all my sessions die.
I needed a development environment that doesn’t depend on my laptop, maybe remotely controllable. I spawned a container on my Proxmox server, accessible via SSH from Mac or phone, with sessions that never stop. Let’s see how I configured tmux.
LXC Container for Development Link to heading
I created a dedicated container on Proxmox. Specs:
- CT ID: 108
- Hostname: dev-workspace
- Template: Ubuntu 22.04
- Storage: 50GB on local-lvm
- RAM: 4GB + 2GB swap
- CPU: 4 cores
- IP: 192.168.1.216/24
- Features: nesting=1
pct start 108
pct enter 108
Base Setup Link to heading
I installed only the essentials:
apt update && apt upgrade -y
apt install -y git curl vim tmux
Node.js with nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts
nvm alias default 'lts/*'
npm install -g pnpm yarn @angular/cli
Best practice would be to use a different user, but I use root directly. The server is only accessible via Wireguard VPN, so there’s no direct exposure to the Internet and I feel safer.
SSH Link to heading
I installed OpenSSH and modified the configuration to allow root login:
apt install -y openssh-server
systemctl enable ssh
# Modify config to allow root login
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
systemctl restart ssh
On my Mac I added an alias in ~/.ssh/config:
Host dev-workspace
HostName 192.168.1.216
User root
ServerAliveInterval 60
Now I connect with ssh dev-workspace.
tmux Link to heading
tmux keeps sessions active on the server even when I disconnect. Minimal configuration:
echo "set -g history-limit 10000" > ~/.tmux.conf
Basic commands:
tmux new -s dev # Create session
tmux attach -t dev # Reconnect
Ctrl+a d # Disconnect (session stays active)
Ctrl+a c # New window
Ctrl+a 0-9 # Switch window
Connection Link to heading
ssh dev-workspace
If I get the error “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED”, I remove the old key:
ssh-keygen -R 192.168.1.216
Android Access Link to heading
I installed Termux from F-Droid:
pkg update && pkg upgrade
pkg install openssh
Connection (with Wireguard VPN active):
ssh [email protected]
tmux attach -t dev
Termux has an extra row with special keys (Ctrl, Alt, ESC). I use Ctrl+a as tmux prefix.
Claude Code Link to heading
Installation:
npm install -g @anthropic-ai/claude-code
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Workspace:
mkdir -p ~/workspace/{projects,docs/context}
cd ~/workspace/projects
Usage in tmux:
tmux new -s dev
claude code # Window 0
Ctrl+a c # New window for git/npm
Syncthing for Context Files Link to heading
I installed Syncthing to sync documentation and specs from Mac to server:
apt install -y syncthing
systemctl enable syncthing@root
systemctl start syncthing@root
Configuration for remote access:
systemctl stop syncthing@root
nano /root/.local/state/syncthing/config.xml
# Change <address>127.0.0.1:8384</address> to <address>0.0.0.0:8384</address>
systemctl start syncthing@root
I access the UI from http://192.168.1.216:8384 and configure:
- On Mac: add subfolder as new folder in Syncthing
- Connect the two devices by exchanging Device IDs
- On server: accept the folder and map it to
/root/workspace/docs/context
Now context files sync automatically and Claude Code can access them.
Workflow Link to heading
The setup is complete. Now I can:
- Write specs on Mac → Syncthing syncs to server
- Connect via SSH from Mac or phone
- Attach to existing tmux session
- Claude Code has access to updated context files
- Disconnect whenever I want, sessions stay active