# New-API (Oracle VM `instance-20250520-1933`) OpenAI-compatible API gateway running as a Docker container. Aggregates multiple LLM providers behind a single endpoint with key management, rate limiting, and usage tracking. Migrated from pop-os to Oracle Cloud VM on 2026-05-12. ## Current Configuration | Field | Value | |---|---| | Image | `calciumion/new-api:latest` | | Container | `new-api` | | VM | `ubuntu@137.131.41.18` (Tailscale: `100.108.123.60`) | | SSH | `ssh -i ~/Documents/ssh-config-backup/supabase-2u12g.key ubuntu@137.131.41.18` | | Tailscale access | `http://100.108.123.60:3000` | | HTTPS (via pop-os Caddy) | `https://pop-os.tail3fb075.ts.net:3443` | | Data | `/home/ubuntu/new-api/data/` on VM | | Restart policy | `always` | | Nezha monitor | HTTP GET `http://100.108.123.60:3000` every 60s | ## Fresh Deploy ```bash mkdir -p ~/new-api/data docker run -d \ --name new-api \ --restart always \ -p 3000:3000 \ -v ~/new-api/data:/data \ -e TZ=Asia/Hong_Kong \ calciumion/new-api:latest ``` Verify: ```bash docker ps --filter name=new-api curl -sf http://localhost:3000 ``` ## HTTPS via Caddy Caddy reverse proxies port 3000 to HTTPS on port 3443 over Tailscale. The Caddy block is in the shared Caddyfile (see [aio-setup.md](../aio-smb/aio-setup.md) for the full Caddyfile): ``` https://pop-os.tail3fb075.ts.net:3443 { reverse_proxy localhost:3000 tls /etc/caddy/certs/tailscale-cert.pem /etc/caddy/certs/tailscale-key.pem } ``` ## Updating ```bash docker pull calciumion/new-api:latest docker stop new-api && docker rm new-api # Re-run the docker run command above ``` Data persists in `~/new-api/data/` across container recreations. ## Troubleshooting | Issue | Fix | |---|---| | Container won't start | Check port conflict: `ss -tlnp \| grep :3000` | | 502 via Caddy | Verify container is running: `docker ps` | | Data lost after update | Ensure `-v ~/new-api/data:/data` is in the run command |