{"id":40636,"date":"2026-03-28T13:36:24","date_gmt":"2026-03-28T06:36:24","guid":{"rendered":"https:\/\/interdata.vn\/blog\/?p=40636"},"modified":"2026-04-07T14:32:16","modified_gmt":"2026-04-07T07:32:16","slug":"cai-dat-openclaw-tren-vps-ubuntu","status":"publish","type":"post","link":"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn C\u00e0i \u0110\u1eb7t OpenClaw b\u1eb1ng npm"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-white ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed8I DUNG<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Cau-hinh-toi-thieu-de-chay-OpenClaw-muot\" >C\u1ea5u h\u00ecnh t\u1ed1i thi\u1ec3u \u0111\u1ec3 ch\u1ea1y OpenClaw m\u01b0\u1ee3t<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Ubuntu-2204-hay-2404-%E2%80%94-nen-dung-phien-ban-nao\" >Ubuntu 22.04 hay 24.04 \u2014 n\u00ean d\u00f9ng phi\u00ean b\u1ea3n n\u00e0o?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Chuan-bi-truoc-khi-cai-OpenClaw\" >Chu\u1ea9n b\u1ecb tr\u01b0\u1edbc khi c\u00e0i OpenClaw<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Tung-buoc-cai-dat-OpenClaw-tren-VPS-Ubuntu\" >T\u1eebng b\u01b0\u1edbc c\u00e0i \u0111\u1eb7t OpenClaw tr\u00ean VPS Ubuntu<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Buoc-1-%E2%80%94-Cai-Nodejs-22-hoac-24-tren-Ubuntu\" >B\u01b0\u1edbc 1 \u2014 C\u00e0i Node.js 22 ho\u1eb7c 24 tr\u00ean Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Buoc-2-%E2%80%94-Cai-OpenClaw-qua-npm\" >B\u01b0\u1edbc 2 \u2014 C\u00e0i OpenClaw qua npm<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Buoc-3-%E2%80%94-Chay-Onboard-Wizard-va-cai-Gateway-daemon\" >B\u01b0\u1edbc 3 \u2014 Ch\u1ea1y Onboard Wizard v\u00e0 c\u00e0i Gateway daemon<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Buoc-4-%E2%80%94-Truy-cap-Control-UI-va-kiem-tra-ket-noi\" >B\u01b0\u1edbc 4 \u2014 Truy c\u1eadp Control UI v\u00e0 ki\u1ec3m tra k\u1ebft n\u1ed1i<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Loi-thuong-gap-khi-cai-OpenClaw-va-cach-xu-ly\" >L\u1ed7i th\u01b0\u1eddng g\u1eb7p khi c\u00e0i OpenClaw v\u00e0 c\u00e1ch x\u1eed l\u00fd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Bao-mat-OpenClaw-Gateway-sau-khi-cai\" >B\u1ea3o m\u1eadt OpenClaw Gateway sau khi c\u00e0i<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Phuong-an-1-%E2%80%94-SSH-Tunnel-khong-cai-them-gi\" >Ph\u01b0\u01a1ng \u00e1n 1 \u2014 SSH Tunnel (kh\u00f4ng c\u00e0i th\u00eam g\u00ec)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Phuong-an-2-%E2%80%94-Tailscale-Serve-khuyen-nghi\" >Ph\u01b0\u01a1ng \u00e1n 2 \u2014 Tailscale Serve (khuy\u1ebfn ngh\u1ecb)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Cau-hoi-thuong-gap-khi-cai-OpenClaw-tren-VPS-Ubuntu\" >C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p khi c\u00e0i OpenClaw tr\u00ean VPS Ubuntu<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#VPS-Windows-co-cai-duoc-OpenClaw-khong\" >VPS Windows c\u00f3 c\u00e0i \u0111\u01b0\u1ee3c OpenClaw kh\u00f4ng?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Cai-OpenClaw-co-can-kien-thuc-Linux-sau-khong\" >C\u00e0i OpenClaw c\u00f3 c\u1ea7n ki\u1ebfn th\u1ee9c Linux s\u00e2u kh\u00f4ng?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Sau-khi-cai-xong-muon-them-hoac-doi-API-Key-thi-lam-the-nao\" >Sau khi c\u00e0i xong, mu\u1ed1n th\u00eam ho\u1eb7c \u0111\u1ed5i API Key th\u00ec l\u00e0m th\u1ebf n\u00e0o?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#OpenClaw-co-cap-nhat-tu-dong-khong\" >OpenClaw c\u00f3 c\u1eadp nh\u1eadt t\u1ef1 \u0111\u1ed9ng kh\u00f4ng?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#OpenClaw-ho-tro-nhung-channel-nhan-tin-nao-ngoai-Telegram\" >OpenClaw h\u1ed7 tr\u1ee3 nh\u1eefng channel nh\u1eafn tin n\u00e0o ngo\u00e0i Telegram?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/interdata.vn\/blog\/cai-dat-openclaw-tren-vps-ubuntu\/#Ket-luan\" >K\u1ebft lu\u1eadn<\/a><\/li><\/ul><\/nav><\/div>\n<p><!-- OVERVIEW INFORMATION --><\/p>\n<div class=\"summary\">\n<p><strong>T\u00f3m t\u1eaft nhanh:<\/strong> C\u00e0i \u0111\u1eb7t OpenClaw tr\u00ean VPS Ubuntu l\u00e0 qu\u00e1 tr\u00ecnh c\u00e0i Node.js 22+, ch\u1ea1y <code>npm install -g openclaw@latest<\/code>, sau \u0111\u00f3 d\u00f9ng l\u1ec7nh <code>openclaw onboard --install-daemon<\/code> \u0111\u1ec3 \u0111i qua wizard c\u1ea5u h\u00ecnh \u2014 k\u1ebft n\u1ed1i AI provider, thi\u1ebft l\u1eadp channel (Telegram, Discord&#8230;), c\u00e0i Gateway daemon. To\u00e0n b\u1ed9 xong trong kho\u1ea3ng 15\u201320 ph\u00fat. VPS t\u1ed1i thi\u1ec3u 2 vCPU, 2GB RAM, Ubuntu 22.04 ho\u1eb7c 24.04. Gateway ch\u1ea1y \u1edf port 18789 \u2014 sau khi c\u00e0i xong, n\u00ean b\u1ea3o m\u1eadt b\u1eb1ng Tailscale thay v\u00ec \u0111\u1ec3 port public ra internet.<\/p>\n<ul>\n<li>Y\u00eau c\u1ea7u Node.js 24 (khuy\u1ebfn ngh\u1ecb) ho\u1eb7c t\u1ed1i thi\u1ec3u Node.js 22.16+ \u2014 kh\u00f4ng ph\u1ea3i Docker<\/li>\n<li>C\u00e0i OpenClaw b\u1eb1ng npm: <code>npm install -g openclaw@latest<\/code><\/li>\n<li>Ch\u1ea1y <code>openclaw onboard --install-daemon<\/code> \u0111\u1ec3 c\u1ea5u h\u00ecnh AI provider, channel v\u00e0 c\u00e0i systemd daemon<\/li>\n<li>Gateway m\u1eb7c \u0111\u1ecbnh ch\u1ea1y \u1edf <code>ws:\/\/127.0.0.1:18789<\/code> \u2014 Control UI truy c\u1eadp qua tr\u00ecnh duy\u1ec7t t\u1ea1i port n\u00e0y<\/li>\n<li>B\u1ea3o m\u1eadt Gateway b\u1eb1ng Tailscale Serve (tailnet-only) ho\u1eb7c SSH Tunnel \u2014 kh\u00f4ng \u0111\u1ec3 port 18789 public<\/li>\n<li>Update OpenClaw: ch\u1ea1y l\u1ea1i <code>npm install -g openclaw@latest<\/code> ho\u1eb7c <code>openclaw update --channel stable<\/code><\/li>\n<\/ul>\n<\/div>\n<p>B\u00e0i h\u01b0\u1edbng d\u1eabn d\u1ef1a tr\u00ean OpenClaw phi\u00ean b\u1ea3n m\u1edbi nh\u1ea5t theo README ch\u00ednh th\u1ee9c \u2014 c\u1eadp nh\u1eadt th\u00e1ng 3\/2026. OpenClaw \u0111ang ph\u00e1t tri\u1ec3n nhanh, quy tr\u00ecnh c\u00e0i \u0111\u1eb7t c\u00f3 th\u1ec3 thay \u0111\u1ed5i theo version. H\u00e3y ki\u1ec3m tra <a href=\"https:\/\/github.com\/openclaw\/openclaw\" target=\"_blank\" rel=\"nofollow noopener\">repository ch\u00ednh th\u1ee9c<\/a> n\u1ebfu b\u1ea1n \u0111\u1ecdc b\u00e0i n\u00e0y sau 3\u20136 th\u00e1ng.<\/p>\n<p>N\u1ebfu b\u1ea1n \u0111\u00e3 th\u1eed t\u00ecm file <code>install.sh<\/code> \u0111\u1ec3 ch\u1ea1y nh\u01b0 c\u00e1c b\u00e0i h\u01b0\u1edbng d\u1eabn kh\u00e1c ghi \u2014 file \u0111\u00f3 kh\u00f4ng t\u1ed3n t\u1ea1i. OpenClaw c\u00e0i qua npm, kh\u00f4ng ph\u1ea3i qua <a href=\"https:\/\/interdata.vn\/blog\/docker-la-gi\/\">Docker<\/a> hay bash script. \u0110\u00e2y l\u00e0 \u0111i\u1ec3m hay g\u00e2y nh\u1ea7m nh\u1ea5t, v\u00ec nhi\u1ec1u AI agent tool kh\u00e1c d\u00f9ng Docker l\u00e0m ph\u01b0\u01a1ng th\u1ee9c c\u00e0i ch\u00ednh. B\u00e0i n\u00e0y \u0111i \u0111\u00fang theo README: Node.js \u2192 npm \u2192 onboard wizard \u2192 b\u1ea3o m\u1eadt Gateway. \u0110\u1ee7 \u0111\u1ec3 v\u1eadn h\u00e0nh th\u1eadt, kh\u00f4ng ch\u1ec9 th\u1eed ch\u01a1i \u0111\u01b0\u1ee3c m\u1ed9t bu\u1ed5i.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cau-hinh-toi-thieu-de-chay-OpenClaw-muot\"><\/span>C\u1ea5u h\u00ecnh t\u1ed1i thi\u1ec3u \u0111\u1ec3 ch\u1ea1y OpenClaw m\u01b0\u1ee3t<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>T\u1ed1i thi\u1ec3u c\u1ea7n 2 <a href=\"https:\/\/interdata.vn\/blog\/vcpu-la-gi\/\">vCPU<\/a>, 2GB <a href=\"https:\/\/interdata.vn\/blog\/ram-server\/\">RAM<\/a> v\u00e0 20GB \u1ed5 NVMe SSD, ch\u1ea1y Ubuntu 22.04 ho\u1eb7c 24.04 LTS. \u0110\u00f3 l\u00e0 ng\u01b0\u1ee1ng \u0111\u1ec3 OpenClaw kh\u1edfi \u0111\u1ed9ng v\u00e0 x\u1eed l\u00fd request t\u1eeb 1\u20132 channel \u0111\u01a1n gi\u1ea3n \u2014 kh\u00f4ng ph\u1ea3i ng\u01b0\u1ee1ng tho\u1ea3i m\u00e1i cho production th\u1eadt.<\/p>\n<p>OpenClaw l\u00e0 Gateway \u0111i\u1ec1u ph\u1ed1i \u2014 b\u1ea3n th\u00e2n n\u00f3 kh\u00f4ng ch\u1ea1y AI model c\u1ee5c b\u1ed9, m\u00e0 g\u1ecdi ra API provider b\u00ean ngo\u00e0i (OpenAI, Anthropic&#8230;). RAM kh\u00f4ng b\u1ecb ng\u1ed1n b\u1edfi model inference nh\u01b0 c\u00e1c self-hosted LLM. 2GB RAM \u0111\u1ee7 ch\u1ea1y Gateway + Node.js runtime + m\u1ed9t v\u00e0i channel \u0111\u1ed3ng th\u1eddi. Tuy nhi\u00ean n\u1ebfu b\u1ea1n b\u1eadt nhi\u1ec1u channel c\u00f9ng l\u00fac (Telegram + Discord + WhatsApp) ho\u1eb7c c\u00f3 nhi\u1ec1u session song song, 4GB RAM s\u1ebd d\u1ec5 th\u1edf h\u01a1n \u0111\u00e1ng k\u1ec3.<\/p>\n<table>\n<thead>\n<tr>\n<th>C\u1ea5u h\u00ecnh RAM<\/th>\n<th>Use case ph\u00f9 h\u1ee3p<\/th>\n<th>Gi\u1edbi h\u1ea1n th\u1ef1c t\u1ebf<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>2 vCPU \/ 2GB RAM<\/strong><\/td>\n<td>C\u00e1 nh\u00e2n, 1\u20132 channel, d\u00f9ng kh\u00f4ng li\u00ean t\u1ee5c<\/td>\n<td>Tight n\u1ebfu ch\u1ea1y th\u00eam process kh\u00e1c tr\u00ean c\u00f9ng VPS<\/td>\n<\/tr>\n<tr>\n<td><strong>2 vCPU \/ 4GB RAM<\/strong><\/td>\n<td>3\u20135 channel, v\u00e0i user \u0111\u1ed3ng th\u1eddi, production nh\u1ecf<\/td>\n<td>Khuy\u1ebfn ngh\u1ecb t\u1ed1i thi\u1ec3u cho m\u00f4i tr\u01b0\u1eddng d\u00f9ng th\u1eadt<\/td>\n<\/tr>\n<tr>\n<td><strong>4 vCPU \/ 8GB RAM<\/strong><\/td>\n<td>Nhi\u1ec1u channel, team nh\u1ecf, b\u1eadt browser control v\u00e0 Canvas<\/td>\n<td>C\u1ea7n n\u1ebfu d\u00f9ng th\u00eam t\u00ednh n\u0103ng n\u1eb7ng nh\u01b0 screen record, browser CDP<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span class=\"ez-toc-section\" id=\"Ubuntu-2204-hay-2404-%E2%80%94-nen-dung-phien-ban-nao\"><\/span>Ubuntu 22.04 hay 24.04 \u2014 n\u00ean d\u00f9ng phi\u00ean b\u1ea3n n\u00e0o?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>C\u1ea3 hai \u0111\u1ec1u ch\u1ea1y \u0111\u01b0\u1ee3c. Ubuntu 22.04 LTS \u1ed5n \u0111\u1ecbnh h\u01a1n cho production \u2014 package Node.js t\u1eeb NodeSource t\u01b0\u01a1ng th\u00edch t\u1ed1t, \u00edt bi\u1ebfn s\u1ed1 h\u01a1n. Ubuntu 24.04 d\u00f9ng \u0111\u01b0\u1ee3c nh\u01b0ng c\u1ea7n ch\u00fa \u00fd: m\u1ed9t s\u1ed1 g\u00f3i h\u1ec7 th\u1ed1ng \u0111\u00e3 thay \u0111\u1ed5i t\u00ean ho\u1eb7c version, \u0111\u00f4i khi g\u00e2y conflict khi c\u00e0i Node.js n\u1ebfu kh\u00f4ng d\u00f9ng \u0111\u00fang script setup t\u1eeb NodeSource. N\u1ebfu \u0111\u00e2y l\u00e0 l\u1ea7n \u0111\u1ea7u tri\u1ec3n khai OpenClaw, ch\u1ecdn 22.04 \u0111\u1ec3 \u0111\u1ee1 debug.<\/p>\n<div class=\"note-box\"><strong>Kh\u00f4ng n\u00ean d\u00f9ng Ubuntu 20.04 tr\u1edf xu\u1ed1ng:<\/strong> V\u00ec Node.js 22+ kh\u00f4ng c\u00e0i clean tr\u00ean 20.04 b\u1eb1ng ph\u01b0\u01a1ng th\u1ee9c chu\u1ea9n \u2014 b\u1ea1n s\u1ebd m\u1ea5t th\u00eam 30\u201360 ph\u00fat workaround kh\u00f4ng \u0111\u00e1ng.<\/div>\n<div class=\"info-box\">\n<p>Ch\u01b0a c\u00f3 VPS? Xem <a style=\"font-weight: bold;\" href=\"https:\/\/interdata.vn\/thue-vps\/\" target=\"_blank\" rel=\"noopener\">c\u00e1c g\u00f3i VPS gi\u00e1 r\u1ebb t\u1ea1i InterData<\/a> \u2014 \u0111a d\u1ea1ng c\u1ea5u h\u00ecnh t\u1eeb th\u1ea5p \u0111\u1ebfn cao, m\u1ea1nh m\u1ebd, h\u1ed7 tr\u1ee3 \u0111\u1ea7y \u0111\u1ee7 c\u00e1c phi\u00ean b\u1ea3n Ubuntu 22.04\/24.04 v\u00e0 k\u00edch ho\u1ea1t t\u1ef1 \u0111\u1ed9ng sau khi thanh to\u00e1n. Ngo\u00e0i ra, InterData c\u00f2n h\u1ed7 tr\u1ee3 c\u00e0i \u0111\u1eb7t OpenClaw l\u00ean VPS mi\u1ec5n ph\u00ed, n\u1ebfu b\u1ea1n c\u00f3 nhu c\u1ea7u.<\/p>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"Chuan-bi-truoc-khi-cai-OpenClaw\"><\/span>Chu\u1ea9n b\u1ecb tr\u01b0\u1edbc khi c\u00e0i OpenClaw<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>B\u1ed1n \u0111i\u1ec1u ki\u1ec7n c\u1ea7n x\u00e1c nh\u1eadn tr\u01b0\u1edbc khi b\u1eaft \u0111\u1ea7u:<\/p>\n<ul>\n<li><a href=\"https:\/\/interdata.vn\/blog\/vps-la-gi\/\">VPS<\/a> \u0111ang ch\u1ea1y Ubuntu 22.04 ho\u1eb7c 24.04, SSH v\u00e0o \u0111\u01b0\u1ee3c b\u1eb1ng user c\u00f3 quy\u1ec1n <code>sudo<\/code><\/li>\n<li>K\u1ebft n\u1ed1i internet \u1ed5n \u0111\u1ecbnh \u2014 npm c\u1ea7n t\u1ea3i package, t\u1ed5ng kho\u1ea3ng 100\u2013300MB<\/li>\n<li>\u0110\u00e3 c\u00f3 API Key t\u1eeb \u00edt nh\u1ea5t 1 AI provider: OpenAI (<code>sk-...<\/code>) ho\u1eb7c Anthropic (<code>sk-ant-...<\/code>)<\/li>\n<li>N\u1ebfu mu\u1ed1n k\u1ebft n\u1ed1i Telegram: \u0111\u00e3 t\u1ea1o bot qua @BotFather v\u00e0 c\u00f3 <code>botToken<\/code><\/li>\n<\/ul>\n<p>Sau khi SSH v\u00e0o, update h\u1ec7 th\u1ed1ng tr\u01b0\u1edbc:<\/p>\n<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<p>Kh\u00f4ng b\u1ecf b\u01b0\u1edbc n\u00e0y. M\u1ed9t s\u1ed1 package h\u1ec7 th\u1ed1ng c\u0169 c\u00f3 th\u1ec3 conflict v\u1edbi Node.js 22+ khi c\u00e0i \u2014 update tr\u01b0\u1edbc s\u1ebd tr\u00e1nh \u0111\u01b0\u1ee3c ph\u1ea7n l\u1edbn l\u1ed7i ki\u1ec3u n\u00e0y. M\u1ea5t 2\u20135 ph\u00fat, \u0111\u00e1ng h\u01a1n l\u00e0 debug sau.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tung-buoc-cai-dat-OpenClaw-tren-VPS-Ubuntu\"><\/span>T\u1eebng b\u01b0\u1edbc c\u00e0i \u0111\u1eb7t OpenClaw tr\u00ean VPS Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To\u00e0n b\u1ed9 quy tr\u00ecnh g\u1ed3m 4 b\u01b0\u1edbc. M\u1ed7i b\u01b0\u1edbc c\u00f3 l\u1ec7nh c\u1ee5 th\u1ec3 v\u00e0 output k\u1ef3 v\u1ecdng \u0111\u1ec3 t\u1ef1 x\u00e1c nh\u1eadn \u0111\u00fang\/sai ngay t\u1ea1i ch\u1ed7.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Buoc-1-%E2%80%94-Cai-Nodejs-22-hoac-24-tren-Ubuntu\"><\/span>B\u01b0\u1edbc 1 \u2014 C\u00e0i Node.js 22 ho\u1eb7c 24 tr\u00ean Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>OpenClaw y\u00eau c\u1ea7u Node.js 24 (khuy\u1ebfn ngh\u1ecb) ho\u1eb7c t\u1ed1i thi\u1ec3u Node.js 22.16+. Phi\u00ean b\u1ea3n Node c\u00f3 s\u1eb5n trong apt c\u1ee7a Ubuntu th\u01b0\u1eddng qu\u00e1 c\u0169 \u2014 ph\u1ea3i d\u00f9ng script setup t\u1eeb NodeSource:<\/p>\n<pre><code># Node.js 22 LTS (\u1ed5n \u0111\u1ecbnh h\u01a1n cho production)\r\ncurl -fsSL https:\/\/deb.nodesource.com\/setup_22.x | sudo bash -\r\nsudo apt install -y nodejs<\/code><\/pre>\n<p>Ho\u1eb7c Node.js 24 n\u1ebfu mu\u1ed1n d\u00f9ng version m\u1edbi nh\u1ea5t theo khuy\u1ebfn ngh\u1ecb c\u1ee7a OpenClaw:<\/p>\n<pre><code>curl -fsSL https:\/\/deb.nodesource.com\/setup_24.x | sudo bash -\r\nsudo apt install -y nodejs<\/code><\/pre>\n<p>Ki\u1ec3m tra sau khi c\u00e0i:<\/p>\n<pre><code>node --version\r\nnpm --version<\/code><\/pre>\n<div class=\"info-box\"><strong>Output k\u1ef3 v\u1ecdng:<\/strong> <code>v22.x.x<\/code> (ho\u1eb7c <code>v24.x.x<\/code>) v\u00e0 npm <code>10.x.x<\/code> tr\u1edf l\u00ean. N\u1ebfu v\u1eabn th\u1ea5y version c\u0169 nh\u01b0 <code>v12<\/code> hay <code>v16<\/code> \u2014 ngh\u0129a l\u00e0 apt \u0111ang d\u00f9ng source c\u0169, ch\u01b0a nh\u1eadn script NodeSource. Logout\/login l\u1ea1i terminal r\u1ed3i ki\u1ec3m tra l\u1ea1i.<\/div>\n<figure id=\"attachment_40644\" aria-describedby=\"caption-attachment-40644\" style=\"width: 441px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40644\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Cai-node.js-24-tren-Ubuntu.png\" alt=\"C\u00e0i node.js 24 tr\u00ean Ubuntu\" width=\"441\" height=\"115\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Cai-node.js-24-tren-Ubuntu.png 441w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Cai-node.js-24-tren-Ubuntu-300x78.png 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><figcaption id=\"caption-attachment-40644\" class=\"wp-caption-text\">C\u00e0i node.js 24 tr\u00ean Ubuntu<\/figcaption><\/figure>\n<h3><span class=\"ez-toc-section\" id=\"Buoc-2-%E2%80%94-Cai-OpenClaw-qua-npm\"><\/span>B\u01b0\u1edbc 2 \u2014 C\u00e0i OpenClaw qua npm<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0110\u00e2y l\u00e0 l\u1ec7nh c\u00e0i ch\u00ednh th\u1ee9c theo README:<\/p>\n<pre><code>npm install -g openclaw@latest<\/code><\/pre>\n<p>npm s\u1ebd t\u1ea3i OpenClaw v\u00e0 to\u00e0n b\u1ed9 dependencies. Qu\u00e1 tr\u00ecnh m\u1ea5t 1\u20133 ph\u00fat t\u00f9y <a href=\"https:\/\/interdata.vn\/blog\/network-speed-la-gi\/\">t\u1ed1c \u0111\u1ed9 m\u1ea1ng<\/a>. Sau khi xong, x\u00e1c nh\u1eadn:<\/p>\n<pre><code>openclaw --version<\/code><\/pre>\n<figure id=\"attachment_40645\" aria-describedby=\"caption-attachment-40645\" style=\"width: 972px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40645\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Cai-dat-OpenClaw-qua-npm.png\" alt=\"C\u00e0i \u0111\u1eb7t OpenClaw qua npm\" width=\"972\" height=\"319\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Cai-dat-OpenClaw-qua-npm.png 972w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Cai-dat-OpenClaw-qua-npm-300x98.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Cai-dat-OpenClaw-qua-npm-768x252.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><figcaption id=\"caption-attachment-40645\" class=\"wp-caption-text\">C\u00e0i \u0111\u1eb7t OpenClaw qua npm<\/figcaption><\/figure>\n<p>N\u1ebfu terminal b\u00e1o <em>command not found<\/em>, c\u00f3 th\u1ec3 npm global bin ch\u01b0a n\u1eb1m trong PATH. Th\u00eam b\u1eb1ng l\u1ec7nh:<\/p>\n<pre><code>export PATH=\"$(npm bin -g):$PATH\"\r\necho 'export PATH=\"$(npm bin -g):$PATH\"' &gt;&gt; ~\/.bashrc\r\nsource ~\/.bashrc<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Buoc-3-%E2%80%94-Chay-Onboard-Wizard-va-cai-Gateway-daemon\"><\/span>B\u01b0\u1edbc 3 \u2014 Ch\u1ea1y Onboard Wizard v\u00e0 c\u00e0i Gateway daemon<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u0110\u00e2y l\u00e0 b\u01b0\u1edbc c\u1ed1t l\u00f5i \u2014 <code>openclaw onboard<\/code> s\u1ebd d\u1eabn qua to\u00e0n b\u1ed9 c\u1ea5u h\u00ecnh v\u00e0 c\u00e0i Gateway daemon (systemd service) \u0111\u1ec3 Gateway t\u1ef1 kh\u1edfi \u0111\u1ed9ng khi VPS reboot:<\/p>\n<pre><code>openclaw onboard --install-daemon<\/code><\/pre>\n<p>Wizard s\u1ebd h\u1ecfi tu\u1ea7n t\u1ef1:<\/p>\n<ul>\n<li><strong>AI model v\u00e0 provider<\/strong> \u2014 ch\u1ecdn provider (OpenAI, Anthropic&#8230;) v\u00e0 nh\u1eadp API Key t\u01b0\u01a1ng \u1ee9ng<\/li>\n<li><strong>Channel mu\u1ed1n k\u1ebft n\u1ed1i<\/strong> \u2014 Telegram, Discord, WhatsApp, Slack&#8230; C\u00f3 th\u1ec3 c\u1ea5u h\u00ecnh nhi\u1ec1u channel c\u00f9ng l\u00fac ho\u1eb7c th\u00eam sau<\/li>\n<li><strong>Telegram Bot Token<\/strong> (n\u1ebfu ch\u1ecdn Telegram) \u2014 l\u1ea5y t\u1eeb @BotFather, format <code>123456:ABCDEF...<\/code><\/li>\n<li><strong>C\u00e0i daemon<\/strong> \u2014 wizard t\u1ef1 c\u00e0i systemd user service, Gateway s\u1ebd ch\u1ea1y n\u1ec1n v\u00e0 t\u1ef1 restart n\u1ebfu crash<\/li>\n<\/ul>\n<p>Sau khi wizard ho\u00e0n t\u1ea5t, \u0111\u1ee3i 2-3 ph\u00fat v\u00e0 ki\u1ec3m tra tr\u1ea1ng th\u00e1i \u0111\u1ec3 x\u00e1c nh\u1eadn daemon \u0111ang active:<\/p>\n<pre><code>systemctl --user status openclaw<\/code><\/pre>\n<figure id=\"attachment_40646\" aria-describedby=\"caption-attachment-40646\" style=\"width: 913px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40646\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Kiem-tra-trang-thai-dich-cua-OpenClaw.png\" alt=\"Ki\u1ec3m tra tr\u1ea1ng th\u00e1i d\u1ecbch c\u1ee7a OpenClaw\" width=\"913\" height=\"569\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Kiem-tra-trang-thai-dich-cua-OpenClaw.png 913w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Kiem-tra-trang-thai-dich-cua-OpenClaw-300x187.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Kiem-tra-trang-thai-dich-cua-OpenClaw-768x479.png 768w\" sizes=\"auto, (max-width: 913px) 100vw, 913px\" \/><figcaption id=\"caption-attachment-40646\" class=\"wp-caption-text\">Ki\u1ec3m tra tr\u1ea1ng th\u00e1i d\u1ecbch c\u1ee7a OpenClaw<\/figcaption><\/figure>\n<p>Tr\u1ea1ng th\u00e1i ph\u1ea3i l\u00e0 <code>active (running)<\/code>. N\u1ebfu <code>inactive<\/code> ho\u1eb7c <code>failed<\/code>, xem log \u0111\u1ec3 bi\u1ebft l\u1ed7i c\u1ee5 th\u1ec3:<\/p>\n<pre><code>journalctl --user -u openclaw -n 50<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Buoc-4-%E2%80%94-Truy-cap-Control-UI-va-kiem-tra-ket-noi\"><\/span>B\u01b0\u1edbc 4 \u2014 Truy c\u1eadp Control UI v\u00e0 ki\u1ec3m tra k\u1ebft n\u1ed1i<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>OpenClaw Gateway ph\u1ee5c v\u1ee5 Control <a href=\"https:\/\/interdata.vn\/blog\/ui-la-gi\/\">UI<\/a> tr\u1ef1c ti\u1ebfp qua port 18789 \u2014 kh\u00f4ng c\u1ea7n c\u00e0i th\u00eam web server. M\u1eb7c \u0111\u1ecbnh Gateway bind v\u00e0o <code>127.0.0.1<\/code> (localhost), kh\u00f4ng expose ra internet. \u0110\u1ec3 truy c\u1eadp t\u1eeb m\u00e1y t\u00ednh c\u00e1 nh\u00e2n, d\u00f9ng SSH Tunnel:<\/p>\n<pre><code>ssh -L 18789:localhost:18789 user@[IP-VPS] -N<\/code><\/pre>\n<p>Ch\u1ea1y l\u1ec7nh n\u00e0y tr\u00ean m\u00e1y t\u00ednh c\u1ee7a b\u1ea1n (kh\u00f4ng ph\u1ea3i tr\u00ean VPS), r\u1ed3i m\u1edf tr\u00ecnh duy\u1ec7t v\u00e0o <code>http:\/\/localhost:18789<\/code>. Control UI hi\u1ec7n ra l\u00e0 Gateway \u0111ang ch\u1ea1y \u0111\u00fang.<\/p>\n<figure id=\"attachment_40647\" aria-describedby=\"caption-attachment-40647\" style=\"width: 1058px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-40647\" src=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Truy-cap-Control-UI.png\" alt=\"Truy c\u1eadp Control UI\" width=\"1058\" height=\"871\" title=\"\" srcset=\"https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Truy-cap-Control-UI.png 1058w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Truy-cap-Control-UI-300x247.png 300w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Truy-cap-Control-UI-1024x843.png 1024w, https:\/\/interdata.vn\/blog\/wp-content\/uploads\/2026\/03\/Truy-cap-Control-UI-768x632.png 768w\" sizes=\"auto, (max-width: 1058px) 100vw, 1058px\" \/><figcaption id=\"caption-attachment-40647\" class=\"wp-caption-text\">Truy c\u1eadp Control UI<\/figcaption><\/figure>\n<p>Ch\u1ea1y th\u00eam l\u1ec7nh n\u00e0y \u0111\u1ec3 ki\u1ec3m tra to\u00e0n b\u1ed9 c\u1ea5u h\u00ecnh:<\/p>\n<pre><code>openclaw doctor<\/code><\/pre>\n<p><code>openclaw doctor<\/code> ph\u00e1t hi\u1ec7n API Key sai, channel ch\u01b0a k\u1ebft n\u1ed1i, ho\u1eb7c DM policy r\u1ee7i ro. N\u00ean ch\u1ea1y sau m\u1ed7i l\u1ea7n thay \u0111\u1ed5i config.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Loi-thuong-gap-khi-cai-OpenClaw-va-cach-xu-ly\"><\/span>L\u1ed7i th\u01b0\u1eddng g\u1eb7p khi c\u00e0i OpenClaw v\u00e0 c\u00e1ch x\u1eed l\u00fd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Tri\u1ec7u ch\u1ee9ng<\/th>\n<th>Nguy\u00ean nh\u00e2n ph\u1ed5 bi\u1ebfn<\/th>\n<th>C\u00e1ch x\u1eed l\u00fd<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>command not found: openclaw<\/code> sau khi npm install<\/td>\n<td>npm global bin ch\u01b0a trong PATH<\/td>\n<td>Th\u00eam <code>export PATH=\"$(npm bin -g):$PATH\"<\/code> v\u00e0o <code>~\/.bashrc<\/code> r\u1ed3i <code>source ~\/.bashrc<\/code><\/td>\n<\/tr>\n<tr>\n<td>Node.js version qu\u00e1 c\u0169 (<code>v12<\/code>, <code>v16<\/code>)<\/td>\n<td>Ubuntu apt \u0111ang d\u00f9ng source c\u0169, ch\u01b0a nh\u1eadn NodeSource<\/td>\n<td>Ch\u1ea1y l\u1ea1i script NodeSource setup, sau \u0111\u00f3 <code>sudo apt install -y nodejs<\/code><\/td>\n<\/tr>\n<tr>\n<td>Gateway kh\u1edfi \u0111\u1ed9ng nh\u01b0ng Telegram bot kh\u00f4ng ph\u1ea3n h\u1ed3i<\/td>\n<td>Bot Token sai ho\u1eb7c ch\u01b0a start bot tr\u00ean Telegram<\/td>\n<td>Ch\u1ea1y <code>openclaw doctor<\/code> \u0111\u1ec3 ki\u1ec3m tra; v\u00e0o @BotFather x\u00e1c nh\u1eadn token c\u00f2n active<\/td>\n<\/tr>\n<tr>\n<td>systemd daemon \u1edf tr\u1ea1ng th\u00e1i <code>failed<\/code><\/td>\n<td>Config l\u1ed7i ho\u1eb7c API Key sai khi\u1ebfn Gateway crash khi kh\u1edfi \u0111\u1ed9ng<\/td>\n<td><code>journalctl --user -u openclaw -n 50<\/code> \u0111\u1ec3 \u0111\u1ecdc log l\u1ed7i c\u1ee5 th\u1ec3<\/td>\n<\/tr>\n<tr>\n<td>Control UI kh\u00f4ng t\u1ea3i \u0111\u01b0\u1ee3c \u1edf <code>localhost:18789<\/code><\/td>\n<td>SSH Tunnel ch\u01b0a ch\u1ea1y, ho\u1eb7c Gateway bind sai \u0111\u1ecba ch\u1ec9<\/td>\n<td>Ki\u1ec3m tra SSH Tunnel \u0111ang active; tr\u00ean VPS ch\u1ea1y <code>openclaw gateway --verbose<\/code> \u0111\u1ec3 xem Gateway \u0111ang bind \u1edf \u0111\u00e2u<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>V\u1edbi h\u1ea7u h\u1ebft l\u1ed7i kh\u1edfi \u0111\u1ed9ng, <code>journalctl --user -u openclaw -n 50<\/code> s\u1ebd ch\u1ec9 r\u00f5 d\u00f2ng l\u1ed7i th\u1eadt s\u1ef1 \u2014 \u0111\u1ecdc t\u1eeb d\u01b0\u1edbi l\u00ean, d\u00f2ng cu\u1ed1i tr\u01b0\u1edbc khi process exit l\u00e0 nguy\u00ean nh\u00e2n ch\u00ednh. Tham kh\u1ea3o th\u00eam b\u00e0i <a href=\"\/blog\/huong-dan-cau-hinh-iptables-cho-vps\/\" target=\"_blank\" rel=\"noopener\">c\u1ea5u h\u00ecnh t\u01b0\u1eddng l\u1eeda VPS<\/a> n\u1ebfu b\u1ea1n nghi ng\u1edd v\u1ea5n \u0111\u1ec1 n\u1eb1m \u1edf t\u1ea7ng network.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Bao-mat-OpenClaw-Gateway-sau-khi-cai\"><\/span>B\u1ea3o m\u1eadt OpenClaw Gateway sau khi c\u00e0i<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Gateway OpenClaw m\u1eb7c \u0111\u1ecbnh bind v\u00e0o <code>127.0.0.1<\/code> \u2014 ch\u1ec9 truy c\u1eadp \u0111\u01b0\u1ee3c t\u1eeb ch\u00ednh VPS \u0111\u00f3. \u0110\u00e2y l\u00e0 h\u00e0nh vi m\u1eb7c \u0111\u1ecbnh an to\u00e0n. V\u1ea5n \u0111\u1ec1 x\u1ea3y ra khi b\u1ea1n \u0111\u1ed5i bind sang <code>0.0.0.0<\/code> \u0111\u1ec3 truy c\u1eadp t\u1eeb xa m\u00e0 kh\u00f4ng c\u00f3 l\u1edbp b\u1ea3o v\u1ec7 n\u00e0o \u2014 l\u00fac \u0111\u00f3 Gateway v\u00e0 to\u00e0n b\u1ed9 API Key b\u00ean trong \u0111\u1ec1u public ra internet.<\/p>\n<p>C\u00f3 2 ph\u01b0\u01a1ng \u00e1n truy c\u1eadp t\u1eeb xa an to\u00e0n, kh\u00f4ng c\u1ea7n m\u1edf port th\u00eam:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Phuong-an-1-%E2%80%94-SSH-Tunnel-khong-cai-them-gi\"><\/span>Ph\u01b0\u01a1ng \u00e1n 1 \u2014 SSH Tunnel (kh\u00f4ng c\u00e0i th\u00eam g\u00ec)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Ch\u1ea1y l\u1ec7nh n\u00e0y tr\u00ean m\u00e1y t\u00ednh c\u00e1 nh\u00e2n m\u1ed7i khi c\u1ea7n truy c\u1eadp Control UI:<\/p>\n<pre><code>ssh -L 18789:localhost:18789 user@[IP-VPS] -N<\/code><\/pre>\n<p>M\u1edf tr\u00ecnh duy\u1ec7t v\u00e0o <code>http:\/\/localhost:18789<\/code>. Session SSH t\u1eaft l\u00e0 Control UI kh\u00f4ng c\u00f2n truy c\u1eadp \u0111\u01b0\u1ee3c t\u1eeb b\u00ean ngo\u00e0i. Ph\u00f9 h\u1ee3p n\u1ebfu ch\u1ec9 c\u1ea7n v\u00e0o Dashboard th\u1ec9nh tho\u1ea3ng \u0111\u1ec3 xem log ho\u1eb7c thay \u0111\u1ed5i c\u1ea5u h\u00ecnh.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Phuong-an-2-%E2%80%94-Tailscale-Serve-khuyen-nghi\"><\/span>Ph\u01b0\u01a1ng \u00e1n 2 \u2014 Tailscale Serve (khuy\u1ebfn ngh\u1ecb)<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>OpenClaw t\u00edch h\u1ee3p s\u1eb5n v\u1edbi Tailscale: c\u1ea5u h\u00ecnh <code>gateway.tailscale.mode: \"serve\"<\/code> \u0111\u1ec3 Gateway t\u1ef1 expose qua Tailscale HTTPS \u2014 ch\u1ec9 truy c\u1eadp \u0111\u01b0\u1ee3c t\u1eeb thi\u1ebft b\u1ecb trong c\u00f9ng tailnet, kh\u00f4ng c\u1ea7n m\u1edf port public.<\/p>\n<p>C\u00e0i Tailscale tr\u00ean VPS tr\u01b0\u1edbc:<\/p>\n<pre><code>curl -fsSL https:\/\/tailscale.com\/install.sh | sh\r\nsudo tailscale up<\/code><\/pre>\n<p>Sau \u0111\u00f3 th\u00eam c\u1ea5u h\u00ecnh v\u00e0o <code>~\/.openclaw\/openclaw.json<\/code>:<\/p>\n<pre><code>{\r\n  \"gateway\": {\r\n    \"tailscale\": {\r\n      \"mode\": \"serve\"\r\n    }\r\n  }\r\n}<\/code><\/pre>\n<p>Restart daemon \u0111\u1ec3 \u00e1p d\u1ee5ng:<\/p>\n<pre><code>systemctl --user restart openclaw<\/code><\/pre>\n<p>Gateway s\u1ebd t\u1ef1 c\u1ea5u h\u00ecnh Tailscale Serve v\u00e0 b\u1ea1n truy c\u1eadp Control UI qua URL Tailscale HTTPS c\u1ee7a VPS \u2014 kh\u00f4ng c\u1ea7n gi\u1eef SSH session. Ti\u1ec7n h\u01a1n h\u1eb3n so v\u1edbi SSH Tunnel n\u1ebfu b\u1ea1n d\u00f9ng OpenClaw h\u00e0ng ng\u00e0y ho\u1eb7c t\u1eeb nhi\u1ec1u thi\u1ebft b\u1ecb kh\u00e1c nhau.<\/p>\n<p>\u0110\u1ecdc th\u00eam v\u1ec1 c\u00e1c l\u1edbp b\u1ea3o m\u1eadt n\u00ean c\u00f3 tr\u00ean VPS t\u1ea1i b\u00e0i <a href=\"\/blog\/bao-mat-vps-linux\/\" target=\"_blank\" rel=\"noopener\">b\u1ea3o m\u1eadt VPS Linux to\u00e0n di\u1ec7n<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cau-hoi-thuong-gap-khi-cai-OpenClaw-tren-VPS-Ubuntu\"><\/span>C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p khi c\u00e0i OpenClaw tr\u00ean VPS Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"VPS-Windows-co-cai-duoc-OpenClaw-khong\"><\/span>VPS Windows c\u00f3 c\u00e0i \u0111\u01b0\u1ee3c OpenClaw kh\u00f4ng?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Kh\u00f4ng tr\u1ef1c ti\u1ebfp \u2014 nh\u01b0ng theo README ch\u00ednh th\u1ee9c, Windows \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3 qua WSL2 (Windows Subsystem for Linux). Tr\u00ean VPS cloud, WSL2 th\u01b0\u1eddng kh\u00f4ng enable \u0111\u01b0\u1ee3c do kernel restrictions. C\u00e1ch \u0111\u01a1n gi\u1ea3n v\u00e0 \u1ed5n \u0111\u1ecbnh nh\u1ea5t v\u1eabn l\u00e0 d\u00f9ng VPS Ubuntu ri\u00eang \u2014 \u00edt bi\u1ebfn s\u1ed1 h\u01a1n nhi\u1ec1u.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Cai-OpenClaw-co-can-kien-thuc-Linux-sau-khong\"><\/span>C\u00e0i OpenClaw c\u00f3 c\u1ea7n ki\u1ebfn th\u1ee9c Linux s\u00e2u kh\u00f4ng?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Kh\u00f4ng c\u1ea7n s\u00e2u. Bi\u1ebft SSH v\u00e0o VPS, ch\u1ea1y l\u1ec7nh npm, v\u00e0 \u0111\u1ecdc output terminal l\u00e0 \u0111\u1ee7 cho to\u00e0n b\u1ed9 quy tr\u00ecnh. Onboarding wizard c\u1ee7a OpenClaw h\u1ecfi t\u1eebng th\u1ee9 m\u1ed9t \u2014 kh\u00f4ng c\u1ea7n t\u1ef1 vi\u1ebft config file t\u1eeb \u0111\u1ea7u. N\u1ebfu b\u1ea1n \u0111ang d\u00f9ng VPS InterData v\u00e0 g\u1eb7p kh\u00f3 \u1edf b\u01b0\u1edbc n\u00e0o, \u0111\u1ed9i h\u1ed7 tr\u1ee3 k\u1ef9 thu\u1eadt c\u00f3 th\u1ec3 h\u1ed7 tr\u1ee3 tr\u1ef1c ti\u1ebfp.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Sau-khi-cai-xong-muon-them-hoac-doi-API-Key-thi-lam-the-nao\"><\/span>Sau khi c\u00e0i xong, mu\u1ed1n th\u00eam ho\u1eb7c \u0111\u1ed5i API Key th\u00ec l\u00e0m th\u1ebf n\u00e0o?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Ch\u1ec9nh tr\u1ef1c ti\u1ebfp trong file <code>~\/.openclaw\/openclaw.json<\/code> \u2014 th\u00eam ho\u1eb7c s\u1eeda block <code>\"agent\"<\/code> v\u1edbi model v\u00e0 provider mu\u1ed1n d\u00f9ng. API Key n\u00ean \u0111\u1eb7t v\u00e0o bi\u1ebfn m\u00f4i tr\u01b0\u1eddng (<code>OPENAI_API_KEY<\/code> ho\u1eb7c <code>ANTHROPIC_API_KEY<\/code>) trong <code>~\/.bashrc<\/code> thay v\u00ec ghi th\u1eb3ng v\u00e0o config file. Sau khi s\u1eeda, restart daemon: <code>systemctl --user restart openclaw<\/code>, r\u1ed3i ch\u1ea1y <code>openclaw doctor<\/code> \u0111\u1ec3 x\u00e1c nh\u1eadn config m\u1edbi h\u1ee3p l\u1ec7.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"OpenClaw-co-cap-nhat-tu-dong-khong\"><\/span>OpenClaw c\u00f3 c\u1eadp nh\u1eadt t\u1ef1 \u0111\u1ed9ng kh\u00f4ng?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Kh\u00f4ng t\u1ef1 \u0111\u1ed9ng \u2014 nh\u01b0ng update r\u1ea5t \u0111\u01a1n gi\u1ea3n: ch\u1ea1y l\u1ea1i <code>npm install -g openclaw@latest<\/code> ho\u1eb7c d\u00f9ng l\u1ec7nh t\u00edch h\u1ee3p <code>openclaw update --channel stable<\/code>. OpenClaw c\u00f3 3 channel: <code>stable<\/code> (tagged release), <code>beta<\/code> (prerelease), v\u00e0 <code>dev<\/code> (HEAD c\u1ee7a main branch). Cho m\u00f4i tr\u01b0\u1eddng production, lu\u00f4n d\u00f9ng <code>stable<\/code>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"OpenClaw-ho-tro-nhung-channel-nhan-tin-nao-ngoai-Telegram\"><\/span>OpenClaw h\u1ed7 tr\u1ee3 nh\u1eefng channel nh\u1eafn tin n\u00e0o ngo\u00e0i Telegram?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Danh s\u00e1ch kh\u00e1 d\u00e0i: WhatsApp, Discord, Slack, Google Chat, Signal, iMessage (qua BlueBubbles), IRC, Microsoft Teams, Matrix, LINE, Mattermost, Zalo, WeChat, v\u00e0 WebChat t\u00edch h\u1ee3p s\u1eb5n trong Control UI. M\u1ed7i channel c\u00f3 h\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh ri\u00eang t\u1ea1i <a href=\"https:\/\/docs.openclaw.ai\/channels\" target=\"_blank\" rel=\"nofollow noopener\">docs.openclaw.ai\/channels<\/a>. Telegram v\u00e0 Discord l\u00e0 hai channel d\u1ec5 c\u1ea5u h\u00ecnh nh\u1ea5t cho ng\u01b0\u1eddi m\u1edbi.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Ket-luan\"><\/span>K\u1ebft lu\u1eadn<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Quy tr\u00ecnh c\u00e0i \u0111\u1eb7t OpenClaw tr\u00ean VPS Ubuntu th\u1ef1c ra g\u1ecdn h\u01a1n nhi\u1ec1u b\u00e0i m\u00f4 t\u1ea3: Node.js \u2192 npm install \u2192 onboard wizard \u2192 b\u1ea3o m\u1eadt Gateway. Kh\u00f4ng c\u00f3 Docker, kh\u00f4ng c\u00f3 bash script ph\u1ee9c t\u1ea1p. B\u01b0\u1edbc hay b\u1ecb b\u1ecf qua nh\u1ea5t l\u00e0 b\u1ea3o m\u1eadt \u2014 Gateway m\u1eb7c \u0111\u1ecbnh an to\u00e0n v\u00ec bind v\u00e0o localhost, nh\u01b0ng n\u1ebfu b\u1ea1n t\u1ef1 m\u1edf port ra internet \u0111\u1ec3 ti\u1ec7n truy c\u1eadp th\u00ec API Key AI provider \u0111i k\u00e8m. Tailscale Serve gi\u1ea3i quy\u1ebft g\u1ecdn v\u1ea5n \u0111\u1ec1 n\u00e0y m\u00e0 kh\u00f4ng c\u1ea7n m\u1edf terminal gi\u1eef SSH session m\u1ed7i ng\u00e0y.<\/p>\n<p>Sau khi Gateway \u0111ang ch\u1ea1y \u1ed5n \u0111\u1ecbnh, b\u01b0\u1edbc ti\u1ebfp theo l\u00e0 khai th\u00e1c c\u00e1c t\u00ednh n\u0103ng c\u1ee7a OpenClaw \u2014 t\u1eeb multi-channel routing, voice wake, \u0111\u1ebfn Canvas. \u0110\u1ecdc th\u00eam <a href=\"#\">t\u1ed5ng quan v\u1ec1 t\u00ednh n\u0103ng v\u00e0 use case c\u1ee7a OpenClaw<\/a> \u0111\u1ec3 bi\u1ebft n\u00ean c\u1ea5u h\u00ecnh th\u00eam g\u00ec cho ph\u00f9 h\u1ee3p v\u1edbi workflow c\u1ee7a b\u1ea1n.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>T\u00f3m t\u1eaft nhanh: C\u00e0i \u0111\u1eb7t OpenClaw tr\u00ean VPS Ubuntu l\u00e0 qu\u00e1 tr\u00ecnh c\u00e0i Node.js 22+, ch\u1ea1y npm install -g openclaw@latest, sau \u0111\u00f3 d\u00f9ng l\u1ec7nh openclaw onboard &#8211;install-daemon \u0111\u1ec3 \u0111i qua wizard c\u1ea5u h\u00ecnh \u2014 k\u1ebft n\u1ed1i AI provider, thi\u1ebft l\u1eadp channel (Telegram, Discord&#8230;), c\u00e0i Gateway daemon. To\u00e0n b\u1ed9 xong trong kho\u1ea3ng 15\u201320 ph\u00fat. VPS t\u1ed1i<\/p>\n","protected":false},"author":2,"featured_media":40648,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-40636","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps"],"_links":{"self":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/40636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/comments?post=40636"}],"version-history":[{"count":11,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/40636\/revisions"}],"predecessor-version":[{"id":40931,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/posts\/40636\/revisions\/40931"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media\/40648"}],"wp:attachment":[{"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/media?parent=40636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/categories?post=40636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/interdata.vn\/blog\/wp-json\/wp\/v2\/tags?post=40636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}