Skip to main content

How to Set Up Your Own AI Agent on AWS for Free (Step-by-Step)

Published: January 28, 20268 min read
#ai-agent#aws#clawdbot#tutorial#solopreneur#free-tier

How to Set Up Your Own AI Agent on AWS for Free (Step-by-Step)

Give Claude a body. Run it on your own server. Talk to it from your phone. Zero cost for 12 months.


Why Your Own Server?

Most people interact with AI through a chat window. Type a question, get an answer, close the tab.

That's like hiring someone brilliant — but only letting them talk. No computer, no tools, no ability to actually do anything.

An AI agent running on your own server is different. It can:

  • Run commands — install software, manage files, execute scripts
  • Browse the web — log into admin panels, fill out forms, scrape data
  • Call APIs — manage your DNS, deploy code, send emails
  • Talk to you — via Telegram, WhatsApp, Discord, or Signal
  • Stay on 24/7 — it doesn't sleep, doesn't close the tab, doesn't forget

That's not a chatbot. That's a digital coworker.

Why AWS? Why Free?

AWS offers a free tier that includes 12 months of a t2.micro EC2 instance — a small Linux server in the cloud. It's enough to run an AI agent comfortably.

Here's the cost breakdown for my setup:

Component Cost
AWS EC2 (t2.micro, free tier) $0/mo
Claude Pro/Max subscription Already paying for it
Telegram bot Free
Clawdbot (open source) Free
Total additional cost $0

If you already have a Claude subscription (Pro, Max, or an API key), you're not spending a single extra dollar.

Why I'm Running It This Way

I'm building a portfolio of AI-powered micro-businesses. My AI agent (named Marvin) helps me with everything — DNS management, browser automation, email setup, writing, research.

But I'm still in testing mode. I want to:

  1. Ringfence the agent — it runs on an isolated server, not my personal machine. If something goes wrong, my laptop and data are untouched.
  2. Keep costs at zero — AWS free tier + existing Claude subscription means no new expenses while I evaluate.
  3. Have it always on — unlike running on my laptop, the AWS server doesn't sleep when I close the lid.

Once I trust the setup fully, I might move it closer to home. But for now? A free sandboxed server is the perfect testing ground.

What You'll Need

Before we start, gather these:

  • AWS accountaws.amazon.com (free to create)
  • Claude API key or Claude Pro/Max subscription — for the AI model
  • Telegram account — for talking to your agent (WhatsApp/Discord also work)
  • 30 minutes — that's genuinely all it takes

Step 1: Launch an EC2 Instance

Create the server

  1. Log into AWS Console
  2. Search for EC2 → Click Launch Instance
  3. Configure:
    • Name: clawdbot (or whatever you like)
    • OS: Ubuntu 24.04 LTS (free tier eligible)
    • Instance type: t2.micro (free tier eligible)
    • Key pair: Create a new one → download the .pem file (you'll need this to connect)
    • Security group: Allow SSH (port 22) from your IP
  4. Click Launch Instance

Connect to your server

# Make your key file secure
chmod 400 your-key.pem

# Connect via SSH
ssh -i your-key.pem ubuntu@YOUR_SERVER_IP

Replace YOUR_SERVER_IP with the public IP from your EC2 dashboard.

Windows users: Use WSL2 (Windows Subsystem for Linux) for the best experience. Install it first, then follow the Linux steps inside WSL.

Step 2: Install Clawdbot

Once you're connected to your server, run the one-line installer:

curl -fsSL https://clawd.bot/install.sh | bash

This installs Node.js, the Clawdbot CLI, and all dependencies. Takes about 2 minutes.

Verify the installation

clawdbot --version

You should see the version number. You're in business.

Step 3: Run the Onboarding Wizard

Clawdbot has a guided setup that walks you through everything:

clawdbot onboard --install-daemon

The wizard will ask you about:

🔑 AI Model Authentication

You need to connect Clawdbot to an AI model. Options:

Option A: Anthropic API Key (recommended)

Option B: Claude Pro/Max subscription

  • If you have Claude Pro or Max, you can use claude setup-token to authenticate
  • This uses your existing subscription — no additional API costs

📱 Channel Setup (How You'll Talk to Your Agent)

The wizard will ask which messaging platforms to connect. I recommend Telegram for getting started — it's the simplest:

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Choose a name and username for your bot
  4. Copy the token BotFather gives you
  5. Paste it into the wizard

That's it. Your agent now has a Telegram presence.

🔒 Security Defaults

The wizard sets up:

  • Pairing mode — unknown people can't just message your bot and get responses. First contact requires approval.
  • Gateway token — secures the control interface
  • Daemon service — auto-starts Clawdbot on boot via systemd

Step 4: Start Talking to Your Agent

  1. Open Telegram
  2. Search for your bot's username
  3. Send it a message: Hello!
  4. You'll get a pairing code — approve it when prompted
  5. You're in.

Your AI agent is now running on AWS, accessible from your phone, 24/7.

Step 5: Give Your Agent Superpowers (Optional but Recommended)

Web Search

Give your agent the ability to search the web:

clawdbot configure --section web

Get a free Brave Search API key at brave.com/search/api and paste it in.

Browser Automation

Install Chrome for headless browser control:

# Install Chrome
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt update
sudo apt install -y google-chrome-stable

Now your agent can log into websites, fill forms, and navigate admin panels.

Workspace Setup

Clawdbot automatically creates a workspace at ~/clawd with starter files:

  • SOUL.md — Your agent's personality and behavior guidelines
  • AGENTS.md — Operating instructions
  • USER.md — Info about you (so the agent knows who it's helping)
  • IDENTITY.md — The agent's name, emoji, vibe
  • TOOLS.md — Notes about your specific setup

Edit these to make the agent yours. This is where the magic happens — a well-configured agent workspace turns a generic AI into your AI.

Step 6: Keep It Running

The onboarding wizard installs a systemd service that starts automatically. Useful commands:

# Check status
clawdbot status

# View live logs
sudo journalctl -u clawdbot -f

# Restart
sudo systemctl restart clawdbot

# Health check
clawdbot health

What You Can Do Now

With your agent running, here's what becomes possible:

🔧 System administration — "Install nginx and set up a reverse proxy"

🌐 Web automation — "Log into my Google Workspace admin and add this domain"

📁 File management — "Organize my project files and create a README"

🔍 Research — "Find the best email deliverability practices and summarize them"

📊 Monitoring — "Check my websites every hour and tell me if any go down"

✍️ Writing — "Draft a blog post about what we built today"

And it all happens through a Telegram message from your phone. While you're on a walk. Or in a meeting. Or asleep.

The Security Model

I want to be transparent about what you're giving the agent access to:

What the agent CAN do:

  • Run shell commands on the EC2 instance
  • Read/write files in its workspace
  • Browse the web with a headless browser
  • Send messages back to you via Telegram

What keeps it safe:

  • It runs on an isolated server — not your personal computer
  • Pairing mode ensures only approved users can interact
  • The EC2 instance is disposable — if anything goes wrong, terminate and start fresh
  • AWS free tier means zero financial risk
  • Clawdbot is open source — you can audit every line of code

This is why I run it on AWS rather than my laptop. The server is a sandbox. My personal files, passwords, and accounts are on a completely separate machine.

Troubleshooting

Can't connect via SSH?

  • Check your EC2 security group allows SSH from your IP
  • Make sure you're using the right .pem file
  • Verify the instance is running in the EC2 dashboard

Bot doesn't respond on Telegram?

  • Check the bot token is correct: clawdbot channels login
  • Approve the pairing code if it's your first message
  • Check logs: sudo journalctl -u clawdbot -n 50

Running out of free tier?

  • Monitor usage at AWS Billing Dashboard
  • Set up a billing alert for $1 to catch any surprise charges
  • The t2.micro includes 750 hours/month — enough to run 24/7

What's Next

This is Part 2 of a series about building a solopreneur business with an AI agent as your only teammate.

Previously: I Gave an AI Agent Full Access to My Infrastructure. Here's What Happened in 2 Hours.

Coming up:

  • How we built and deployed a product in a weekend
  • The AI agent's daily routine (heartbeats, proactive checks, memory management)
  • When AI agents fail (and what to do about it)

I'm Jamie Watters. I'm building a portfolio of 50+ AI-powered micro-businesses by 2030, solo, in public. Follow along at jamiewatters.work.

My agent Marvin runs on Clawdbot — open source, self-hosted, and free to use. GitHub →


P.S. Yes, Marvin helped write this guide too. He looked up his own documentation to make sure the steps were accurate. Meta? Sure. But that's the point — when your AI agent can help you write the tutorial about setting up AI agents, you're living in the future. 🧠

Share this post