Installation Guide

Run OpenClaw on AWS

Run OpenClaw on Amazon Web Services (AWS) using Lightsail for quick setup or EC2 for full control. Deploy your AI agent in the cloud and access it from anywhere with 24/7 uptime.

12 min read
Mar 28, 2026
Ampere Team

Running OpenClaw on AWS is one of the easiest ways to deploy your AI agent with better performance, 24/7 uptime, and remote access.

In this guide, you'll learn how to run OpenClaw on AWS using Lightsail for quick setup and EC2 for more advanced control.

Minimum PC Requirements

ComponentMinimumRecommended
CPUDual CoreQuad Core
RAM4 GB8 GB
Storage5 GB Free10 GB Free
OSWindows 10 / Linux / macOSWindows 11 / Latest OS

Recommended AWS Instance

TypeRAMUse Case
t3.small2GBTesting
t3.medium4GBRecommended
t3.large8GBBetter Performance
g4dn.xlargeGPUAdvanced AI Tasks

How to Run OpenClaw on AWS

Which method should I choose?

  • Pick Lightsail if you want the fastest setup with Amazon Bedrock already configured
  • Pick EC2 if you want to use your own AI provider (Anthropic, OpenAI, etc.) or need more control

Method 1: Amazon Lightsail

Amazon Lightsail has an official OpenClaw blueprint — it installs everything automatically and connects Amazon Bedrock as your AI provider out of the box.

Step 1: Open the Lightsail Console

Sign in to AWS and go to:

https://lightsail.aws.amazon.com

Click Create instance.

Step 2: Choose the OpenClaw Blueprint

  • Select your AWS Region (choose one close to you)
  • Under Select a platform, choose Linux/Unix
  • Under Select a blueprint, scroll to Apps + OS and click OpenClaw

Step 3: Choose the 4 GB Plan

  • Scroll down to Choose your instance plan
  • Then, Select the 4 GB RAM plan (recommended for OpenClaw to run smoothly)
  • Give your instance a name — for example, openclaw-lightsail
  • Click Create instance
  • Wait 2–3 minutes for the instance to show Running status

Step 4: Connect via SSH

In your Lightsail instance, go to the Getting started tab and click Connect using SSH.

A browser terminal opens. You will see the OpenClaw dashboard URL and access token printed in the welcome message. Copy both.

Lightsail SSH terminal showing OpenClaw dashboard URL and access token

Step 5: Open the Dashboard and Pair Your Browser

  • Open the dashboard URL in a new browser tab
  • Paste your access token into the Gateway Token field
  • Go back to the SSH terminal
  • Press y to continue
  • Press a to approve device pairing

The dashboard will show OK — your browser is now connected to OpenClaw.

Step 6: Enable Amazon Bedrock

Your instance uses Amazon Bedrock as the AI provider. To activate it:

  • In Lightsail, go to the Getting started tab
  • Copy the provided script
  • Open AWS CloudShell at https://console.aws.amazon.com/cloudshell
  • Paste and run the script

Once complete, go to Chat in the OpenClaw dashboard and start using your AI assistant. You can also connect messaging channels like Telegram or WhatsApp to chat with your agent from your phone.

Method 2: EC2 Manual Install (Full Control)

Use this method to choose your own AI provider (Anthropic, OpenAI, etc.) and have full control over your OpenClaw setup.

Step 1: Launch an EC2 Instance

  • Sign in to AWS Console → search EC2 → click EC2
  • Click Launch Instance
  • Fill in:
    • Name: openclaw-server
    • OS: Ubuntu Server 24.04 LTS (64-bit x86)
    • Instance type: t3.small (minimum) or t3.medium (recommended)
  • Under Key pair, click Create new key pair:
    • Name: openclaw-key
    • Format: .pem
    • Click Create — the file will download automatically

Step 2: Set Up the Security Group

In Network settings → click Edit:

  • Enable Allow SSH traffic from: My IP
  • Leave everything else disabled

Click Launch instance and wait 1–2 minutes for it to reach Running status.

Step 3: Connect via SSH

Open a terminal on your local machine. Fix key file permissions:

chmod 400 openclaw-key.pem

Connect to your EC2 instance (replace with your actual IP):

ssh -i "openclaw-key.pem" ubuntu@YOUR_EC2_PUBLIC_IP

You are now inside the server.

SSH connection to AWS EC2 Ubuntu instance

Step 4: Update the Server

sudo apt update && sudo apt upgrade -y

Step 5: Install Node.js 22

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt install -y nodejs node --version

Make sure the output shows v22.x.x before continuing.

Step 6: Install OpenClaw

curl -fsSL https://openclaw.ai/install.sh | bash

Follow the on-screen wizard:

  • Choose your AI provider (Anthropic, OpenAI, Gemini, etc.)
  • Enter your API key
  • Optionally connect a messaging channel — Discord, Telegram, WhatsApp, Slack, or others

Step 7: Start the Gateway

openclaw gateway start

Check it is running:

openclaw gateway status
OpenClaw installation and gateway status on AWS EC2

Step 8: Auto-Start on Reboot

Set up OpenClaw to restart automatically when the server reboots:

sudo nano /etc/systemd/system/openclaw.service

Paste the following:

[Unit] Description=OpenClaw Gateway After=network.target [Service] Type=simple User=ubuntu ExecStart=/usr/bin/openclaw gateway start Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target

Save (Ctrl+O, Enter, Ctrl+X), then run:

sudo systemctl daemon-reload sudo systemctl enable openclaw sudo systemctl start openclaw

Common Issues and Fix

IssueFix
Lightsail dashboard won't connectCopy token exactly from the SSH terminal — no extra spaces
Bedrock not working on LightsailRun the CloudShell script from the Getting started tab
SSH permission denied (EC2)chmod 400 openclaw-key.pem
EC2 connection timeoutCheck Security Group — SSH port 22 must allow your IP
openclaw: command not foundsource ~/.bashrc then retry
Node version too lownvm install 22 && nvm use 22
Gateway not startingopenclaw gateway start
Gateway erroropenclaw doctor
Agent stops after server rebootEnable systemd service — see Step 8

If you prefer to skip AWS setup entirely, you can deploy OpenClaw on Ampere.sh in 60 seconds with no server setup required.

Frequently Asked Questions

Can I run OpenClaw on AWS for free?
Yes, you can run OpenClaw using the AWS Free Tier, but performance may be limited. For better performance, it's recommended to use instances like t3.small or t3.medium.
Do I need a powerful PC to run OpenClaw on AWS?
No. Since OpenClaw runs on AWS, your local PC only needs a browser and internet connection.
Can I run OpenClaw 24/7 on AWS?
Yes. AWS allows OpenClaw to run continuously, even when your computer is turned off.
Can I access OpenClaw remotely?
Yes. You can access OpenClaw from anywhere using your AWS instance IP address.
Do I need Docker to run OpenClaw on AWS?
Yes, most OpenClaw setups use Docker for easier deployment and management.
Can I connect OpenClaw to WhatsApp or Telegram on AWS?
Yes. Once OpenClaw is running, you can connect messaging platforms like WhatsApp, Telegram, Discord, and more.
Can I upgrade AWS resources later?
Yes. AWS allows you to upgrade CPU, RAM, and storage anytime.
Can I stop the AWS instance when not using OpenClaw?
Yes. You can stop the instance anytime to reduce costs.
Is GPU required for OpenClaw on AWS?
No. GPU is optional. Most users can run OpenClaw without GPU.

Skip the AWS Setup?

Running OpenClaw on AWS requires configuring instances, networking, and security settings, which takes time. With Ampere.sh, deploy OpenClaw in 60 seconds.

Deploy on Ampere.sh →