llama.cpp, a second EC2 instance running the proxy-router. The two-instance split is recommended for separation of concerns; you can also collapse them onto one instance for cost.
The original draft of this guide was written when Morpheus was testnet-only. The instructions still work; updated cross-references in this page reflect the current mainnet-default release.
Architecture
Part 1 — LLM EC2 instance
Launch an EC2 instance for the model
- Sign in to AWS and open the EC2 dashboard.
- Launch instances.
- Name it (e.g.
morpheus-llm) and choose Amazon Linux. - Instance type — this directly determines which model you can run. TinyLlama works on
m5.xlarge; production models need GPU instances (g5.xlarge+ for 7-13B;g5.12xlarge+ for 70B). - Pick or create a key pair.
- Security group — open inbound TCP
8080(the model HTTP port) only from the proxy-router instance’s security group, plus port22from your IP for SSH. Don’t expose8080to the world. - Configure storage generously — model weights are large (a 7B Q4_K_M GGUF is ~4 GB; a 70B model is ~40 GB).
- Launch, then Connect → EC2 Instance Connect.
Download a model and start the server
Use the EC2 instance’s public IPv4 DNS as For a real production deployment use a properly sized model and consider vLLM or another GPU-optimized server. See Model setup for backend options.
model_host. Pick a GGUF model from HuggingFace (TinyLlama is the smallest, used here for smoke-testing only — it’s not a real production model).Part 2 — Proxy-router EC2 instance
Launch a second EC2 instance
Same steps as above, but a small instance type is fine (
t3.small works for the proxy-router itself). Name it (e.g. morpheus-proxy-router).Security group — inbound:- TCP
3333from0.0.0.0/0(this is the public consumer endpoint). - TCP
8082from your operator IPs only (admin/Swagger). - TCP
22from your IP (SSH).
8080.Clone and configure
WALLET_PRIVATE_KEY— your provider wallet’s private key.ETH_NODE_ADDRESS— your BASE RPC URL (e.g. Alchemywss://base-mainnet.g.alchemy.com/v2/<key>or HTTPS).WEB_ADDRESS=0.0.0.0:8082WEB_PUBLIC_URL=http://<proxy-router-public-dns>:8082PROXY_ADDRESS=0.0.0.0:3333
models-config.json so the proxy-router routes to your LLM instance:Build and run
Part 3 — Register on chain
Now register your provider, model, and bid following Register on chain. The providerendpoint you set there must be reachable from the public internet on :3333 — i.e. <proxy-router-public-dns>:3333.
Operational notes
- Costs. Production providers usually pair a GPU instance (
g5.*,g6.*) for the LLM with a smallt3.*for the proxy-router. Watch egress charges — heavy session traffic adds up. - Public IP stability. EC2 public DNS changes when an instance stops/starts. Use an Elastic IP on the proxy-router instance, or a stable DNS name (Route 53), so your registered provider
endpointkeeps working across reboots. - Security groups. Never expose port
8080(LLM) or8082(admin API) to0.0.0.0/0. Only3333is meant to be public. - TLS for
:8082. Put a reverse proxy (nginx, Caddy, ALB) in front of:8082if operators need to reach it from outside the VPC. See Headless operation.

