drawthingsai/draw-things-community/cpuscript
Claude Code and agent skill by drawthingsai/draw-things-community
- community
Checking that the SKILL.md file is still in the repository.
Set up and verify a new Draw Things CPU proxy and Envoy server using the scripts in Scripts/ServerManagement/CPUScript. Use when Codex needs to bootstrap a root-access Linux CPU server over SSH/Tailscale, upload model-list and envoy-config.yaml, install Docker/Tailscale images, install or copy compute.drawthings.ai TLS certificates, launch proxy_service and envoy_grpc_web_proxy, and debug port 443, Envoy 8443, TLS, or gRPC Echo connectivity.
Install
npx vskill@latest install drawthingsai/draw-things-community/cpuscriptSKILL.md
Draw Things CPU Proxy Server Setup
Use this workflow from Scripts/ServerManagement/CPUScript.
Files
InitCPUServer.sh: install/update Docker, install Tailscale, runtailscale up --ssh, lock the root password, and pulldrawthingsai/draw-things-proxy-server-cli:v20260928.2plus Envoy 1.39.1 pinned to its Linux amd64 image digest.InitCertificate.sh: request a Let's Encrypt cert forcompute.drawthings.aiwith standalone certbot on port 80, set the permissions required by the non-root proxy container, and install the renewal deploy hook.restart-drawthings-tls.sh: Certbot deploy hook that repairs renewed certificate permissions and restartsproxy_serviceandenvoy_grpc_web_proxyso both processes load the renewed certificate.LaunchCPUServer.sh: startproxy_serviceon public443and Tailscale control portTS_IP:50002.LaunchEnvoyServer.sh: copy the provided Envoy config into root-owned/etc/drawthings/envoy, validate it, and startenvoy_grpc_web_proxywith host networking. Preserve the previous container for rollback and restore it automatically if replacement startup or readiness fails.model-list: mounted through its containing directory as/app/Documents/<filename>so host-side edits and control-panel writes target the same file.envoy-config.yaml: copied to a separate file per deployment and mounted read-only as/etc/envoy/envoy.yaml; uses typed CORS and upstream HTTP/2 configuration.
Inputs
Have these ready before launch:
- New CPU server SSH target, usually
root@<tailscale-ip>. - Datadog API key. Treat it as a secret; do not commit or echo it in summaries.
- Let's Encrypt notification email if issuing a new cert.
- Optional existing cert source server, if DNS is not routed to the new VM yet.
- Updated
model-list. - A known-good
envoy-config.yaml; the admin socket must include a port, typically127.0.0.1:9901.
Initial State Check
Check SSH, OS, Docker, Tailscale, certs, containers, and ports:
Upload the Script Bundle
Install the CPUScript files on the new server:
If the model list changes, recopy only that file and verify checksum:
If the local Envoy config is stale, copy the known-good config from the current CPU server, then upload it:
Run CPU Server Init
Run the dependency/image setup:
Expect apt output, Docker install/update, Tailscale install/update, root password lock, and Docker image pulls. A pending kernel upgrade warning is not a launch blocker.
Certificate Strategy
The scripts expect:
If compute.drawthings.ai already routes to the new VM and public port 80 reaches it, run:
If DNS is not routed to the new VM yet, certbot standalone will fail. In that case, copy only the active cert and key from the current CPU server. Do not copy the whole /etc/letsencrypt unless deliberately migrating Certbot renewal ownership; that also copies ACME account keys, renewal configs, and archived cert material.
Use 0644 for privkey.pem with the current Docker launch because the proxy process inside the container may not run as root. If proxy_service logs Permission denied opening privkey.pem, fix permissions and recreate the container.
Automatic Renewal and TLS Reload
Copying only fullchain.pem and privkey.pem creates usable TLS files but does not migrate Certbot renewal ownership. A managed certificate must appear in certbot certificates and have all of:
InitCertificate.sh installs this executable deploy hook:
Certbot normally creates /etc/letsencrypt/archive as root-only and creates each renewed private key as mode 0600. The proxy runs as appuser, so following the live symlink fails unless the archive directories are searchable and the private key is readable. The hook reapplies:
The proxy and the statically configured Envoy listener load the certificate into memory at process startup. After a successful renewal, the deploy hook restarts both containers so they load the new certificate:
Verify the snap timer and the complete renewal-to-reload path:
Expected results are enabled, active, Congratulations, all simulated renewals succeeded, and both containers returning to Up. --run-deploy-hooks is needed only to make a dry run execute deploy hooks; a real successful renewal automatically executes every executable in /etc/letsencrypt/renewal-hooks/deploy.
Confirm that ports 443 and 8443 serve the same renewed certificate:
Launch Services
Launch the CPU proxy first. Any extra arguments after the model-list path are passed through to ProxyServiceCLI, including -g GPU worker ranges:
Verify each host's current Tailscale address before executing this example. The rebuilt dfw-242-009 and dfw-243-010 replaced the retired 100.83.253.70 and 100.64.66.84 addresses. LaunchCPUServer.sh stops and recreates the central proxy container, which can interrupt in-flight generation requests; use a planned maintenance window. A plain restart of an existing container retains its previously saved -g arguments.
LaunchCPUServer.sh mounts the directory containing the model list as /app/Documents and passes --model-list-path /app/Documents/<filename>. It also makes that directory and file writable by the container's non-root appuser; this is required because update-model-list writes atomically by creating a temporary file in the same directory.
Do not use the old single-file read-only mount:
That mount lets the server read the file, but it prevents the control-panel update-model-list RPC from writing back. The server currently uses try? around the file write, so the CLI can appear to succeed even when the file was not updated.
Then launch Envoy:
Expected ports:
proxy_service:0.0.0.0:443->8080/tcpand<tailscale-ip>:50002->50000/tcp.envoy_grpc_web_proxy: host network, listening on0.0.0.0:8443.- Envoy admin:
127.0.0.1:9901.
Verification
Verify containers, listeners, logs, TLS, and Envoy readiness:
Verify external GCP access:
An HTTP 415 from a raw GET to a gRPC endpoint is acceptable; it means the request reached the service but was not a valid gRPC call.
Model List Updates
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingScripts/ServerManagement/CPUScript/SKILL.md
Popularity
- Repository stars
- 514
- Repository forks
- 57
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/drawthingsai/draw-things-community/cpuscript)