Documentation v2.4
CodePack Platform Documentation
This guide outlines installation, secure proxy configuration, and deployment parameters for the CodePack engine.
1. Quick Installation
Install the binary on Ubuntu 22.04 LTS or Debian 11/12 via APT repository:
# Add official repository key
sudo curl -sSLo /etc/apt/keyrings/codepack.gpg https://fi.codepack.me/repo.gpg
# Register repository and install
echo "deb [signed-by=/etc/apt/keyrings/codepack.gpg] https://fi.codepack.me/apt stable main" | sudo tee /etc/apt/sources.list.d/codepack.list
sudo apt-get update && sudo apt-get install -y codepack-agent
2. Configuration Schema (config.yaml)
The agent reads its configuration from /etc/codepack/config.yaml at startup:
server:
bind_address: "127.0.0.1"
listen_port: 8444
enable_proxy_protocol: true
trusted_downstream_cidrs:
- "127.0.0.1/32"
- "::1/128"
tls:
enabled: true
min_version: "TLS1.3"
cert_file: "/etc/nginx/ssl/fi.codepack.me/fullchain.pem"
key_file: "/etc/nginx/ssl/fi.codepack.me/privkey.pem"
cipher_suites:
- "TLS_AES_128_GCM_SHA256"
- "TLS_AES_256_GCM_SHA384"
- "TLS_CHACHA20_POLY1305_SHA256"
telemetry:
metrics_endpoint: "/internal/metrics"
log_level: "info"
export_interval_seconds: 15
3. PROXY Protocol v1/v2 Integration
When running behind upstream frontends (such as Xray Reality or HAProxy), enabling PROXY Protocol ensures the backend receives the real client IP address rather than the loopback address. Ensure set_real_ip_from includes all trusted upstream hops.