ใช้ OpenClaw บน GCP ( Goggle Cloud Platform ) ได้ FREE!!! ( 3 เดือน ,300 USD )

ใช้ OpenClaw บน GCP ( Goggle Cloud Platform ) ได้ FREE!!! ( 3 เดือน , 300 USD ) 

https://cloud.google.com/

ถ้าสมัคร Google Account ใหม่ ก็จะได้ GCP ฟรี $300 ในระยะเวลา 3 เดือน

https://cloud.google.com/pricing

เมื่อสมัครได้ เรียบร้อย ก็จะได้ Credit และ Expire Date และ My First Project 


สร้าง VM Instances สำหรับใช้งาน OpenClaw กันได้เลย

Google Cloud => Compute Engine => VM instances

Create Instances

Set VM Name

Change Memory to 8GB or if you want more.



Change Disk 30 GB minimum  Then Create.



Create VM complete


Set SSH remote to GCP

Install gcloud CLI https://cloud.google.com/sdk/docs/install
Initialize and authenticate:
bash
gcloud initgcloud auth login

Then SSH to GCP : 

bash
gcloud compute ssh openclaw-gcp2 --zone=us-central1-b


Remote SSH ได้เรียบร้อย จะได้  User ubuntu @ YOUR_VM_NAME

การติดตั้ง OpenClaw บน GCP

Install Docker ( on the VM )

bash
sudo apt-get updatesudo apt-get install -y git curl ca-certificatescurl -fsSL https://get.docker.com | sudo shsudo usermod -aG docker $USER
Verify: docker work
bash
docker --versiondocker compose version

Clone the OpenClaw repository
bash
git clone https://github.com/openclaw/openclaw.gitcd openclaw
Create persistent host directories
Docker containers are ephemeral. All long-lived state must live on the host.
bash
mkdir -p ~/.openclawmkdir -p ~/.openclaw/workspace


Configure environment variables
Create .env in the repository root.
bash
OPENCLAW_IMAGE=openclaw:latestOPENCLAW_GATEWAY_TOKEN=OPENCLAW_GATEWAY_BIND=lanOPENCLAW_GATEWAY_PORT=18789 OPENCLAW_CONFIG_DIR=/home/$USER/.openclawOPENCLAW_WORKSPACE_DIR=/home/$USER/.openclaw/workspace GOG_KEYRING_PASSWORD=XDG_CONFIG_HOME=/home/node/.openclaw
Set OPENCLAW_GATEWAY_TOKEN 
when you want to manage the stable gateway token through .env; otherwise configure gateway.auth.token before relying on clients across restarts. 

If neither source exists, OpenClaw uses a runtime-only token for that startup. 
Generate a keyring password and paste it into GOG_KEYRING_PASSWORD:

Generate  OPENCLAW_GATEWAY_TOKEN
bash
openssl rand -hex 32
then copy YOUR_TOKEN to .env file.


Build and launch
bash
docker compose builddocker compose up -d openclaw-gateway

docker build ประมาณ 10กว่า นาที 

docker compose up -d แล้ว เช็คด้วย docker ps ว่า container run ตัวไหนบ้าง และ เรียบร้อยดีไหม

ติดคั้ง ในส่วนของ Docker เรียบร้อยแล้ว

สามารถ Run OpenClaw ด้วย openclaw onboard --install-daemon เพื่อ config ค่าต่างๆได้แล้ว




Access from your laptop

Create an SSH tunnel to forward the Gateway port:
bash
gcloud compute ssh openclaw-gateway --zone=us-central1-a -- -L 18789:127.0.0.1:18789

Open in your browser:    http://127.0.0.1:18789/

OpenClaw work fine on GCP.



OpenClaw Version Update
To update OpenClaw on the VM:
bash
git pulldocker compose builddocker compose up -d

Reference



Adun Nantakaew อดุลย์ นันทะแก้ว

LINE : adunnan


ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

ทดลอง ติดตั้งใช้งาน OpenClaw บน Local PC/Notebook ด้วย Ubuntu

Eval Llama v3.1 8B ,70B Model with Thai Language

LLAMA-CPP-PYTHON on RTX4060 GPU