Initial commit: Headscale + Headplane 완전 구축 프로젝트

🎯 프로젝트 목표:
- Tailscale 완전 대체하는 자체 호스팅 솔루션 구축
- Headscale + Headplane Docker Compose로 원클릭 설치
- Headplane 한글화 및 커스터마이징
- 완전한 VPN 관리 시스템 개발

🛠️ 기술 스택:
- Headscale: Tailscale 호환 컨트롤 서버
- Headplane: 웹 기반 관리 UI
- Docker & Docker Compose
- SQLite 데이터베이스
- 향후 PostgreSQL 지원 예정

🔧 주요 구성:
- docker-compose.yml: 멀티 컨테이너 구성
- config/config.yaml: Headscale 상세 설정
- start.sh: 자동화된 설치 스크립트
- .env: 환경변수 관리

📋 개발 계획:
1. 기본 설치 및 테스트
2. HTTPS/TLS 보안 구성
3. Headplane UI 한글화
4. 고급 네트워킹 설정
5. 모니터링 및 백업 시스템

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
시골약사 2025-09-06 16:50:25 +09:00
commit 9e7d0cd1bb
3 changed files with 134 additions and 0 deletions

20
.env.example Normal file
View File

@ -0,0 +1,20 @@
# Headscale API Key (will be generated after first startup)
HEADSCALE_API_KEY=your_api_key_here
# Server configuration
SERVER_URL=http://localhost:8080
LISTEN_ADDR=0.0.0.0:8080
# Database (SQLite by default)
DB_TYPE=sqlite3
DB_PATH=/var/lib/headscale/db.sqlite
# Magic DNS
MAGIC_DNS=true
BASE_DOMAIN=headscale.local
# Network settings
IP_PREFIXES=100.64.0.0/10
# Timezone
TZ=Asia/Seoul

64
.gitignore vendored Normal file
View File

@ -0,0 +1,64 @@
# Environment variables
.env*
!.env.example
# Database files
*.db
*.sqlite
*.sqlite3
# Data directories
data/
run/
logs/
# Docker volumes
volumes/
# SSL certificates
*.crt
*.key
*.pem
# Backup files
*.backup
*.bak
# IDE
.vscode/
.idea/
# OS
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Dependency directories
node_modules/
# Build outputs
dist/
build/
out/
# API keys and secrets
api_keys.txt
secrets.txt
# Temporary files
tmp/
temp/
# Docker Compose override files
docker-compose.override.yml

50
docker-compose.yml Normal file
View File

@ -0,0 +1,50 @@
version: '3.8'
services:
headscale:
image: headscale/headscale:latest
container_name: headscale
restart: unless-stopped
command: headscale serve
environment:
- TZ=Asia/Seoul
volumes:
- ./config:/etc/headscale
- ./data:/var/lib/headscale
- ./run:/var/run/headscale
ports:
- "8080:8080" # Headscale HTTP API
- "9090:9090" # Metrics (optional)
networks:
- headscale-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
headplane:
image: ghcr.io/tale/headplane:latest
container_name: headplane
restart: unless-stopped
environment:
- TZ=Asia/Seoul
- HEADSCALE_URL=http://headscale:8080
- HEADSCALE_API_KEY=${HEADSCALE_API_KEY}
ports:
- "3000:3000" # Headplane Web UI
depends_on:
headscale:
condition: service_healthy
networks:
- headscale-net
networks:
headscale-net:
driver: bridge
volumes:
headscale_config:
headscale_data:
headscale_run: