top of page

LBSocial

OpenClaw + Google Cloud: Build a 24/7 Personal AI Assistant

Updated: 3 days ago

If you have been keeping up with the latest in AI, you have definitely heard about OpenClaw. It is the viral, open-source AI agent that actually does things, not just chat.


Today, we are going to walk through exactly how to set up your own OpenClaw assistant on a Google Cloud Virtual Machine (VM) so it can run 24/7. We will also connect it directly to Telegram so you can control it right from your phone.


OpenClaw + Google Cloud: Build a 24/7 Personal AI Assistant


The OpenClaw + Google Cloud System Diagram


Before building the system, it helps to visualize how OpenClaw operates as an autonomous digital teammate. In this architecture, OpenClaw combines persistent memory, planning, and execution capabilities to turn user instructions into structured task lists and carry out work with minimal supervision. This design allows background workflows to continue running productively even when the user is away.


Robot labeled "OpenClaw" at a computer, with rainbow brain, interacts with phone labeled "Gemini AI." Background features cloud icons.
The OpenClaw + Google Cloud System Diagram
  1. User Interface (Right Side)This is the command center for human interaction. The user sends plain-language commands and messages through a mobile chat application and receives real-time updates, responses, and task progress from the bot.


  2. Intelligent Agent (Center)This is the core “living agent” of the system. It combines the reasoning power of an external brain, such as Gemini, with persistent memory and planning functions. Together, these components allow the agent to interpret requests, develop action plans, and carry out tasks in a deliberate, organized way.


  3. Execution Engine (Left Side)This is the isolated runtime environment where the agent actually works. The ecosystem runs on a private virtual machine, such as a Google Cloud E2 instance, inside Google Cloud Platform. From there, the agent uses its command and reasoning channels to access the operating system, terminal, and file system, enabling it to perform tasks directly on the cloud-based machine and its resources.



Breaking Down the Costs


Running a 24/7 AI agent involves two main costs:


  1. The Cloud Computer (Google Cloud): The cost of the VM running 24/7 is minimal. Running an instance for a few days costs less than $1. It is highly recommended to set up a billing budget so you get an alert if something goes wrong and can stop the instance immediately.

  2. The Gemini API's AI Brain: Light usage for one or two days may cost around $2, but it increases based on your agent's activity.


Pro-Tip to Save Money: * Google AI Pro Plan: The $20/month plan gives you $10/month in API credits, which can cover your Gemini API costs.


  • New Users: Setting up your first Google Cloud project gives you $300 in credits (expires in 3 months).

    Important note: These credits apply to your Google Cloud infrastructure (such as VMs), but they cannot be used to cover Gemini API costs.

  • Educators & Students: If you are teaching students to set up OpenClaw, you can apply for educational credits. Faculty members can receive up to $100, and students up to $50.


Step 1: Set Up the Google Cloud Virtual Machine


Let's get our cloud server running.

  1. Go to the Google Cloud Console and create a new project. Let's call it demo-openclaw.

  2. Set up your billing account if this is your first time.

  3. Set up a billing budget: This is highly recommended so you get an email alert if something goes wrong. This allows you to stop your instance immediately before unexpected charges pile up.

  4. Go to Compute Engine and enable the Compute Engine API.

  5. Create a new instance and name it openclaw-vm.

  6. Choose your machine type. We will use the E2 family. The e2-medium costs about $25/month, but the recommended minimum instance is the e2-small, which costs about $13/month.

  7. Click Create.


Cloud platform interface showing VM options with a dropdown for machine types. Monthly estimate is $7.11. Visible text and costs.
The Google Cloud Compute Engine dashboard showing the e2-small VM creation


Step 2: Install OpenClaw on the VM


Once your instance is ready, click the drop-down list next to it and choose Connect with browser.


A Linux window will pop up. You only need to run one Linux command to install it. Paste the following command and hit Enter:



OpenClaw will automatically download the packages and tools and build the environment for you. For the most up-to-date commands and system requirements, always check the official OpenClaw installation documentation.


Step 3: Generate Your API Keys


While OpenClaw is installing, we need to gather our keys.


1. The Gemini API Key:

  • Go to Google AI Studio.

  • Click Create new API key, then import the demo-openclaw project from Google Cloud.

  • Generate the key, name it "OpenClaw Key," and set a billing cap (e.g., $5) for safety.


2. The Telegram Bot Token:

  • Open Telegram on your phone and search for BotFather (make sure it has the blue checkmark).

  • Start a chat and click Create a new bot.

  • Give it a name (e.g., "Open Claw") and a unique username ending in "bot" (e.g., demoopenclaw123bot).

  • BotFather will give you an API token. Keep this secret!


Chat interface with BotFather instructions for creating and managing Telegram bots. Text lists bot commands on a green patterned background.
The Telegram BotFather chat showing the creation of the new bot

Step 4: Configure OpenClaw


Go back to your Linux terminal. OpenClaw should be installed successfully. Now we start the onboarding mode:


  1. Choose Yes for personal use.

  2. LLM API: Choose Google and paste your Gemini API key.

  3. Default Model: Select your preferred model (e.g., Gemini 3.1 Pro).

  4. Channel: Choose Telegram and enter the Bot Token you got from BotFather.

  5. Configure Skills: This is where OpenClaw gets powerful. You can enable skills like GitHub control, Gmail, Calendar, and Nano Banana for image generation.

    Note: Only enable skills you are comfortable with, as granting access carries risks.

  6. Persona: Give it some rules. For example: "You are my personal assistant. Be professional and use emojis."


Press Ctrl+C twice to close the session if you are done with the boundaries file.



Step 5: Pair and Use Your Assistant


Open your new bot in the Telegram app and type /start.


You will need a pairing code. The Telegram bot will generate and display a pairing approval code for you. Copy that code, go back to your Google Cloud Linux terminal, and enter it to authorize the connection.


You are connected! You can now ask it to:

  • "Check the weather in Fairfax."

  • "Create an image about the weather."

  • "Remind me about the weather every day at 9:00 AM" (OpenClaw will automatically set up this daily background job for you).


Chat with AI named OpenClaw about Fairfax, VA weather; green background, overcast info, image link, daily weather report setup.
The Telegram app on a phone showing OpenClaw fetching the weather, generating an image, and confirming the daily scheduled job

Save Costs: Run OpenClaw Locally


There you have it—your very own OpenClaw agent running 24/7. However, running this setup with cloud providers and external APIs can drain your tokens quickly if your agent is highly active.


If you want to save your tokens and avoid API bills altogether, you can deploy OpenClaw entirely locally. You can set it up on a machine like a Mac Mini, pair it with a local Large Language Model, and get the exact same features with zero API costs and full privacy.


Comments


bottom of page