RagnaLab Part 5: Remote Dev Environment, Claude Code and Caddy
This post wraps up the core setup with two things: a persistent remote dev environment you can SSH into with Claude Code and JetBrains…
RagnaLab Part 5: Remote Dev Environment, Claude Code and Caddy
This post wraps up the core setup with two things: a persistent remote dev environment you can SSH into with Claude Code and JetBrains Gateway, and Caddy as a reverse proxy so every service gets a clean local domain name instead of an IP and port.


CT 201 — Remote dev environment and Claude Code
CT 201 serves double duty: a persistent remote dev environment and a Claude Code host for AI-assisted development in the terminal.
pct create 201 local:vztmpl/ubuntu-26.04-standard_26.04-1_amd64.tar.zst \
--hostname claude-host \
--memory 4096 \
--cores 2 \
--rootfs local-lvm:20 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp
Install essentials
pct start 201
pct enter 201
apt update && apt install -y \
curl wget git vim nano htop \
build-essential python3 python3-pip \
nodejs npm zsh unzip default-jdk \
openssh-server
Java (default-jdk) is required for the JetBrains Gateway backend.
Enable SSH
Ubuntu 26.04 disables root SSH login by default:
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl enable ssh
systemctl restart ssh
passwd
For a more secure setup, switch to SSH key auth. Don’t forget to disable root login again. Also create a local user to follow the least privilege principle.
mkdir -p ~/.ssh && chmod 700 ~/.ssh
# paste your public key into ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
Install Claude Code
curl -fsSL https://claude.ai/install.sh | sh
For API key auth in headless or CI environments:
echo 'export ANTHROPIC_API_KEY="your-api-key-here"' >> ~/.bashrc
source ~/.bashrc
Verify:
claude --version
Set up a workspace
mkdir -p ~/projects ~/scripts ~/tools
JetBrains Gateway
Download JetBrains Gateway from jetbrains.com/remote-development/gateway on your local machine. Connect via SSH to CT 201’s IP-Gateway automatically installs the IDE backend on the remote host. You get a full PyCharm or IntelliJ experience running locally but executing remotely. No heavy IDE installation needed in the container itself.
CT 206 — Caddy reverse proxy
Caddy sits in front of all your services and routes *.homelab.local traffic to the right container. Simpler config than Traefik, and automatic HTTPS when you need it later.
replace all CT-IP placeholders with the actual IPs of your LXC containers.*
pct create 206 local:vztmpl/ubuntu-26.04-standard_26.04-1_amd64.tar.zst \
--hostname caddy \
--memory 512 \
--cores 1 \
--rootfs local-lvm:8 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp
Install Docker, then deploy:
mkdir -p /opt/stacks/caddy
cd /opt/stacks/caddy
cat > Caddyfile << 'EOF'
{
admin off
auto_https off
}
portainer.homelab.local {
reverse_proxy CT200-IP:9000
}
falkordb.homelab.local {
reverse_proxy CT200-IP:3000
}
tools.homelab.local {
reverse_proxy CT200-IP:8082
}
jellyfin.homelab.local {
reverse_proxy CT202-IP:8096
}
sonarr.homelab.local {
reverse_proxy CT203-IP:8989
}
radarr.homelab.local {
reverse_proxy CT203-IP:7878
}
prowlarr.homelab.local {
reverse_proxy CT203-IP:9696
}
homepage.homelab.local {
reverse_proxy CT205-IP:3000
}
uptime.homelab.local {
reverse_proxy CT205-IP:3001
}
claude.homelab.local {
reverse_proxy CT201-IP:8080
}
EOF
cat > compose.yml << 'EOF'
services:
caddy:
image: caddy:latest
container_name: caddy
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
restart: unless-stopped
volumes:
caddy_data:
caddy_config:
EOF
docker compose up -d
DNS
Until your router’s local DNS is configured, you can add static entries on any machine. On Linux or macOS edit /etc/hosts, on Windows edit C:\Windows\System32\drivers\etc\hosts as Administrator:
CADDY-IP portainer.homelab.local
CADDY-IP falkordb.homelab.local
CADDY-IP tools.homelab.local
CADDY-IP jellyfin.homelab.local
CADDY-IP sonarr.homelab.local
CADDY-IP radarr.homelab.local
CADDY-IP prowlarr.homelab.local
CADDY-IP homepage.homelab.local
CADDY-IP uptime.homelab.local
CADDY-IP claude.homelab.local
Still to do
- Set static IP reservations on your network for all containers, if an IP changes, Caddy routes break right now
- Move DNS to your networks’ local DNS records and remove the static host overrides
- Enable SSL using Cloudflare DNS challenge
- Configure VPN for external access
- Restrict Docker TCP port 2375 to LAN only via firewall rules
- Add the Caddy container to Watchtower
That’s the core RagnaLab stack. Everything is running, monitored, auto-updated, and accessible by name.
메타데이터
- post_id
- 627db4e83a42
- slug
- ragnalab-part-5-remote-dev-environment-claude-code-and-caddy-627db4e83a42
- url
- https://medium.com/@Cstm/ragnalab-part-5-remote-dev-environment-claude-code-and-caddy-627db4e83a42
- canonical_url
- https://medium.com/@Cstm/ragnalab-part-5-remote-dev-environment-claude-code-and-caddy-627db4e83a42
- author_url
- https://medium.com/@Cstm
- status
- ok
- fetched_at
- 2026-06-22 19:40:15