Tutorial penyebaran AWS

cloud terbesar dunia —— EC2 dan Lightsail bisa jalan

Penyebaran AWS OpenClaw, platform cloud terbesar di dunia

AWS tidak perlu diperkenalkan lagi, pangsa pasar global terbesar cloud. Node tersebar di seluruh dunia, dokumentasi lengkap, komunitas aktif, hampir semua masalah bisa ditemukan jawabannya.

Jalanin OpenClaw pakai dua produk: EC2 (cloud server klasik) dan Lightsail (lightweight server). Pemula rekomen Lightsail, veteran asal. Tutorial ini cover dua-duanya, ikutin aja.

EC2 vs Lightsail bagaimana pilih

Lightsail (rekomendasi newbie)
  • fix monthly fee, $3.5/bulan mulai, tidak takut bill explode
  • Built-in fixed IP dan traffic package
  • Console bisa langsung web SSH (namanya OrcaTerm), atau pake terminal lokal
  • Firewall config intuitif, nggak perlu pelajari VPC
  • Cocok buat personal sama small team
VS
EC2 (fleksibel tapi kompleks)
  • Config flexible kombinasi, auto scaling
  • Butuh config VPC, security group, Elastic IP sendiri
  • Fixed bandwidth atau per-traffic billing
  • Ecosystem rich, can integrate RDS, S3 full suite
  • Cocok buat enterprise level dan complex architecture

satu kata ringkas: personal pakai Lightsail, praktis murah; enterprise pakai EC2, flexible.

lima step selesai deploy

1

start instance

Login AWS Console → pilih EC2 atau Lightsail → pilih image sistem Amazon Linux 2023 Pastiin clear backup apa, berapa sering, retain berapa lama. Saranin: data directory setiap hari, config file langsung abis update, retain 30 hari terakhir. Ubuntu 22.04 → instance spec pilih t2.micro (Free Tier) atau t3.small (recommended).

2

Config security group

Open port: 22 (SSH), 80 (HTTP), 443 (HTTPS), 8080 (OpenClaw). Lightweight server di firewall page, ECS di security group.

3

Koneksi SSH

download key file (.pem), terminal execute ssh -i key.pem ec2-user@IP_kamu。Windows pakai PuTTY atau MobaXterm.

4

Install Container Station

Amazon Linux menggunakan yum untuk memasang, Ubuntu menggunakan apt, satu perintah selesai.

5

Deploy OpenClaw

tulis docker-compose.yml, satu klik pull service, browser akses confirm.

Install Docker (ARM architecture)

Setelah SSH terhubung server, jalankan perintah ini:

Instalasi Docker Amazon Linux 2023
# Perbarui sistem

Kalo lo choose Ubuntu image, pakai ini:

Instalasi Docker Ubuntu
sudo apt update && sudo apt upgrade -y
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
newgrp docker

konfigurasi docker-compose

docker-compose.yml (versi AWS)
version: "3.8"

services:
  openclaw:
    image: openclaw/openclaw:latest
    container_name: openclaw
    restart: unless-stopped
    ports:
      - "8080:3000"
    volumes:
      - ./data:/app/data
      - ./config:/app/config
      - ./logs:/app/logs
    environment:
      - NODE_ENV=production
      - TZ=UTC
    deploy:
      resources:
        limits:
          memory: 3G
        reservations:
          memory: 512M
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"

start service

Pull image
# Buat direktori proyek

Panduan menyelamatkan AWS Free Tier

💡 Pengguna baru AWS mendapatkan paket bebas 12 bulan: instance t2.micro (1 core 1G) 750 jam gratis per bulan, artinya buka satu server selama sebulan penuh tidak perlu uang. Meskipun 1G memori agak ketat, tapi menjalankan OpenClaw ringan tidak masalah, gunakan untuk mencoba terlebih dahulu.

Perhatian penting Free Tier:

  • hanya t2.micro free, jangan salah pilih t3.medium semacam itu
  • Off-site storage
  • Kredit gratis EBS storage adalah 30GB, jangan buka disk terlalu besar
  • Akan dikenakan biaya normal setelah 12 bulan berakhir, ingat untuk bermigrasi atau menutupnya terlebih dahulu

Security group / Firewall config

Inbound rule yang perlu buka
# Type        Port Range   Source        Description
⚠️ Production recommend Nginx reverse proxy, hide 8080 behind 80/443, after debug delete 8080 inbound rule.
Tidak mengerti tagihan AWS? Takut melebihi anggaran? Paket kelola MOLILI pembayaran sesuai penggunaan, tidak perlu mengurus server, tidak perlu hitung jam EC2, tenang dan hemat. pelajari MOLILI →
Artikel tutorial ini berguna buat kamu?