🩺 ByteDoc

Free 24/7 Clawdbot Hosting: AWS & Railway Guide

Run your AI assistant in the cloud without spending a dime.

10 min read • By ByteDoc

Want Clawdbot running 24/7 without keeping your computer on? You can host it for free using AWS Free Tier or Railway. This guide shows you exactly how.

Why Host in the Cloud?

  • Always on — Your AI is available even when your laptop is closed
  • Reliable — No disconnects from sleep mode or restarts
  • Accessible anywhere — Message your AI from any device
  • Free — Both options have generous free tiers

Option 1: AWS Free Tier (Recommended)

AWS gives you a free EC2 instance for 12 months. It's enough to run Clawdbot 24/7.

Step 1: Create an AWS Account

  1. Go to aws.amazon.com
  2. Click "Create an AWS Account"
  3. Enter your email and create a password
  4. Add a payment method (required but won't be charged if you stay in free tier)
  5. Complete phone verification
  6. Choose the "Basic support - Free" plan

Step 2: Launch an EC2 Instance

  1. Go to the EC2 Dashboard
  2. Click "Launch Instance"
  3. Name it "Clawdbot" or whatever you want
  4. Choose Ubuntu 24.04 LTS (or 22.04)
  5. Select t2.micro (Free tier eligible)
  6. Create a new key pair (download and save the .pem file!)
  7. In Network settings, allow SSH (port 22)
  8. Keep storage at 8GB (free tier allows up to 30GB)
  9. Click "Launch Instance"

Step 3: Connect to Your Server

On Mac/Linux, open Terminal:

chmod 400 your-key.pem ssh -i your-key.pem ubuntu@YOUR_PUBLIC_IP

On Windows, use PuTTY or the built-in OpenSSH client.

Find your Public IP in the EC2 console under your instance details.

Step 4: Install Clawdbot

Once connected via SSH, run the one-liner:

curl -fsSL https://get.clawd.bot | bash

Follow the setup wizard to:

  • Add your API key (Anthropic or OpenAI)
  • Choose your model
  • Connect WhatsApp/Telegram/Discord

Step 5: Keep It Running

Install the Gateway as a service so it runs even after you disconnect:

clawdbot gateway install

Enable lingering so it survives logout:

sudo loginctl enable-linger ubuntu

That's it! Your Clawdbot is now running 24/7 in the cloud.

Option 2: Railway (Even Easier)

Railway is a platform that makes deployment dead simple. They have a free tier that's perfect for Clawdbot.

Step 1: Sign Up

  1. Go to railway.app
  2. Sign up with GitHub
  3. Verify your account

Step 2: Deploy Clawdbot

  1. Click "New Project"
  2. Choose "Deploy from GitHub repo"
  3. Search for the Clawdbot repository or use a template
  4. Click "Deploy"

Step 3: Add Environment Variables

In your Railway project settings, add these variables:

  • ANTHROPIC_API_KEY — Your Claude API key
  • TELEGRAM_BOT_TOKEN — If using Telegram

Step 4: Connect Your Channel

For Telegram, it works immediately after adding the bot token.

For WhatsApp, you'll need to access the Railway shell to scan the QR code:

  1. Go to your deployment
  2. Click on the service
  3. Open the shell/terminal
  4. Run clawdbot channels login whatsapp
  5. Scan the QR code

AWS vs Railway: Which to Choose?

AWS Free Tier Railway
Free period 12 months $5 credit/month
Setup difficulty Medium Easy
Control Full (it's your server) Limited
WhatsApp Easy Tricky (QR code in shell)
Best for Long-term hosting Quick setup

My recommendation: Use AWS if you want a real server you control. Use Railway if you just want to get running fast and don't mind limitations.

Keeping Costs at Zero

AWS Free Tier Tips

  • Stick with t2.micro — anything bigger costs money
  • Stay under 30GB storage
  • Watch your bandwidth (15GB/month free)
  • Set up billing alerts to avoid surprises
  • After 12 months, consider migrating to a cheap VPS (~$5/month)

Railway Tips

  • The $5 free credit resets monthly
  • Clawdbot is lightweight — you'll likely stay under $5
  • If you exceed it, you'll need to add payment

Troubleshooting

Can't connect via SSH

  • Make sure your security group allows port 22
  • Check that you're using the correct key file
  • Verify the instance is running

Gateway stops when I disconnect

Make sure you ran:

sudo loginctl enable-linger ubuntu clawdbot gateway install

WhatsApp keeps disconnecting

  • Make sure your server isn't running out of memory
  • Check that Node (not Bun) is running Clawdbot
  • Re-scan the QR code if the session expired

Railway deployment fails

  • Check the build logs for errors
  • Make sure all required environment variables are set
  • Try redeploying

Next Steps

Once your cloud Clawdbot is running:

  1. Customize your AI — Edit SOUL.md to give it personality
  2. Add skills — Install plugins for weather, web search, etc.
  3. Connect more channels — Add Telegram, Discord alongside WhatsApp
  4. Set up monitoring — Check logs periodically

You now have a personal AI assistant running 24/7 in the cloud. For free. Welcome to the future. 🦞