April 8, 2026
6 min read
Share article

How to Set Up OpenClaw on AWS EC2: Safest & Cheapest Cloud Method (2026 Guide)

OpenClaw Setup on AWS EC2 - Step by Step Guide

Running OpenClaw on a cloud server is the best option for most people. It stays online 24/7, you do not need to leave a computer running at home, and it is cheaper than buying dedicated hardware. This guide walks through the entire process from zero — creating an AWS account, launching an EC2 instance, installing OpenClaw, picking a model, connecting your channels, and teaching the agent your workflows.

If you have never used AWS before, that is fine. This guide assumes no prior cloud experience.

The full video walkthrough covers every click and command:

Why AWS EC2 Beats a Mac Mini for OpenClaw

The most common question people ask is whether they should run OpenClaw locally on a Mac Mini or on a cloud server. For most use cases, cloud wins. A Mac Mini costs around $600 upfront, draws power 24/7, requires your home internet to stay stable, and if it goes offline, your agent goes offline. An EC2 instance costs $35-40 per month, runs in a professional data center with redundant power and networking, and you can start or stop it whenever you want.

The only scenario where a Mac Mini makes sense is if you need to run large local models and want zero API costs. For everyone else — especially if you are running cloud models like Claude, GPT, or DeepSeek — EC2 is the smarter choice.

Setting Up Your AWS Account

Go to aws.amazon.com and create a new account. You will need an email address, a credit card, and a phone number for verification. AWS has a free tier that includes 750 hours of T2 micro instances, but for OpenClaw you will want a slightly larger instance, so expect to start paying from day one.

Once your account is active, navigate to the EC2 dashboard. You can find it by searching "EC2" in the AWS console search bar. This is where you will create and manage your server.

Launching a T3 Medium Instance

Click "Launch Instance" in the EC2 dashboard. For the operating system, select Ubuntu Server (the latest LTS version). For the instance type, choose T3 Medium. This gives you 2 vCPUs and 4 GB of RAM, which is the sweet spot for running OpenClaw with a cloud model. It is enough to handle the Gateway, Reasoning Engine, and multiple simultaneous conversations without performance issues.

For storage, set the root volume to at least 30 GB. OpenClaw's memory files, logs, and skill installations add up over time, and you do not want to run out of disk space three months in. For the security group, open port 22 for SSH access and port 18789 for the OpenClaw web interface. Restrict both ports to your IP address if possible — do not leave them open to 0.0.0.0/0.

Create a new key pair, download the .pem file, and store it somewhere safe. You will need this file every time you connect to your server.

Recommended EC2 Configuration

  • Instance type: T3 Medium (2 vCPU, 4 GB RAM)
  • OS: Ubuntu Server LTS
  • Storage: 30 GB minimum (gp3)
  • Ports: 22 (SSH) + 18789 (OpenClaw) restricted to your IP
  • Monthly cost: ~$35-40 depending on region

Installing OpenClaw on Your EC2 Instance

SSH into your new instance using the key pair you downloaded. The command looks like this: ssh -i your-key.pem ubuntu@your-instance-ip. Once connected, update the system packages and install OpenClaw using the official installation script. The script handles all dependencies — Docker, Node.js, and the OpenClaw runtime itself.

After installation completes, OpenClaw launches the onboarding wizard automatically. This is where you configure your agent for the first time.

The Onboarding Wizard and Model Selection

The onboarding wizard walks you through four steps: naming your agent, selecting a model, connecting a channel, and setting an initial personality. The model selection is the most important decision here because it determines both the capability and the ongoing cost of your agent.

For budget deployments, use DeepSeek. It offers surprisingly strong performance at a fraction of the cost of Western providers. You will spend roughly $5-15 per month on API costs depending on usage. For mid-tier deployments, GPT-4o Mini gives you excellent quality-to-cost ratio with broad tool support. Expect $15-30 per month. For premium deployments where reasoning quality matters most, Claude is the best option. It excels at complex decision-making and nuanced conversations, but costs $30-60 per month in API fees on top of your EC2 costs.

You can change models at any time without losing your agent's memory or configuration, so do not overthink this. Start with DeepSeek if you are experimenting, and upgrade later if you need better reasoning.

Connecting WhatsApp, Telegram, and Slack

Once your agent is running, connect your messaging channels. OpenClaw supports WhatsApp through the WhatsApp Business API, Telegram through a bot token, and Slack through a Slack app. Each channel has its own setup process, but they all follow the same pattern: create credentials on the platform side, paste them into OpenClaw's channel configuration, and send a test message.

Telegram is the easiest to set up — create a bot with BotFather, copy the token, and paste it into OpenClaw. WhatsApp requires a Meta Business account and takes a few more steps. Slack requires creating a Slack app in your workspace. The video above walks through each one in detail.

Teaching OpenClaw Your Goals

This is where most people stop too early. They install OpenClaw, connect a channel, and then wonder why the agent gives generic responses. The difference between a useful agent and a generic chatbot is how well you teach it your specific context.

Start by telling your agent about your role, your business, and what you spend most of your time on. Be specific. Instead of "I run a marketing agency," say "I run a B2B marketing agency focused on SaaS companies with 50-200 employees. My biggest time sinks are writing weekly client reports, scheduling social media posts across 12 client accounts, and responding to prospect inquiries that come through our website contact form."

The more specific you are about your workflows and pain points, the better OpenClaw can suggest automations that actually save you time. The agent stores this information in its memory files and uses it to personalize every interaction going forward.

Connecting Gmail, Google Calendar, Notion, and Slack Through Prompts

OpenClaw connects to external tools through a combination of built-in integrations and prompt-driven configuration. For Gmail and Google Calendar, you authorize access through OAuth and then teach the agent how you want it to handle emails and calendar events. For Notion, you provide an API key and tell the agent which databases and pages to interact with.

The key insight is that connecting a tool is only half the job. You also need to tell the agent how you want it to use that tool. For example, after connecting Gmail, prompt the agent with rules like: "Check my email every morning at 8 AM. Flag anything from clients as high priority. Draft responses to routine inquiries and send them to me for approval before sending. Archive newsletters automatically unless they mention AI or automation."

This prompt-driven approach is what makes OpenClaw flexible. The same Gmail connection can behave completely differently for two users because the behavioral rules are in the prompts, not hardcoded in the integration.

Essential AWS Commands for Managing OpenClaw

  • Check status: sudo systemctl status openclaw
  • Restart agent: sudo systemctl restart openclaw
  • View logs: sudo journalctl -u openclaw -f
  • Stop agent: sudo systemctl stop openclaw
  • Check disk usage: df -h

Real Cost Breakdown

Here is what running OpenClaw on AWS actually costs per month. The EC2 T3 Medium instance runs approximately $35-40 depending on your region. If you chose DeepSeek as your model, add $5-15 for API costs. GPT-4o Mini runs $15-30. Claude runs $30-60. So your total monthly cost ranges from $40 on the budget end to $100 on the premium end.

Compare this to hiring a virtual assistant at $1,500-3,000 per month, or the $600 upfront cost of a Mac Mini plus electricity and the reliability risk of running a server at home. For a 24/7 autonomous agent that handles messaging, scheduling, email triage, and task automation, $40-100 per month is an exceptional value.

You can also reduce costs further by stopping your EC2 instance during hours when your agent does not need to be active, though this means your agent will be unreachable during downtime.

Get Started with OpenClaw on AWS

That is the complete setup. You have a cloud server running OpenClaw, a model powering the reasoning, channels connected for communication, and tools integrated for real work. If you want help optimizing your deployment, selecting the right model for your use case, or building custom automations, OpenClaw Consult works with teams at every stage. Watch the full video, join the community, and start building:

Community & Training

Join 215+ AI Agency Owners

Get free access to our LinkedIn automation tool, AI content templates, and a community of builders landing clients in days.

Access the Free Sprint
22 people joined this week