OpenClaw LogoShipClawFast
  • Introduction
  • Prerequisites
  • Clone And Install
  • Supabase Setup
  • Llm Api Keys
  • Vercel
  • Polar Setup
  • Flyio Setup
  • Deploy Api
  • Push Agent Image
  • Environment Variables
  • Going Live
  • How To Customize

Push the Agent Image

Before you start this guide: You must have completed 09 — Deploy the API.

Now that your API backend is alive, we just need to upload the blueprint for the AI Agent itself to Fly.io's registry.

Think of this like uploading a cookie-cutter to the cloud. Whenever a customer pays you on Polar, your API grabs this cookie-cutter and instantly stamps out a fresh, blank AI machine just for them!

Reminder: We are setting up two separate apps in Fly.io. You deployed the "API App" in Step 9. Here in Step 10, we are deploying the second "Agent" template app!

CRITICAL Security Note: You DO NOT push the .env secrets into this Agent app. Your API securely injects passwords into these machines dynamically. The Agent bucket must remain perfectly empty of secrets!


Prepare the Agent App

  • 1.1 Open your terminal. You are currently still inside apps/api from the last guide. We need to go back out to the main folder. Run:
cd ../../
  • 1.2 Open the fly.toml file that is sitting right inside that main/root folder in VS Code.

  • 1.3 Change the very first line from app = "openclaw-wrapper" to the exact Agent App Name you picked in your .env file last guide (e.g. app = "shipclawfast-agent"). Save the file.

(This tells Fly, "Hey, this blueprint belongs exactly to the Agent bucket!")

Tick the checkbox if you completed the step successfully.

Create the Cloud Bucket

Just like the API, we need to create an empty bucket in Fly.io to hold this image. Fly.io application names are worldwide. If someone else on earth already picked your name, Fly will reject it.

  • 2.1 Run this command to create the empty app. Replace your-agent-name with what you just put in the root fly.toml:
fly apps create your-agent-name

(For example: fly apps create shipclawfast-agent)

  • 2.2 Did you get an error? If the terminal says: Error: Validation failed: Name has already been taken:
  1. You must pick a more unique name (e.g. shipclawfast-agent-john77).
  2. Go into your .env file and update AGENT_APP_NAME= to this new unique name.
  3. Open fly.toml in the root folder and update app = to this new unique name.
  4. Try running the fly apps create command again with the new name.

Wait for it to say the app was created successfully.

Tick the checkbox if you completed the step successfully.

Deploy the Image

Because this app never receives raw web traffic (the customers talk to it via Telegram bots), we do not need to mess with ports or domains. We just tell Fly to build it and save it.

  • 3.1 In the terminal (still in the root folder), run this exact command:
fly deploy -a your-agent-name --image-label latest
  • 3.2 Fly will now grab the agent/Dockerfile blueprint and build all the heavy AI engine code directly on their supercomputers.

(This takes around 4-6 minutes because the OpenClaw Engine is incredibly powerful. Go grab a coffee!)

  • 3.3 When it finishes, you have a perfect latest image sitting invisibly in the cloud waiting to be cloned. Customers can now officially buy subscriptions!
Tick the checkbox if you completed the step successfully.

Checklist — Before moving on

  • I returned to the main root folder in the terminal
  • I renamed app = inside the root fly.toml file
  • I ran fly apps create to reserve the bucket (and picked a unique name if it failed)
  • I made sure AGENT_APP_NAME in .env matches the final unique bucket name
  • I ran fly deploy to build the agent image permanently (and I did NOT push .env secrets to it)

When every checkbox above is ticked, move on to 11 — Environment Variables Checklist.

Category: cloud-directShipClawFast Engine