← Back to News
InfrastructureMay 2026

AWS EC2 deployment

K-Agent backend has migrated from a single-server IONOS VPS to AWS EC2, bringing improved reliability, elastic storage, and straightforward scaling.

What changed

  • EC2 instance — t3.medium running Ubuntu 22.04 with Docker Compose
  • EBS volume — persistent block storage for all user workspaces, resizable without downtime
  • Nginx reverse proxy — handles TLS termination, CORS headers, and proxies to the FastAPI backend
  • Let's Encrypt TLS — automatic certificate renewal via Certbot for `api.ksecure.dev`
  • Elastic IP — fixed public IP so DNS never needs to change when the instance restarts
  • Deployment workflow

    GitHub Actions CI pushes to main, the EC2 instance pulls the latest code via SSH, and Docker Compose restarts the backend service. No downtime for the frontend (hosted on Vercel separately).

    Storage planning

    Each user workspace is isolated under `/workspace/<uid>/`. The free tier quota is set at 200 MB per user. The EBS volume can be expanded in AWS Console without stopping the instance.