Welcome to the Meetrix 9Router developer guide for Google Cloud Platform! 9Router is a self-hosted AI routing proxy that connects Claude Code, Codex, Cursor, Cline, Copilot, and other CLI tools to 40+ LLM providers behind a single OpenAI-compatible endpoint. It translates request formats between OpenAI, Claude, and Gemini, tracks quota, auto-refreshes tokens, and falls back from subscription to cheap to free providers so you never stop coding. The built-in RTK token saver compresses tool output to cut input tokens by roughly 20-40%.
With the Meetrix pre-configured GCP image, you can deploy a production-ready 9Router instance on your own Google Cloud project in minutes. This guide walks you through finding the product on GCP Marketplace, configuring the deployment, pointing DNS and issuing SSL, connecting your first provider, and wiring a CLI tool to your new endpoint. If you run your infrastructure on AWS instead, the 9Router on AWS developer guide covers the same product as a CloudFormation stack.
Prerequisites
Before you begin, make sure you have the following:
- Basic Google Cloud Platform knowledge.
- An active Google account with a GCP project and billing enabled.
- Sufficient Compute Engine CPU quota in your target region for the machine type you plan to use.
- A domain name you can manage DNS records for, if you want automatic SSL.
What You Get
The image ships a fully wired 9Router stack so you do not have to assemble it yourself:
- 9Router v0.5.65 running as a Docker container (
decolua/9router:0.5.65) on Ubuntu 26.04 LTS. - Docker and Docker Compose, with the image pre-pulled for a fast first boot.
- An nginx reverse proxy for HTTP and HTTPS, tuned for Server-Sent Events streaming (no buffering, long timeouts) so token streaming to your CLI tools is not broken.
- Automatic SSL via Let's Encrypt for the domain you set during deployment.
- SQLite data in a Docker volume on the persistent boot disk, so provider connections and settings survive a VM stop and restart.
- A pre-hardened base image with ufw, unattended-upgrades, and the standard GCP guest environment.
Launch the Product
Step 1: Find the Product
- Log in to your Google account.
- Go directly to the product page: 9Router LLM Gateway: Multi-Provider AI Model Router on GCP Marketplace.
- You can also browse all Meetrix products at the Meetrix Solutions Page.
Step 2: Launch the Product
- Select your GCP project from the project selector at the top.
- Click the Launch button.
- Review the terms and agreements, tick the acknowledgement checkbox, and click AGREE.
Free Trial
This product includes a 5-day free trial with up to USD 50.00 in licence fee credits. To activate it, tick I accept the solution trial Terms and Conditions before proceeding.
Trial note
Step 3: Configure the Deployment
You will see the deployment configuration form. Fill in the fields across the following sections.
General
- Deployment name - A unique name for this deployment (a default is pre-filled).
- Deployment Service Account - Select an existing service account that has the
roles/config.agent,roles/compute.admin, androles/iam.serviceAccountUserroles, or let GCP create a new one for you. - Zone - Select the GCP zone closest to your users (for example
us-central1-a).
Machine Type
- Series - The
General purposetab with theE2series is preselected. - Machine type - Default
e2-small(2 vCPU, 2 GB RAM) is enough for a single user or a small team. Choose a larger type if you expect heavy concurrent traffic through the proxy.
GCP shows an estimated monthly cost, made up of the Meetrix licence fee and the underlying infrastructure fee, based on your selected machine type and disk size before you deploy.
Step 4: Configure Networking
- Network and Subnetwork - Leave as
defaultunless you have a custom VPC. - External IP - Leave as
Ephemeral. SelectNoneonly if you do not need public internet access, which is not useful for a proxy your tools call from anywhere. - Allow SSH (TCP port 22) from the Internet - Enabled by default. Restrict the source IP range if you want to limit SSH access to specific IPs.
Step 5: Application Settings
Scroll down to the Application Settings section and provide:
- Domain name - The public domain for your 9Router dashboard and API (for example
9router.yourdomain.com). Point your DNS A record to the instance IP before or shortly after deploying. - Admin email - The email address used when requesting the Let's Encrypt SSL certificate.
- Dashboard initial password - The password for your first dashboard login. This field is required and has no default. Change it from the dashboard after logging in.
Tick I accept the solution trial Terms and Conditions, then click Deploy and wait a few minutes for the deployment to complete.
Point DNS to Your 9Router Server
Skip this section if you plan to access the instance by its external IP address instead of a real domain.
Step 1: Get the External IP
- Once deployment is complete, open the VM instance from the deployment details.
- Copy the External IP from the Network interfaces section.
Step 2: Create a DNS A Record
- Go to your DNS provider.
- Add an A record pointing your 9Router domain (for example
9router.yourdomain.com) to the copied external IP. - Wait for DNS propagation before proceeding (typically a few minutes to 1 hour).
DNS must propagate first
Access 9Router
Once DNS has propagated and SSL has issued, open your domain in a browser. Log in with the Dashboard initial password you set in the Application Settings section during deployment. The username field is not used.
502 Bad Gateway Error?
Once you are in, change the password from the dashboard and keep it somewhere safe.
Connect a Provider
9Router does nothing until it has at least one provider to route to.
- Go to Providers in the dashboard.
- Connect at least one provider. You can start with a free tier such as Kiro AI or DeepSeek Free, connect a paid subscription like Claude Code or Cursor, or use Add OpenAI Compatible / Add Anthropic Compatible to paste in your own API key for a provider like Anthropic, OpenAI, or Google.
- Add more providers if you want fallback. 9Router routes subscription first, then cheap, then free, so requests keep succeeding when one provider is rate-limited or out of quota.
If you want to route to a model you host yourself, stand it up behind an OpenAI-compatible API and add it as a custom provider. Our vLLM developer guide covers serving an open-weight model that way, and the best open source LLMs for self-hosting rundown is a reasonable place to pick one.
Point Your CLI Tool at 9Router
- In the dashboard, open Endpoint & Key and copy your API key.
- Configure your CLI tool with these values:
Endpoint: https://<your-domain>/v1
API Key: <key from the dashboard>
Model: <provider>/<model>, for example kr/claude-sonnet-4.5 This works with any OpenAI-compatible client, including Claude Code, Codex, Cursor, Cline, and Copilot. Requests are translated to the target provider's format automatically, so you can keep the same tool while switching the model behind it. The CLI Tools section of the dashboard has copy-paste snippets for the common ones.
Generate an SSL Certificate Manually
9Router tries to issue SSL automatically on first boot for the domain you passed as Domain name. If that fails, for example because DNS had not propagated yet, you can generate it manually.
Step 1: SSH into the Server
- Go to the VM instance page in the GCP console.
- Click SSH to open a browser-based terminal and authorize access.
Step 2: Re-issue the Certificate
The image includes a pre-configured certificate script. Run it with:
sudo bash /root/certificate_generate_standalone.sh This runs certbot using the domain name and admin email you provided during deployment. Once it completes, reload nginx:
sudo systemctl reload nginx Check Server Logs
Open an SSH session to the instance from the GCP console, then check the container and follow its logs. The application runs from /opt/9router:
sudo docker ps
sudo docker logs -f 9router Configuration lives in /opt/9router/.env and /opt/9router/docker-compose.yml. The SQLite database is in the Docker volume 9router-data, mounted at /app/data, with the file at db/data.sqlite.
Back Up the Database
The SQLite database lives in the 9router-data Docker volume on the persistent boot disk, so it remains available after VM stops and restarts. The image ships a backup helper at /opt/scripts/dbbackup.sh that writes a timestamped, gzipped copy of the database. Run it from an SSH session before deleting or upgrading the deployment:
sudo bash /opt/scripts/dbbackup.sh Then use the Download file option in the SSH-in-browser window to save the snapshot to your machine.
Manage the Deployment
Stop the VM
To stop the VM without deleting it, go to Compute Engine → VM Instances in the GCP console, select your instance, and click Stop. You can restart it later with your data intact. If the external IP is ephemeral it may change on restart, so update your DNS A record afterward, or reserve a static IP if you stop and start the VM often.
Delete the Deployment
To fully remove the deployment and stop all billing:
- Go to Solution deployments in the GCP console.
- Find your 9Router deployment.
- Click Delete to remove all associated resources.
Back up the SQLite database first if you want to keep your provider connections and settings.
Upgrades
When a new image version is available in the GCP Marketplace, back up your data, delete the previous deployment, and relaunch with the new version.
Troubleshoot
Quota or Capacity Errors
GCP enforces regional CPU quotas. If you hit a quota error when deploying, request a Compute Engine CPU quota increase for that region, or choose a different region or zone with available capacity.
502 Bad Gateway
If the dashboard is temporarily inaccessible, wait 5-10 minutes and retry. The container is likely still starting up.
SSL Did Not Issue
Confirm your DNS record points at the external IP and has propagated, then re-run the certificate script from the "Generate an SSL Certificate Manually" section.
Disk Space
If 9Router becomes unresponsive, check whether the boot disk is full:
df -h If the root volume is between 90-100% full, resize the persistent disk in the GCP console, then reboot the instance and restart the service.
Conclusion
The Meetrix 9Router Deployment Guide gets a self-hosted AI routing proxy running on your own GCP project in minutes. Once it is up, you point every AI coding tool at one endpoint, connect as many providers as you like, and let 9Router handle format translation, quota tracking, fallback, and token savings behind the scenes. For a self-hosted agent that pairs well with a vendor-neutral model router, see the Hermes Agent on GCP developer guide.
Deploying on AWS Instead?
The same product is available as a CloudFormation stack on AWS Marketplace, with the same providers, endpoint, and token saver.
Technical Support
If you run into any issues, our support team is here to help. Reach out to us at support@meetrix.io and we will respond within 12 hours.
Frequently Asked Questions
What is 9Router?
9Router is an open-source smart router that sits between your AI coding tools and dozens of model providers. It exposes a single OpenAI-compatible endpoint, translates request formats between OpenAI, Claude, and Gemini, tracks quota, auto-refreshes tokens, and falls back from subscription to cheap to free providers so your CLI tools keep working. A built-in RTK token saver compresses tool output to cut input tokens.
What are the prerequisites for deploying 9Router on GCP?
You need basic knowledge of Google Cloud Platform, an active Google account with a GCP project and billing enabled, sufficient Compute Engine CPU quota in your target region for the machine type you plan to use, and a domain name you can manage DNS records for if you want automatic SSL.
Which machine type should I choose?
The default General purpose e2-small (2 vCPU, 2 GB RAM) is enough for a single user or a small team. Choose a larger machine type if you expect heavy concurrent traffic through the proxy.
How do I log in for the first time?
Open your domain once DNS has propagated and SSL has issued, then log in with the Dashboard initial password you set in the Application Settings section during deployment. The username field is not used. Change the password from the dashboard after your first login.
Which providers can I connect?
9Router supports 40+ LLM providers. You can start with a free tier such as Kiro AI or DeepSeek Free, connect a paid subscription like Claude Code or Cursor, or paste in your own API key for providers like Anthropic, OpenAI, or Google. 9Router then routes requests across whatever you have connected, with automatic fallback.
How do I point my CLI tool at 9Router?
In the dashboard, open Endpoint & Key and copy your API key. Then set your tool's base URL to https://
Where is my data stored, and can I back it up?
9Router keeps its state in a SQLite database in the Docker volume 9router-data at /app/data/db/data.sqlite, on the instance's persistent boot disk, and it survives VM stops and restarts. To take a manual backup, run the bundled helper script sudo bash /opt/scripts/dbbackup.sh over SSH before deleting or upgrading the deployment.
Deploy 9Router on GCP in Minutes
Launch a production-ready, self-hosted 9Router proxy on Google Cloud with a pre-configured Meetrix image and route every AI coding tool through one endpoint.
Get Started on GCP Marketplace