Skip to content

Repository files navigation

offload

Run coding agents on remote Docker containers. Your terminal is a thin client — everything executes on a pod. Encrypted end-to-end.

How it works

Your terminal Your VPS
┌──────────────────┐ encrypted WSS ┌──────────────────────┐
│ offload │ ◄─────────────────► │ offload swarm │
│ (thin terminal) │ PTY I/O stream │ │
│ │ │ ┌────────────────┐ │
│ stdin ───────────┼────────────────► │ │ Docker pod │ │
│ stdout ◄─────────┼──────────────── │ │ pi / claude │ │
│ │ │ └────────────────┘ │
└──────────────────┘ └──────────────────────┘

When you run offload, a Docker container is spun up (or claimed from a warm pool), and the agent launches inside it with a PTY. Your terminal streams keystrokes up and output back. All frames are encrypted with NaCl secretbox using a pre-shared passphrase.

Quick start

# Install
npm install -g offload
# Create config
mkdir -p ~/.offload
cat >~/.offload/config.json << 'EOF'{ "passphrase": "your-secret-passphrase", "command": "pi"}EOF# Build the Docker image (one-time)
offload build
# Start the daemon
offload swarm
# Connect (in another terminal)
offload

Commands

CommandDescription
offloadConnect to a pod and run the default command
offload swarmStart the daemon and pod pool
offload buildBuild the runner Docker image
offload run "claude"Run a specific command in a pod
offload statusShow pool statistics
offload attach <id>Reattach to a detached session

Press Ctrl+\ to detach from a session — the pod stays alive. Reattach with offload attach <session-id>.

Configuration

~/.offload/config.json:

{
"passphrase": "your-secret-passphrase",
"command": "pi",
"server": "ws://localhost:9876",
"port": 9876,
"host": "0.0.0.0",
"poolSize": 0,
"image": "offload/runner:latest"
}
FieldDescriptionDefault
passphraseEncryption key (required)
commandDefault agent commandpi
serverDaemon URL (client-side)ws://localhost:9876
portListen port (daemon-side)9876
hostListen host (daemon-side)0.0.0.0
poolSizeWarm pods to pre-create0 (on-demand)
imageDocker image for podsoffload/runner:latest
dockerHostDocker socket pathauto-detected

Set poolSize to a higher number (e.g. 5) if you want instant pod assignment without cold-start delay.

All config values can be overridden with environment variables: OFFLOAD_PASSPHRASE, OFFLOAD_SERVER, OFFLOAD_PORT, OFFLOAD_POOL_SIZE, OFFLOAD_IMAGE, OFFLOAD_COMMAND, DOCKER_HOST.

API keys

The daemon auto-forwards these env vars into pods:

  • ANTHROPIC_API_KEY
  • OPENAI_API_KEY
  • GOOGLE_API_KEY
  • GROQ_API_KEY
  • MISTRAL_API_KEY

Set them in your shell before running offload swarm.

Security

LayerProtection
TLS (WSS)Transport encryption
NaCl secretboxE2E per-frame encryption
Pre-shared passphraseOnly matching clients can connect
Container isolationEach session gets its own pod

License

MIT

About

Run coding agents on remote Docker containers with encrypted PTY streaming and warm pod pools

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages