Archon/deploy/cloud-init.yml
Cole Medin ae346c2a67 feat: prepare for open-source migration to coleam00/Archon
- Replace all dynamous-community/remote-coding-agent references with coleam00/Archon
- Replace all ghcr.io/dynamous-community/remote-coding-agent with ghcr.io/coleam00/archon
- Change license from proprietary Dynamous to MIT
- Fix cd directory name in docs (remote-coding-agent → Archon)
- Remove hardcoded local paths from skills and docs
- Add Windows x64 binary to release pipeline (cross-compiled from Linux)
- Add --minify --bytecode flags to binary compilation
- Create PowerShell install script (scripts/install.ps1)
- Fix isBinaryBuild() detection for Bun 1.3.5+ (use import.meta.dir virtual FS check)
- Scaffold Astro Starlight docs site at website/ (Astro 6 + Starlight 0.38)
- Add deploy-docs.yml workflow for GitHub Pages
- Update test.yml branch triggers (develop → dev)
- Add install section with curl/PowerShell/Homebrew/Docker to README
- Add badges and archon.diy docs link to README
- Create SECURITY.md with vulnerability disclosure policy
- Update CONTRIBUTING.md for public audience
- Add website/ and eslint ignores for Astro-generated files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:47:22 -05:00

91 lines
2.8 KiB
YAML

#cloud-config
# =============================================================================
# Archon — Cloud-Init Auto-Setup
# =============================================================================
#
# Paste this into your VPS provider's "User Data" field when creating a server.
# Tested on: Ubuntu 22.04+, Debian 12+
#
# What this does:
# 1. Installs Docker + Docker Compose plugin
# 2. Opens firewall ports (SSH, HTTP, HTTPS)
# 3. Clones the repo to /opt/archon
# 4. Prepares .env and Caddyfile from examples
# 5. Builds the Docker image (~5 min)
#
# After the server boots (~5-8 min), SSH in and:
# 1. Edit /opt/archon/.env — set your AI credentials, DOMAIN, DATABASE_URL
# 2. cd /opt/archon && docker compose --profile with-db --profile cloud up -d
# 3. Open https://your-domain.com
#
# IMPORTANT: Before starting, point your domain's DNS A record to this server's IP.
#
package_update: true
package_upgrade: true
packages:
- curl
- git
- ufw
runcmd:
# --- Docker ---
- curl -fsSL https://get.docker.com | sh
- systemctl enable docker
- systemctl start docker
# --- Firewall ---
- ufw allow 22/tcp
- ufw allow 80/tcp
- ufw allow 443
- ufw --force enable
# --- Clone and configure ---
- git clone https://github.com/coleam00/Archon.git /opt/archon
- cp /opt/archon/.env.example /opt/archon/.env
- cp /opt/archon/Caddyfile.example /opt/archon/Caddyfile
# --- Pre-pull external images ---
- docker pull postgres:17-alpine
- docker pull caddy:2-alpine
# --- Build the app image ---
- cd /opt/archon && docker compose build
# --- Signal completion ---
- |
cat > /opt/archon/SETUP_COMPLETE << 'DONE'
============================================
Archon server setup complete!
============================================
Next steps:
1. Edit credentials and domain:
nano /opt/archon/.env
Required:
CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-... (or CLAUDE_API_KEY)
DOMAIN=archon.example.com
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/remote_coding_agent
2. (Optional) Set up basic auth to protect the Web UI:
docker run caddy caddy hash-password --plaintext 'YOUR_PASSWORD'
# Add to .env (use $$ to escape $ in hashes):
CADDY_BASIC_AUTH=basicauth @protected { admin $$2a$$14$$<hash> }
# Skip if using IP-based firewall rules instead.
3. Start all services:
cd /opt/archon
docker compose --profile with-db --profile cloud up -d
4. Open https://your-domain.com
Logs: docker compose logs -f
Health: curl https://your-domain.com/api/health
Docs: https://github.com/coleam00/Archon/blob/main/docs/docker.md
============================================
DONE
- echo "[archon] Setup complete. Edit /opt/archon/.env and run docker compose up."