{"id":131051,"date":"2026-10-19T16:46:56","date_gmt":"2026-10-19T09:46:56","guid":{"rendered":"https:\/\/tino.vn\/blog\/?p=131051"},"modified":"2026-10-19T16:47:07","modified_gmt":"2026-10-19T09:47:07","slug":"cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n\/","title":{"rendered":"C\u00e1ch c\u1ea5u h\u00ecnh Nginx Reverse Proxy v\u00e0 SSL cho n8n, OpenClaw tr\u00ean VPS\u00a0"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u0110\u1ec3 c\u1ea5u h\u00ecnh <a href=\"https:\/\/tino.vn\/blog\/docs\/huong-dan-cai-dat-mo-hinh-apache-nginx-reverse-proxy\/\" target=\"_blank\" data-type=\"ht_kb\" data-id=\"2300\" rel=\"noreferrer noopener\">Nginx Reverse Proxy<\/a> v\u00e0 <a href=\"https:\/\/tino.vn\/blog\/ssl-certificate-la-gi\/\" target=\"_blank\" data-type=\"post\" data-id=\"613\" rel=\"noreferrer noopener\">SSL<\/a> cho n8n ho\u1eb7c OpenClaw tr\u00ean VPS, b\u1ea1n c\u1ea7n tr\u1ecf t\u00ean mi\u1ec1n v\u1ec1 m\u00e1y ch\u1ee7, c\u00e0i \u0111\u1eb7t Nginx, thi\u1ebft l\u1eadp chuy\u1ec3n ti\u1ebfp \u0111\u1ebfn c\u1ed5ng \u1ee9ng d\u1ee5ng v\u00e0 k\u00edch ho\u1ea1t HTTPS b\u1eb1ng Let&#8217;s Encrypt. Sau khi ho\u00e0n t\u1ea5t, b\u1ea1n c\u00f3 th\u1ec3 truy c\u1eadp \u1ee9ng d\u1ee5ng qua t\u00ean mi\u1ec1n ri\u00eang m\u00e0 kh\u00f4ng c\u1ea7n nh\u1eadp \u0111\u1ecba ch\u1ec9 IP ho\u1eb7c c\u1ed5ng d\u1ecbch v\u1ee5. C\u00f9ng Tino t\u00ecm hi\u1ec3u c\u00e1ch th\u1ef1c hi\u1ec7n qua b\u00e0i vi\u1ebft d\u01b0\u1edbi \u0111\u00e2y nh\u00e9!<\/strong><\/p>\n\n\n\n<h2 id=\"Nginx_Reverse_Proxy_v\u00e0_SSL_l\u00e0_g\u00ec?\"><strong>Nginx Reverse Proxy v\u00e0 SSL l\u00e0 g\u00ec?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Nginx Reverse Proxy l\u00e0 m\u1ed9t m\u00e1y ch\u1ee7 trung gian ti\u1ebfp nh\u1eadn y\u00eau c\u1ea7u t\u1eeb ng\u01b0\u1eddi d\u00f9ng r\u1ed3i chuy\u1ec3n ti\u1ebfp \u0111\u1ebfn \u1ee9ng d\u1ee5ng \u0111ang ch\u1ea1y ph\u00eda sau, ch\u1eb3ng h\u1ea1n nh\u01b0 n8n ho\u1eb7c OpenClaw.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Th\u00f4ng th\u01b0\u1eddng, n8n s\u1eed d\u1ee5ng c\u1ed5ng 5678, trong khi OpenClaw Gateway s\u1eed d\u1ee5ng c\u1ed5ng 18789 theo c\u1ea5u h\u00ecnh m\u1eb7c \u0111\u1ecbnh.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5, thay v\u00ec truy c\u1eadp n8n b\u1eb1ng \u0111\u1ecba ch\u1ec9: <strong>http:\/\/IP-VPS:5678<\/strong>, b\u1ea1n c\u00f3 th\u1ec3 c\u1ea5u h\u00ecnh \u0111\u1ec3 truy c\u1eadp qua: <strong>https:\/\/example.com<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n-1.png\" alt=\"Nginx Reverse Proxy v\u00e0 SSL l\u00e0 g\u00ec?\" class=\"wp-image-131128\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n-1.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n-1-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>Nginx Reverse Proxy v\u00e0 SSL l\u00e0 g\u00ec?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Khi k\u1ebft h\u1ee3p Nginx Reverse Proxy v\u1edbi ch\u1ee9ng ch\u1ec9 SSL, h\u1ec7 th\u1ed1ng mang l\u1ea1i nh\u1eefng l\u1ee3i \u00edch ch\u00ednh:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Truy c\u1eadp thu\u1eadn ti\u1ec7n: <\/strong>S\u1eed d\u1ee5ng t\u00ean mi\u1ec1n thay cho \u0111\u1ecba ch\u1ec9 IP v\u00e0 c\u1ed5ng.<\/li>\n\n\n\n<li><strong>M\u00e3 h\u00f3a k\u1ebft n\u1ed1i: <\/strong>HTTPS b\u1ea3o v\u1ec7 d\u1eef li\u1ec7u truy\u1ec1n gi\u1eefa tr\u00ecnh duy\u1ec7t v\u00e0 Nginx.<\/li>\n\n\n\n<li><strong>Qu\u1ea3n l\u00fd t\u1eadp trung:<\/strong> Nginx c\u00f3 th\u1ec3 x\u1eed l\u00fd nhi\u1ec1u t\u00ean mi\u1ec1n v\u00e0 \u1ee9ng d\u1ee5ng kh\u00e1c nhau.<\/li>\n\n\n\n<li><strong>H\u1ea1n ch\u1ebf ph\u01a1i b\u00e0y c\u1ed5ng \u1ee9ng d\u1ee5ng:<\/strong> Ch\u1ec9 c\u00f4ng khai nh\u1eefng c\u1ed5ng th\u1eadt s\u1ef1 c\u1ea7n thi\u1ebft.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">L\u01b0u \u00fd r\u1eb1ng SSL b\u1ea3o v\u1ec7 \u0111\u01b0\u1eddng truy\u1ec1n, kh\u00f4ng thay th\u1ebf c\u00e1c c\u01a1 ch\u1ebf \u0111\u0103ng nh\u1eadp, ph\u00e2n quy\u1ec1n v\u00e0 b\u1ea3o m\u1eadt c\u1ee7a \u1ee9ng d\u1ee5ng.<\/p>\n\n\n\n<h2 id=\"H\u01b0\u1edbng_d\u1eabn_c\u1ea5u_h\u00ecnh_Nginx_Reverse_Proxy_v\u00e0_SSL_cho_n8n\"><strong>H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh Nginx Reverse Proxy v\u00e0 SSL cho n8n<\/strong><\/h2>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1._Ki\u1ec3m_tra_n8n_v\u00e0_tr\u1ecf_t\u00ean_mi\u1ec1n_v\u1ec1_VPS\"><strong>B\u01b0\u1edbc 1. Ki\u1ec3m tra n8n v\u00e0 tr\u1ecf t\u00ean mi\u1ec1n v\u1ec1 VPS<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ea7u ti\u00ean, \u0111\u0103ng nh\u1eadp VPS n8n b\u1eb1ng SSH th\u00f4ng qua Xshell ho\u1eb7c \u1ee9ng d\u1ee5ng Terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ki\u1ec3m tra container n8n:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker ps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu n8n \u0111ang ho\u1ea1t \u0111\u1ed9ng, danh s\u00e1ch container s\u1ebd hi\u1ec3n th\u1ecb \u1ee9ng d\u1ee5ng c\u00f9ng th\u00f4ng tin c\u1ed5ng t\u01b0\u01a1ng \u1ee9ng.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ti\u1ebfp t\u1ee5c ki\u1ec3m tra kh\u1ea3 n\u0103ng truy c\u1eadp n8n t\u1eeb VPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -I http:\/\/127.0.0.1:5678<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"256\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_1-12-1024x256.png\" alt=\"Ki\u1ec3m tra n8n v\u00e0 tr\u1ecf t\u00ean mi\u1ec1n v\u1ec1 VPS\" class=\"wp-image-131086\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_1-12-1024x256.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_1-12-300x75.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_1-12-768x192.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_1-12.png 1455w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Ki\u1ec3m tra n8n v\u00e0 tr\u1ecf t\u00ean mi\u1ec1n v\u1ec1 VPS<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu nh\u1eadn \u0111\u01b0\u1ee3c ph\u1ea3n h\u1ed3i HTTP, ch\u1eb3ng h\u1ea1n 200 OK ho\u1eb7c m\u00e3 chuy\u1ec3n h\u01b0\u1edbng h\u1ee3p l\u1ec7, \u1ee9ng d\u1ee5ng \u0111ang ph\u1ea3n h\u1ed3i y\u00eau c\u1ea7u.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu b\u00e1o kh\u00f4ng k\u1ebft n\u1ed1i \u0111\u01b0\u1ee3c, h\u00e3y ki\u1ec3m tra c\u1ea5u h\u00ecnh c\u1ed5ng Docker tr\u01b0\u1edbc khi ti\u1ebfp t\u1ee5c.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sau \u0111\u00f3, truy c\u1eadp trang qu\u1ea3n l\u00fd DNS c\u1ee7a t\u00ean mi\u1ec1n v\u00e0 t\u1ea1o b\u1ea3n ghi A:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Type<\/strong><\/td><td><strong>Name<\/strong><\/td><td><strong>Value<\/strong><\/td><\/tr><tr><td>A<\/td><td>example.com<\/td><td>IP c\u00f4ng khai c\u1ee7a VPS n8n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">L\u01b0u thay \u0111\u1ed5i v\u00e0 ki\u1ec3m tra DNS tr\u00ean VPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>getent ahostsv4 example.com<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"712\" height=\"123\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_2-11.png\" alt=\"Ki\u1ec3m tra n8n v\u00e0 tr\u1ecf t\u00ean mi\u1ec1n v\u1ec1 VPS\" class=\"wp-image-131087\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_2-11.png 712w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_2-11-300x52.png 300w\" sizes=\"(max-width: 712px) 100vw, 712px\" \/><figcaption class=\"wp-element-caption\"><strong>Ki\u1ec3m tra n8n v\u00e0 tr\u1ecf t\u00ean mi\u1ec1n v\u1ec1 VPS<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Khi k\u1ebft qu\u1ea3 tr\u1ea3 v\u1ec1 \u0111\u00fang IP c\u1ee7a VPS, b\u1ea1n c\u00f3 th\u1ec3 chuy\u1ec3n sang b\u01b0\u1edbc ti\u1ebfp theo.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2._C\u00e0i_\u0111\u1eb7t_Nginx_tr\u00ean_VPS\"><strong>B\u01b0\u1edbc 2. C\u00e0i \u0111\u1eb7t Nginx tr\u00ean VPS<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sau khi DNS tr\u1ecf ch\u00ednh x\u00e1c, ti\u1ebfn h\u00e0nh c\u00e0i \u0111\u1eb7t Nginx v\u00e0 tr\u00ecnh ch\u1ec9nh s\u1eeda nano:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\n\nsudo apt install -y nginx nano snapd<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Kh\u1edfi \u0111\u1ed9ng Nginx:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable --now nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ki\u1ec3m tra tr\u1ea1ng th\u00e1i:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl status nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu hi\u1ec3n th\u1ecb active (running), Nginx \u0111\u00e3 kh\u1edfi \u0111\u1ed9ng th\u00e0nh c\u00f4ng.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"372\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_3-8-1024x372.png\" alt=\"C\u00e0i \u0111\u1eb7t Nginx tr\u00ean VPS\" class=\"wp-image-131088\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_3-8-1024x372.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_3-8-300x109.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_3-8-766x278.png 766w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_3-8.png 1187w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t Nginx tr\u00ean VPS<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Ti\u1ebfp theo, b\u1ea3o \u0111\u1ea3m VPS cho ph\u00e9p k\u1ebft n\u1ed1i \u0111\u1ebfn c\u1ed5ng 80 v\u00e0 443. N\u1ebfu \u0111ang s\u1eed d\u1ee5ng UFW, th\u1ef1c hi\u1ec7n:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow 80\/tcp\n\nsudo ufw allow 443\/tcp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu ch\u01b0a c\u00f3 UFW, c\u00e0i \u0111\u1eb7t:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install ufw -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ed3ng th\u1eddi ki\u1ec3m tra quy t\u1eafc t\u01b0\u1eddng l\u1eeda c\u1ee7a nh\u00e0 cung c\u1ea5p VPS. N\u1ebfu d\u1ef1 \u0111\u1ecbnh k\u00edch ho\u1ea1t UFW, c\u1ea7n cho ph\u00e9p c\u1ed5ng SSH \u0111ang s\u1eed d\u1ee5ng tr\u01b0\u1edbc \u0111\u1ec3 tr\u00e1nh m\u1ea5t quy\u1ec1n truy c\u1eadp t\u1eeb xa.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow 22\/tcp<\/code><\/pre>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3._T\u1ea1o_c\u1ea5u_h\u00ecnh_Nginx_Reverse_Proxy\"><strong>B\u01b0\u1edbc 3. T\u1ea1o c\u1ea5u h\u00ecnh Nginx Reverse Proxy<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u1ede b\u01b0\u1edbc n\u00e0y, Nginx s\u1ebd \u0111\u01b0\u1ee3c c\u1ea5u h\u00ecnh \u0111\u1ec3 chuy\u1ec3n c\u00e1c y\u00eau c\u1ea7u \u0111\u1ebfn t\u00ean mi\u1ec1n sang c\u1ed5ng 5678 c\u1ee7a n8n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1ea1o t\u1ec7p c\u1ea5u h\u00ecnh:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/nginx\/sites-available\/n8n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">D\u00e1n n\u1ed9i dung sau:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nmap $http_upgrade $connection_upgrade {\ndefault upgrade;\n\"\" close;\n}\n\nserver {\nlisten 80;\nserver_name <strong>example.com<\/strong>;\n\nlocation \/ {\nproxy_pass http:\/\/127.0.0.1:5678;\nproxy_http_version 1.1;\n\nproxy_set_header Host $host;\nproxy_set_header X-Real-IP $remote_addr;\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\nproxy_set_header X-Forwarded-Host $host;\nproxy_set_header X-Forwarded-Proto $scheme;\n\nproxy_set_header Upgrade $http_upgrade;\nproxy_set_header Connection $connection_upgrade;\n\nproxy_read_timeout 300s;\n}\n}\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Thay <strong>example.com<\/strong> b\u1eb1ng t\u00ean mi\u1ec1n th\u1eadt c\u1ee7a b\u1ea1n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Trong c\u1ea5u h\u00ecnh tr\u00ean:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>server_name:<\/strong> T\u00ean mi\u1ec1n \u0111\u01b0\u1ee3c Nginx ti\u1ebfp nh\u1eadn.<\/li>\n\n\n\n<li><strong>proxy_pass: <\/strong>\u0110\u1ecba ch\u1ec9 n\u1ed9i b\u1ed9 v\u00e0 c\u1ed5ng \u1ee9ng d\u1ee5ng n8n.<\/li>\n\n\n\n<li><strong>X-Forwarded-*: <\/strong>C\u00e1c th\u00f4ng tin v\u1ec1 y\u00eau c\u1ea7u ban \u0111\u1ea7u \u0111\u01b0\u1ee3c chuy\u1ec3n ti\u1ebfp \u0111\u1ebfn \u1ee9ng d\u1ee5ng.<\/li>\n\n\n\n<li><strong>Upgrade v\u00e0 Connection: <\/strong>H\u1ed7 tr\u1ee3 c\u00e1c k\u1ebft n\u1ed1i WebSocket c\u1ea7n thi\u1ebft.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Nginx c\u00f3 h\u01b0\u1edbng d\u1eabn ch\u00ednh th\u1ee9c v\u1ec1 c\u01a1 ch\u1ebf chuy\u1ec3n ti\u1ebfp WebSocket th\u00f4ng qua Reverse Proxy.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"907\" height=\"536\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-14.png\" alt=\"T\u1ea1o c\u1ea5u h\u00ecnh Nginx Reverse Proxy\" class=\"wp-image-131091\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-14.png 907w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-14-300x177.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_5-14-767x453.png 767w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><figcaption class=\"wp-element-caption\"><strong>T\u1ea1o c\u1ea5u h\u00ecnh Nginx Reverse Proxy<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Sau khi d\u00e1n n\u1ed9i dung, nh\u1ea5n <strong>Ctrl + O<\/strong> \u2192 <strong>Enter<\/strong> \u0111\u1ec3 l\u01b0u, r\u1ed3i nh\u1ea5n <strong>Ctrl + X<\/strong> \u0111\u1ec3 tho\u00e1t nano.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">K\u00edch ho\u1ea1t c\u1ea5u h\u00ecnh:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ln -s \/etc\/nginx\/sites-available\/n8n \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Ki\u1ec3m tra c\u00fa ph\u00e1p:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nginx -t<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"720\" height=\"88\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6-12.png\" alt=\"T\u1ea1o c\u1ea5u h\u00ecnh Nginx Reverse Proxy\" class=\"wp-image-131092\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6-12.png 720w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_6-12-300x37.png 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\"><strong>T\u1ea1o c\u1ea5u h\u00ecnh Nginx Reverse Proxy<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu xu\u1ea5t hi\u1ec7n <strong>syntax is ok<\/strong> v\u00e0<strong> test is successful<\/strong>, t\u1ea3i l\u1ea1i Nginx:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl reload nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">L\u00fac n\u00e0y, t\u00ean mi\u1ec1n \u0111\u00e3 c\u00f3 th\u1ec3 chuy\u1ec3n ti\u1ebfp y\u00eau c\u1ea7u HTTP \u0111\u1ebfn n8n.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_4._C\u00e0i_\u0111\u1eb7t_SSL_mi\u1ec5n_ph\u00ed_b\u1eb1ng_Let&#8217;s_Encrypt\"><strong>B\u01b0\u1edbc 4. C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&#8217;s Encrypt<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ec3 k\u00edch ho\u1ea1t HTTPS, s\u1eed d\u1ee5ng Certbot \u0111\u1ec3 c\u1ea5p ch\u1ee9ng ch\u1ec9 Let&#8217;s Encrypt v\u00e0 c\u1ea5u h\u00ecnh SSL cho Nginx.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">C\u00e0i \u0111\u1eb7t Certbot b\u1eb1ng Snap:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo snap install --classic certbot<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1ea1o l\u1ec7nh Certbot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ln -s \/snap\/bin\/certbot \/usr\/local\/bin\/certbot<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu li\u00ean k\u1ebft \u0111\u00e3 t\u1ed3n t\u1ea1i v\u00e0 Certbot ho\u1ea1t \u0111\u1ed9ng, kh\u00f4ng c\u1ea7n t\u1ea1o l\u1ea1i.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ti\u1ebfp theo, y\u00eau c\u1ea7u c\u1ea5p ch\u1ee9ng ch\u1ec9:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo certbot --nginx -d example.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Thay t\u00ean mi\u1ec1n minh h\u1ecda b\u1eb1ng t\u00ean mi\u1ec1n \u0111\u00e3 c\u1ea5u h\u00ecnh.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"749\" height=\"164\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_7-11.png\" alt=\"C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&amp;apos;s Encrypt\" class=\"wp-image-131122\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_7-11.png 749w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_7-11-300x66.png 300w\" sizes=\"(max-width: 749px) 100vw, 749px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&#8217;s Encrypt<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Nh\u1eadp \u0111\u1ecba ch\u1ec9 Gmail ho\u1eb7c email \u0111ang s\u1eed d\u1ee5ng c\u1ee7a b\u1ea1n. Sau \u0111\u00f3 nh\u1ea5n <strong>Enter<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Certbot s\u1ebd y\u00eau c\u1ea7u ch\u1ea5p nh\u1eadn \u0111i\u1ec1u kho\u1ea3n s\u1eed d\u1ee5ng c\u1ee7a Let&#8217;s Encrypt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Th\u00f4ng th\u01b0\u1eddng s\u1ebd xu\u1ea5t hi\u1ec7n l\u1ef1a ch\u1ecdn: <strong>(Y)es\/(N)o<\/strong>. Nh\u1eadp <strong>Y<\/strong> r\u1ed3i nh\u1ea5n <strong>Enter<\/strong> \u0111\u1ec3 \u0111\u1ed3ng \u00fd.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu Certbot h\u1ecfi b\u1ea1n c\u00f3 mu\u1ed1n nh\u1eadn email t\u1eeb EFF hay kh\u00f4ng, c\u00f3 th\u1ec3 ch\u1ecdn <code>N<\/code> n\u1ebfu kh\u00f4ng mu\u1ed1n.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"848\" height=\"393\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_8-9.png\" alt=\"C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&amp;apos;s Encrypt\" class=\"wp-image-131121\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_8-9.png 848w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_8-9-300x139.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_8-9-768x356.png 768w\" sizes=\"(max-width: 848px) 100vw, 848px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&#8217;s Encrypt<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Ch\u1edd Certbot x\u00e1c th\u1ef1c t\u00ean mi\u1ec1n v\u00e0 c\u00e0i \u0111\u1eb7t ch\u1ee9ng ch\u1ec9 SSL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu th\u00e0nh c\u00f4ng, Certbot s\u1ebd hi\u1ec3n th\u1ecb th\u00f4ng b\u00e1o t\u01b0\u01a1ng t\u1ef1:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Successfully received certificate.\nSuccessfully deployed certificate.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Certbot c\u00f3 kh\u1ea3 n\u0103ng t\u1ef1 ch\u1ec9nh s\u1eeda c\u1ea5u h\u00ecnh Nginx \u0111\u1ec3 k\u00edch ho\u1ea1t HTTPS v\u00e0 h\u1ed7 tr\u1ee3 gia h\u1ea1n ch\u1ee9ng ch\u1ec9 t\u1ef1 \u0111\u1ed9ng.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sau khi c\u00e0i \u0111\u1eb7t, m\u1edf tr\u00ecnh duy\u1ec7t v\u00e0 truy c\u1eadp: <strong>https:\/\/example.com<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu ch\u1ee9ng ch\u1ec9 h\u1ee3p l\u1ec7 v\u00e0 \u1ee9ng d\u1ee5ng ph\u1ea3n h\u1ed3i, trang n8n s\u1ebd \u0111\u01b0\u1ee3c t\u1ea3i qua HTTPS.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"567\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10-9-1024x567.png\" alt=\"C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&amp;apos;s Encrypt\" class=\"wp-image-131125\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10-9-1024x567.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10-9-300x166.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10-9-768x425.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10-9-1536x850.png 1536w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_10-9.png 1727w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&#8217;s Encrypt<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Ki\u1ec3m tra c\u01a1 ch\u1ebf gia h\u1ea1n SSL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo certbot renew --dry-run<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00e2y l\u00e0 thao t\u00e1c ki\u1ec3m tra th\u1eed qu\u00e1 tr\u00ecnh gia h\u1ea1n, kh\u00f4ng y\u00eau c\u1ea7u c\u1ea5p m\u1edbi ch\u1ee9ng ch\u1ec9 \u0111ang s\u1eed d\u1ee5ng.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"845\" height=\"276\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_11-9.png\" alt=\"C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&amp;apos;s Encrypt\" class=\"wp-image-131124\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_11-9.png 845w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_11-9-300x98.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_11-9-768x251.png 768w\" sizes=\"(max-width: 845px) 100vw, 845px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e0i \u0111\u1eb7t SSL mi\u1ec5n ph\u00ed b\u1eb1ng Let&#8217;s Encrypt<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"B\u01b0\u1edbc_5._C\u1eadp_nh\u1eadt_c\u1ea5u_h\u00ecnh_n8n\"><strong>B\u01b0\u1edbc 5. C\u1eadp nh\u1eadt c\u1ea5u h\u00ecnh n8n<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sau khi k\u00edch ho\u1ea1t SSL, c\u1ea7n c\u1eadp nh\u1eadt \u0111\u1ecba ch\u1ec9 c\u00f4ng khai c\u1ee7a n8n \u0111\u1ec3 h\u1ec7 th\u1ed1ng t\u1ea1o li\u00ean k\u1ebft webhook v\u00e0 \u0111\u1ecba ch\u1ec9 tr\u00ecnh ch\u1ec9nh s\u1eeda ch\u00ednh x\u00e1c.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ed1i v\u1edbi n8n ch\u1ea1y b\u1eb1ng Docker Compose, m\u1edf t\u1ec7p compose.yaml ho\u1eb7c docker-compose.yml trong th\u01b0 m\u1ee5c tri\u1ec3n khai hi\u1ec7n t\u1ea1i.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">T\u00ecm t\u1ec7p Docker Compose:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo find \/opt \/root \/home -type f \\( -name \"compose.yaml\" -o -name \"docker-compose.yml\" -o -name \"compose.yml\" -o -name \"docker-compose.yaml\" \\) 2&gt;\/dev\/null<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5, k\u1ebft qu\u1ea3 c\u00f3 th\u1ec3 l\u00e0: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/n8n\/docker-compose.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu k\u1ebft qu\u1ea3 l\u00e0 <code>\/opt\/n8n\/docker-compose.yml<\/code>, nh\u1eadp:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/opt\/n8n\/docker-compose.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Trong ph\u1ea7n environment c\u1ee7a d\u1ecbch v\u1ee5 n8n, b\u1ed5 sung ho\u1eb7c \u0111i\u1ec1u ch\u1ec9nh c\u00e1c bi\u1ebfn:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>environment:\n\n&nbsp;&nbsp;- N8N_HOST=example.com\n\n&nbsp;&nbsp;- N8N_PORT=5678\n\n&nbsp;&nbsp;- N8N_PROTOCOL=https\n\n&nbsp;&nbsp;- N8N_EDITOR_BASE_URL=https:\/\/example.com\/\n\n&nbsp;&nbsp;- N8N_WEBHOOK_URL=https:\/\/example.com\/\n\n&nbsp;&nbsp;- N8N_PROXY_HOPS=1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00e2y ch\u1ec9 l\u00e0 \u0111o\u1ea1n c\u1ea5u h\u00ecnh c\u1ea7n b\u1ed5 sung, kh\u00f4ng ph\u1ea3i to\u00e0n b\u1ed9 t\u1ec7p Docker Compose. C\u1ea7n gi\u1eef nguy\u00ean c\u00e1c bi\u1ebfn m\u00f4i tr\u01b0\u1eddng, volume, database v\u00e0 th\u00f4ng tin c\u1ea5u h\u00ecnh \u0111ang s\u1eed d\u1ee5ng.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12-9-1024x536.png\" alt=\"C\u1eadp nh\u1eadt c\u1ea5u h\u00ecnh n8n\" class=\"wp-image-131123\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12-9-1024x536.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12-9-300x157.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12-9-768x402.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_12-9.png 1182w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u1eadp nh\u1eadt c\u1ea5u h\u00ecnh n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">L\u01b0u t\u1ec7p (<strong>Ctrl + O<\/strong> =&gt;<strong> Ctrl + X<\/strong>) r\u1ed3i ch\u1ea1y l\u1ec7nh sau trong \u0111\u00fang th\u01b0 m\u1ee5c Docker Compose hi\u1ec7n t\u1ea1i:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker compose up -d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Kh\u00f4ng x\u00f3a volume ho\u1eb7c t\u1ea1o l\u1ea1i d\u1ef1 \u00e1n Docker Compose t\u1eeb \u0111\u1ea7u, v\u00ec c\u00f3 th\u1ec3 \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn d\u1eef li\u1ec7u workflow v\u00e0 th\u00f4ng tin x\u00e1c th\u1ef1c \u0111\u00e3 l\u01b0u.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_6._Ki\u1ec3m_tra_k\u1ebft_qu\u1ea3_v\u00e0_b\u1ea3o_m\u1eadt_c\u1ed5ng_\u1ee9ng_d\u1ee5ng\"><strong>B\u01b0\u1edbc 6. Ki\u1ec3m tra k\u1ebft qu\u1ea3 v\u00e0 b\u1ea3o m\u1eadt c\u1ed5ng \u1ee9ng d\u1ee5ng<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M\u1edf tr\u00ecnh duy\u1ec7t v\u00e0 truy c\u1eadp t\u00ean mi\u1ec1n HTTPS \u0111\u00e3 c\u1ea5u h\u00ecnh.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu th\u00e0nh c\u00f4ng, b\u1ea1n c\u00f3 th\u1ec3:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Truy c\u1eadp giao di\u1ec7n n8n qua t\u00ean mi\u1ec1n ri\u00eang.<\/li>\n\n\n\n<li>\u0110\u0103ng nh\u1eadp v\u00e0 s\u1eed d\u1ee5ng workflow b\u00ecnh th\u01b0\u1eddng.<\/li>\n\n\n\n<li>S\u1eed d\u1ee5ng URL webhook HTTPS \u0111\u1ec3 k\u1ebft n\u1ed1i c\u00e1c d\u1ecbch v\u1ee5 b\u00ean ngo\u00e0i.<\/li>\n\n\n\n<li>Truy c\u1eadp \u1ee9ng d\u1ee5ng m\u00e0 kh\u00f4ng c\u1ea7n th\u00eam :5678 v\u00e0o t\u00ean mi\u1ec1n.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ec3 ki\u1ec3m tra th\u00eam t\u1eeb VPS, ch\u1ea1y:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nginx -t\n\nsudo systemctl status nginx\n\nsudo docker ps<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"409\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13-6-1024x409.png\" alt=\"Ki\u1ec3m tra k\u1ebft qu\u1ea3 v\u00e0 b\u1ea3o m\u1eadt c\u1ed5ng \u1ee9ng d\u1ee5ng\" class=\"wp-image-131126\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13-6-1024x409.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13-6-300x120.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13-6-768x307.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13-6-1536x613.png 1536w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/Screenshot_13-6.png 1590w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Ki\u1ec3m tra k\u1ebft qu\u1ea3 v\u00e0 b\u1ea3o m\u1eadt c\u1ed5ng \u1ee9ng d\u1ee5ng<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 id=\"C\u1ea5u_h\u00ecnh_Nginx_Reverse_Proxy_cho_OpenClaw_c\u00f3_g\u00ec_kh\u00e1c?\"><strong>C\u1ea5u h\u00ecnh Nginx Reverse Proxy cho OpenClaw c\u00f3 g\u00ec kh\u00e1c?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">OpenClaw s\u1eed d\u1ee5ng \u0111\u01b0\u1ee3c c\u00f9ng quy tr\u00ecnh c\u00e0i Nginx v\u00e0 SSL nh\u01b0 n8n, nh\u01b0ng kh\u00f4ng th\u1ec3 \u00e1p d\u1ee5ng nguy\u00ean to\u00e0n b\u1ed9 c\u1ea5u h\u00ecnh \u1ee9ng d\u1ee5ng. OpenClaw Gateway c\u00f3 h\u1ec7 th\u1ed1ng x\u00e1c th\u1ef1c, ki\u1ec3m tra ngu\u1ed3n k\u1ebft n\u1ed1i v\u00e0 WebSocket ri\u00eang.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ed1i v\u1edbi OpenClaw \u0111\u01b0\u1ee3c c\u00e0i tr\u1ef1c ti\u1ebfp tr\u00ean VPS Ubuntu, h\u00e3y th\u1ef1c hi\u1ec7n c\u00e1c b\u01b0\u1edbc c\u00e0i Nginx, tr\u1ecf DNS v\u00e0 c\u1ea5p SSL t\u01b0\u01a1ng t\u1ef1 ph\u1ea7n n8n, nh\u01b0ng th\u1ef1c hi\u1ec7n tr\u00ean VPS OpenClaw, kh\u00f4ng ph\u1ea3i VPS n8n.<\/p>\n\n\n\n<h3 id=\"Nh\u1eefng_th\u00f4ng_s\u1ed1_c\u1ea7n_thay_\u0111\u1ed5i\"><strong>Nh\u1eefng th\u00f4ng s\u1ed1 c\u1ea7n thay \u0111\u1ed5i<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Th\u00f4ng s\u1ed1<\/strong><\/td><td><strong>n8n<\/strong><\/td><td><strong>OpenClaw<\/strong><\/td><\/tr><tr><td>T\u00ean mi\u1ec1n minh h\u1ecda<\/td><td>example.com<\/td><td>example.com<\/td><\/tr><tr><td>C\u1ed5ng m\u1eb7c \u0111\u1ecbnh<\/td><td>5678<\/td><td>18789<\/td><\/tr><tr><td>Reverse Proxy<\/td><td>Nginx<\/td><td>Nginx<\/td><\/tr><tr><td>SSL<\/td><td>Let&#8217;s Encrypt<\/td><td>Let&#8217;s Encrypt<\/td><\/tr><tr><td>X\u1eed l\u00fd WebSocket<\/td><td>C\u00f3<\/td><td>B\u1eaft bu\u1ed9c cho Gateway UI<\/td><\/tr><tr><td>Thi\u1ebft l\u1eadp b\u1ed5 sung<\/td><td>Bi\u1ebfn m\u00f4i tr\u01b0\u1eddng n8n<\/td><td>Gateway auth, trusted proxies, allowed origins<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 id=\"Thay_\u0111\u1ed5i_c\u1ea5u_h\u00ecnh_Nginx\"><strong>Thay \u0111\u1ed5i c\u1ea5u h\u00ecnh Nginx<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1ea1o t\u1ec7p c\u1ea5u h\u00ecnh ri\u00eang tr\u00ean VPS OpenClaw, t\u01b0\u01a1ng t\u1ef1 B\u01b0\u1edbc 3:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/nginx\/sites-available\/openclaw<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">S\u1eed d\u1ee5ng c\u1ea5u tr\u00fac Nginx \u0111\u00e3 h\u01b0\u1edbng d\u1eabn, thay t\u00ean mi\u1ec1n, \u0111\u1ecba ch\u1ec9 chuy\u1ec3n ti\u1ebfp v\u00e0 header X-Forwarded-For nh\u01b0 sau:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_name claw.example.com;\n\nproxy_pass http:\/\/127.0.0.1:18789;\n\nproxy_set_header X-Forwarded-For $remote_addr;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1eb7t t\u1eebng d\u00f2ng trong \u0111\u00fang kh\u1ed1i server ho\u1eb7c location t\u01b0\u01a1ng \u1ee9ng c\u1ee7a c\u1ea5u h\u00ecnh \u0111\u1ea7y \u0111\u1ee7 \u1edf B\u01b0\u1edbc 3; kh\u00f4ng thay to\u00e0n b\u1ed9 t\u1ec7p ch\u1ec9 b\u1eb1ng ba d\u00f2ng tr\u00ean.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ed1i v\u1edbi OpenClaw, t\u00e0i li\u1ec7u b\u1ea3o m\u1eadt khuy\u1ebfn ngh\u1ecb Reverse Proxy ghi \u0111\u00e8 X-Forwarded-For b\u1eb1ng \u0111\u1ecba ch\u1ec9 th\u1ef1c c\u1ee7a m\u00e1y kh\u00e1ch \u0111\u1ec3 tr\u00e1nh tin t\u01b0\u1edfng c\u00e1c gi\u00e1 tr\u1ecb do b\u00ean ngo\u00e0i t\u1ef1 cung c\u1ea5p.<\/p>\n\n\n\n<h3 id=\"Thi\u1ebft_l\u1eadp_b\u1ea3o_m\u1eadt_Gateway\"><strong>Thi\u1ebft l\u1eadp b\u1ea3o m\u1eadt Gateway<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">V\u1edbi OpenClaw c\u00e0i tr\u1ef1c ti\u1ebfp tr\u00ean h\u1ec7 \u0111i\u1ec1u h\u00e0nh, Nginx v\u00e0 Gateway giao ti\u1ebfp qua loopback. C\u1ea5u h\u00ecnh OpenClaw c\u1ea7n cho ph\u00e9p ngu\u1ed3n Reverse Proxy t\u01b0\u01a1ng \u1ee9ng v\u00e0 c\u00f4ng nh\u1eadn t\u00ean mi\u1ec1n HTTPS.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n-2.png\" alt=\"C\u1ea5u h\u00ecnh Nginx Reverse Proxy cho OpenClaw c\u00f3 g\u00ec kh\u00e1c?\" class=\"wp-image-131130\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n-2.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cau-hinh-nginx-reverse-proxy-va-ssl-cho-n8n-2-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u1ea5u h\u00ecnh Nginx Reverse Proxy cho OpenClaw c\u00f3 g\u00ec kh\u00e1c?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">V\u00ed d\u1ee5 c\u00e1c tr\u01b0\u1eddng c\u1ea7n c\u00f3 trong c\u1ea5u h\u00ecnh Gateway:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n\n&nbsp;&nbsp;\"gateway\": {\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"bind\": \"loopback\",\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"trustedProxies\": &#091;\"127.0.0.1\"],\n\n&nbsp;&nbsp;&nbsp;&nbsp;\"controlUi\": {\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"allowedOrigins\": &#091;\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\"https:\/\/claw.example.com\"\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]\n\n&nbsp;&nbsp;&nbsp;&nbsp;}\n\n&nbsp;&nbsp;}\n\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u00e2y l\u00e0 \u0111o\u1ea1n minh h\u1ecda c\u00e1c tr\u01b0\u1eddng c\u1ea7n gh\u00e9p v\u00e0o c\u1ea5u h\u00ecnh \u0111ang c\u00f3, kh\u00f4ng ph\u1ea3i t\u1ec7p thay th\u1ebf ho\u00e0n ch\u1ec9nh. \u0110\u1eb7c bi\u1ec7t, c\u1ea7n gi\u1eef nguy\u00ean c\u1ea5u h\u00ecnh gateway.auth v\u00e0 token ho\u1eb7c m\u1eadt kh\u1ea9u hi\u1ec7n t\u1ea1i.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu OpenClaw ch\u1ea1y trong Docker, \u0111\u1ecba ch\u1ec9 proxy m\u00e0 Gateway nh\u00ecn th\u1ea5y c\u00f3 th\u1ec3 kh\u00e1c 127.0.0.1; c\u1ea7n x\u00e1c \u0111\u1ecbnh \u0111\u00fang \u0111\u1ecba ch\u1ec9 m\u1ea1ng Docker tr\u01b0\u1edbc khi thi\u1ebft l\u1eadp trustedProxies. Kh\u00f4ng t\u1ef1 chuy\u1ec3n Gateway sang 0.0.0.0 \u0111\u1ec3 kh\u1eafc ph\u1ee5c l\u1ed7i m\u00e0 ch\u01b0a ki\u1ec3m tra b\u1ea3o m\u1eadt m\u1ea1ng.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sau khi ch\u1ec9nh s\u1eeda, ki\u1ec3m tra c\u1ea5u h\u00ecnh v\u00e0 kh\u1edfi \u0111\u1ed9ng l\u1ea1i Gateway theo c\u00e1ch qu\u1ea3n l\u00fd \u0111ang s\u1eed d\u1ee5ng. \u0110\u1ed1i v\u1edbi b\u1ea3n c\u00e0i CLI ti\u00eau chu\u1ea9n c\u00f3 h\u1ed7 tr\u1ee3 c\u00e1c l\u1ec7nh t\u01b0\u01a1ng \u1ee9ng:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openclaw config validate\n\nopenclaw gateway restart<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Sau \u0111\u00f3 truy c\u1eadp <strong>https:\/\/claw.example.com<\/strong> v\u00e0 ho\u00e0n t\u1ea5t x\u00e1c th\u1ef1c ho\u1eb7c gh\u00e9p n\u1ed1i thi\u1ebft b\u1ecb n\u1ebfu \u0111\u01b0\u1ee3c y\u00eau c\u1ea7u.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>L\u01b0u \u00fd b\u1ea3o m\u1eadt:<\/strong> Kh\u00f4ng t\u1eaft x\u00e1c th\u1ef1c Gateway ch\u1ec9 \u0111\u1ec3 truy c\u1eadp qua t\u00ean mi\u1ec1n. OpenClaw c\u00f3 th\u1ec3 th\u1ef1c hi\u1ec7n c\u00e1c thao t\u00e1c tr\u00ean m\u00e1y ch\u1ee7 v\u00e0 t\u01b0\u01a1ng t\u00e1c v\u1edbi d\u1eef li\u1ec7u, v\u00ec v\u1eady n\u00ean \u01b0u ti\u00ean truy c\u1eadp ri\u00eang qua Tailscale ho\u1eb7c h\u1ec7 th\u1ed1ng Access c\u00f3 x\u00e1c th\u1ef1c khi kh\u00f4ng c\u1ea7n c\u00f4ng khai Gateway l\u00ean Internet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">T\u00e0i li\u1ec7u OpenClaw c\u0169ng khuy\u1ebfn ngh\u1ecb gi\u1eef Gateway trong m\u1ea1ng ri\u00eang v\u00e0 h\u1ea1n ch\u1ebf t\u1ed1i \u0111a c\u00e1c c\u1ed5ng c\u00f4ng khai.<\/p>\n\n\n\n<h2 id=\"C\u00e1c_l\u1ed7i_th\u01b0\u1eddng_g\u1eb7p_v\u00e0_c\u00e1ch_kh\u1eafc_ph\u1ee5c\"><strong>C\u00e1c l\u1ed7i th\u01b0\u1eddng g\u1eb7p v\u00e0 c\u00e1ch kh\u1eafc ph\u1ee5c<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Trong qu\u00e1 tr\u00ecnh c\u1ea5u h\u00ecnh Nginx Reverse Proxy v\u00e0 SSL, c\u00e1c l\u1ed7i ph\u1ed5 bi\u1ebfn th\u01b0\u1eddng li\u00ean quan \u0111\u1ebfn DNS, c\u1ed5ng \u1ee9ng d\u1ee5ng, ch\u1ee9ng ch\u1ec9 SSL ho\u1eb7c thi\u1ebft l\u1eadp Reverse Proxy.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>L\u1ed7i<\/strong><\/td><td><strong>Nguy\u00ean nh\u00e2n th\u01b0\u1eddng g\u1eb7p<\/strong><\/td><td><strong>C\u00e1ch kh\u1eafc ph\u1ee5c<\/strong><\/td><\/tr><tr><td>502 Bad Gateway<\/td><td>Nginx kh\u00f4ng k\u1ebft n\u1ed1i \u0111\u01b0\u1ee3c \u1ee9ng d\u1ee5ng<\/td><td>Ki\u1ec3m tra container, c\u1ed5ng 5678\/18789 v\u00e0 proxy_pass<\/td><\/tr><tr><td>Kh\u00f4ng truy c\u1eadp \u0111\u01b0\u1ee3c t\u00ean mi\u1ec1n<\/td><td>DNS sai, t\u01b0\u1eddng l\u1eeda ch\u1eb7n ho\u1eb7c Nginx ch\u01b0a ho\u1ea1t \u0111\u1ed9ng<\/td><td>Ki\u1ec3m tra b\u1ea3n ghi A, c\u1ed5ng 80\/443 v\u00e0 tr\u1ea1ng th\u00e1i Nginx<\/td><\/tr><tr><td>Certbot kh\u00f4ng c\u1ea5p \u0111\u01b0\u1ee3c SSL<\/td><td>DNS ch\u01b0a tr\u1ecf \u0111\u00fang ho\u1eb7c c\u1ed5ng 80 kh\u00f4ng th\u1ec3 truy c\u1eadp<\/td><td>Ki\u1ec3m tra t\u00ean mi\u1ec1n, b\u1ea3n ghi IPv6 n\u1ebfu c\u00f3 v\u00e0 t\u01b0\u1eddng l\u1eeda<\/td><\/tr><tr><td>n8n hi\u1ec3n th\u1ecb webhook HTTP<\/td><td>Ch\u01b0a c\u1eadp nh\u1eadt bi\u1ebfn m\u00f4i tr\u01b0\u1eddng ho\u1eb7c container ch\u01b0a nh\u1eadn c\u1ea5u h\u00ecnh m\u1edbi<\/td><td>Ki\u1ec3m tra N8N_WEBHOOK_URL ho\u1eb7c WEBHOOK_URL theo phi\u00ean b\u1ea3n<\/td><\/tr><tr><td>OpenClaw kh\u00f4ng k\u1ebft n\u1ed1i WebSocket<\/td><td>Thi\u1ebfu header n\u00e2ng c\u1ea5p WebSocket, c\u1ea5u h\u00ecnh origin ho\u1eb7c trusted proxy ch\u01b0a \u0111\u00fang<\/td><td>Ki\u1ec3m tra Nginx, gateway.controlUi.allowedOrigins v\u00e0 gateway.trustedProxies<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Khi ch\u1ec9nh s\u1eeda c\u1ea5u h\u00ecnh Nginx, lu\u00f4n ki\u1ec3m tra c\u00fa ph\u00e1p tr\u01b0\u1edbc khi t\u1ea3i l\u1ea1i d\u1ecbch v\u1ee5:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nginx -t\n\nsudo systemctl reload nginx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu v\u1eabn ph\u00e1t sinh l\u1ed7i, xem log Nginx:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo tail -n 50 \/var\/log\/nginx\/error.log<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110\u1ed1i v\u1edbi n8n ch\u1ea1y b\u1eb1ng Docker, c\u00f3 th\u1ec3 ki\u1ec3m tra log c\u1ee7a container:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker logs --tail 50 TEN_CONTAINER_N8N<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Thay <strong>TEN_CONTAINER_N8N<\/strong> b\u1eb1ng t\u00ean container \u0111\u01b0\u1ee3c hi\u1ec3n th\u1ecb trong k\u1ebft qu\u1ea3 sudo docker ps.<\/p>\n\n\n\n<h2 id=\"K\u1ebft_lu\u1eadn\"><strong>K\u1ebft lu\u1eadn<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C\u1ea5u h\u00ecnh Nginx Reverse Proxy v\u00e0 SSL gi\u00fap n8n v\u00e0 OpenClaw c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c truy c\u1eadp b\u1eb1ng t\u00ean mi\u1ec1n HTTPS thay v\u00ec \u0111\u1ecba ch\u1ec9 IP v\u00e0 c\u1ed5ng \u1ee9ng d\u1ee5ng. \u0110\u1ed1i v\u1edbi n8n, b\u1ea1n ch\u1ec9 c\u1ea7n c\u1ea5u h\u00ecnh chuy\u1ec3n ti\u1ebfp \u0111\u1ebfn c\u1ed5ng 5678, k\u00edch ho\u1ea1t SSL v\u00e0 c\u1eadp nh\u1eadt \u0111\u1ecba ch\u1ec9 webhook. V\u1edbi OpenClaw, c\u1ea7n b\u1ed5 sung c\u00e1c thi\u1ebft l\u1eadp x\u00e1c th\u1ef1c, WebSocket v\u00e0 Trusted Proxy \u0111\u1ec3 b\u1ea3o \u0111\u1ea3m an to\u00e0n.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sau khi tri\u1ec3n khai, h\u00e3y ki\u1ec3m tra ho\u1ea1t \u0111\u1ed9ng c\u1ee7a \u1ee9ng d\u1ee5ng, ch\u1ee9ng ch\u1ec9 SSL v\u00e0 t\u01b0\u1eddng l\u1eeda, \u0111\u1ed3ng th\u1eddi duy tr\u00ec vi\u1ec7c c\u1eadp nh\u1eadt ph\u1ea7n m\u1ec1m th\u01b0\u1eddng xuy\u00ean.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\"><strong>Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/strong><\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"D\u00f9ng_Cloudflare_v\u1edbi_n8n_c\u00f3_\u0111\u01b0\u1ee3c_kh\u00f4ng?\">D\u00f9ng Cloudflare v\u1edbi n8n c\u00f3 \u0111\u01b0\u1ee3c kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">\u0110\u01b0\u1ee3c, nh\u01b0ng n\u00ean \u0111\u1ec3 b\u1ea3n ghi \u1edf ch\u1ebf \u0111\u1ed9 DNS only khi ch\u1ea1y Certbot l\u1ea7n \u0111\u1ea7u \u0111\u1ec3 tr\u00e1nh l\u1ed7i x\u00e1c th\u1ef1c. Khi b\u1eadt l\u1ea1i <a href=\"https:\/\/www.cloudflare.com\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.cloudflare.com\/\" rel=\"noreferrer noopener nofollow\">proxy Cloudflare<\/a>, \u0111\u1eb7t ch\u1ebf \u0111\u1ed9 SSL\/TLS l\u00e0 Full (strict). Ch\u1ebf \u0111\u1ed9 Flexible khi\u1ebfn Cloudflare g\u1ecdi v\u1ec1 VPS b\u1eb1ng HTTP, d\u1ec5 g\u00e2y v\u00f2ng l\u1eb7p chuy\u1ec3n h\u01b0\u1edbng v\u1edbi c\u1ea5u h\u00ecnh Certbot.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Sau_khi_c\u1ea5u_h\u00ecnh_Nginx,_c\u00f3_c\u1ea7n_m\u1edf_c\u1ed5ng_5678_ra_Internet_kh\u00f4ng?\">Sau khi c\u1ea5u h\u00ecnh Nginx, c\u00f3 c\u1ea7n m\u1edf c\u1ed5ng 5678 ra Internet kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Kh\u00f4ng. N\u1ebfu Nginx v\u00e0 n8n ch\u1ea1y tr\u00ean c\u00f9ng VPS, b\u1ea1n c\u00f3 th\u1ec3 gi\u1edbi h\u1ea1n c\u1ed5ng \u1ee9ng d\u1ee5ng b\u1eb1ng 127.0.0.1:5678:5678 trong Docker Compose. Ng\u01b0\u1eddi d\u00f9ng b\u00ean ngo\u00e0i s\u1ebd k\u1ebft n\u1ed1i qua HTTPS tr\u00ean c\u1ed5ng 443, sau \u0111\u00f3 Nginx chuy\u1ec3n ti\u1ebfp y\u00eau c\u1ea7u \u0111\u1ebfn c\u1ed5ng n\u1ed9i b\u1ed9.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"C\u00f3_c\u1ea7n_mua_ch\u1ee9ng_ch\u1ec9_SSL_\u0111\u1ec3_s\u1eed_d\u1ee5ng_Nginx_Reverse_Proxy_kh\u00f4ng?\">C\u00f3 c\u1ea7n mua ch\u1ee9ng ch\u1ec9 SSL \u0111\u1ec3 s\u1eed d\u1ee5ng Nginx Reverse Proxy kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">Kh\u00f4ng b\u1eaft bu\u1ed9c. Let&#8217;s Encrypt cung c\u1ea5p ch\u1ee9ng ch\u1ec9 SSL\/TLS mi\u1ec5n ph\u00ed v\u00e0 Certbot h\u1ed7 tr\u1ee3 t\u1ef1 \u0111\u1ed9ng c\u1ea5p, c\u00e0i \u0111\u1eb7t, gia h\u1ea1n ch\u1ee9ng ch\u1ec9. B\u1ea1n ch\u1ec9 c\u1ea7n c\u00f3 t\u00ean mi\u1ec1n h\u1ee3p l\u1ec7, c\u1ea5u h\u00ecnh DNS ch\u00ednh x\u00e1c v\u00e0 \u0111\u00e1p \u1ee9ng y\u00eau c\u1ea7u x\u00e1c th\u1ef1c quy\u1ec1n ki\u1ec3m so\u00e1t t\u00ean mi\u1ec1n.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"n8n_v\u00e0_OpenClaw_c\u00f3_th\u1ec3_s\u1eed_d\u1ee5ng_chung_m\u1ed9t_t\u00ean_mi\u1ec1n_kh\u00f4ng?\">n8n v\u00e0 OpenClaw c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng chung m\u1ed9t t\u00ean mi\u1ec1n kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">C\u00f3. N\u1ebfu s\u1eed d\u1ee5ng c\u00f9ng m\u1ed9t t\u00ean mi\u1ec1n g\u1ed1c, b\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o hai subdomain ri\u00eang, ch\u1eb3ng h\u1ea1n n8n.example.com v\u00e0 openclaw.example.com. M\u1ed7i subdomain \u0111\u01b0\u1ee3c tr\u1ecf \u0111\u1ebfn \u0111\u1ecba ch\u1ec9 IP c\u1ee7a VPS t\u01b0\u01a1ng \u1ee9ng.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"OpenClaw_\u0111\u00e3_c\u00f3_SSL_th\u00ec_c\u00f3_c\u1ea7n_token_ho\u1eb7c_m\u1eadt_kh\u1ea9u_kh\u00f4ng?\">OpenClaw \u0111\u00e3 c\u00f3 SSL th\u00ec c\u00f3 c\u1ea7n token ho\u1eb7c m\u1eadt kh\u1ea9u kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p class=\"wp-block-paragraph\">C\u00f3. SSL ch\u1ec9 m\u00e3 h\u00f3a k\u1ebft n\u1ed1i gi\u1eefa tr\u00ecnh duy\u1ec7t v\u00e0 m\u00e1y ch\u1ee7, kh\u00f4ng thay th\u1ebf c\u01a1 ch\u1ebf x\u00e1c th\u1ef1c OpenClaw Gateway. B\u1ea1n v\u1eabn c\u1ea7n gi\u1eef token, m\u1eadt kh\u1ea9u ho\u1eb7c m\u1ed9t ph\u01b0\u01a1ng th\u1ee9c x\u00e1c th\u1ef1c \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3. Kh\u00f4ng n\u00ean v\u00f4 hi\u1ec7u h\u00f3a x\u00e1c th\u1ef1c khi c\u00f4ng khai Gateway.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"D\u00f9ng Cloudflare v\u1edbi n8n c\u00f3 \u0111\u01b0\u1ee3c kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>\u0110\u01b0\u1ee3c, nh\u01b0ng n\u00ean \u0111\u1ec3 b\u1ea3n ghi \u1edf ch\u1ebf \u0111\u1ed9 DNS only khi ch\u1ea1y Certbot l\u1ea7n \u0111\u1ea7u \u0111\u1ec3 tr\u00e1nh l\u1ed7i x\u00e1c th\u1ef1c. Khi b\u1eadt l\u1ea1i <a>proxy Cloudflare<\/a>, \u0111\u1eb7t ch\u1ebf \u0111\u1ed9 SSL\/TLS l\u00e0 Full (strict). Ch\u1ebf \u0111\u1ed9 Flexible khi\u1ebfn Cloudflare g\u1ecdi v\u1ec1 VPS b\u1eb1ng HTTP, d\u1ec5 g\u00e2y v\u00f2ng l\u1eb7p chuy\u1ec3n h\u01b0\u1edbng v\u1edbi c\u1ea5u h\u00ecnh Certbot.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Sau khi c\u1ea5u h\u00ecnh Nginx, c\u00f3 c\u1ea7n m\u1edf c\u1ed5ng 5678 ra Internet kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Kh\u00f4ng. N\u1ebfu Nginx v\u00e0 n8n ch\u1ea1y tr\u00ean c\u00f9ng VPS, b\u1ea1n c\u00f3 th\u1ec3 gi\u1edbi h\u1ea1n c\u1ed5ng \u1ee9ng d\u1ee5ng b\u1eb1ng 127.0.0.1:5678:5678 trong Docker Compose. Ng\u01b0\u1eddi d\u00f9ng b\u00ean ngo\u00e0i s\u1ebd k\u1ebft n\u1ed1i qua HTTPS tr\u00ean c\u1ed5ng 443, sau \u0111\u00f3 Nginx chuy\u1ec3n ti\u1ebfp y\u00eau c\u1ea7u \u0111\u1ebfn c\u1ed5ng n\u1ed9i b\u1ed9.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"C\u00f3 c\u1ea7n mua ch\u1ee9ng ch\u1ec9 SSL \u0111\u1ec3 s\u1eed d\u1ee5ng Nginx Reverse Proxy kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>Kh\u00f4ng b\u1eaft bu\u1ed9c. Let's Encrypt cung c\u1ea5p ch\u1ee9ng ch\u1ec9 SSL\/TLS mi\u1ec5n ph\u00ed v\u00e0 Certbot h\u1ed7 tr\u1ee3 t\u1ef1 \u0111\u1ed9ng c\u1ea5p, c\u00e0i \u0111\u1eb7t, gia h\u1ea1n ch\u1ee9ng ch\u1ec9. B\u1ea1n ch\u1ec9 c\u1ea7n c\u00f3 t\u00ean mi\u1ec1n h\u1ee3p l\u1ec7, c\u1ea5u h\u00ecnh DNS ch\u00ednh x\u00e1c v\u00e0 \u0111\u00e1p \u1ee9ng y\u00eau c\u1ea7u x\u00e1c th\u1ef1c quy\u1ec1n ki\u1ec3m so\u00e1t t\u00ean mi\u1ec1n.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"n8n v\u00e0 OpenClaw c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng chung m\u1ed9t t\u00ean mi\u1ec1n kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3. N\u1ebfu s\u1eed d\u1ee5ng c\u00f9ng m\u1ed9t t\u00ean mi\u1ec1n g\u1ed1c, b\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o hai subdomain ri\u00eang, ch\u1eb3ng h\u1ea1n n8n.example.com v\u00e0 openclaw.example.com. M\u1ed7i subdomain \u0111\u01b0\u1ee3c tr\u1ecf \u0111\u1ebfn \u0111\u1ecba ch\u1ec9 IP c\u1ee7a VPS t\u01b0\u01a1ng \u1ee9ng.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"OpenClaw \u0111\u00e3 c\u00f3 SSL th\u00ec c\u00f3 c\u1ea7n token ho\u1eb7c m\u1eadt kh\u1ea9u kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3. SSL ch\u1ec9 m\u00e3 h\u00f3a k\u1ebft n\u1ed1i gi\u1eefa tr\u00ecnh duy\u1ec7t v\u00e0 m\u00e1y ch\u1ee7, kh\u00f4ng thay th\u1ebf c\u01a1 ch\u1ebf x\u00e1c th\u1ef1c OpenClaw Gateway. B\u1ea1n v\u1eabn c\u1ea7n gi\u1eef token, m\u1eadt kh\u1ea9u ho\u1eb7c m\u1ed9t ph\u01b0\u01a1ng th\u1ee9c x\u00e1c th\u1ef1c \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3. Kh\u00f4ng n\u00ean v\u00f4 hi\u1ec7u h\u00f3a x\u00e1c th\u1ef1c khi c\u00f4ng khai Gateway.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u0110\u1ec3 c\u1ea5u h\u00ecnh Nginx Reverse Proxy v\u00e0 SSL cho n8n ho\u1eb7c OpenClaw tr\u00ean VPS, b\u1ea1n c\u1ea7n tr\u1ecf t\u00ean mi\u1ec1n v\u1ec1 m\u00e1y ch\u1ee7, c\u00e0i \u0111\u1eb7t Nginx, thi\u1ebft l\u1eadp chuy\u1ec3n ti\u1ebfp \u0111\u1ebfn c\u1ed5ng \u1ee9ng d\u1ee5ng v\u00e0 k\u00edch ho\u1ea1t HTTPS b\u1eb1ng Let&#8217;s Encrypt. Sau khi ho\u00e0n t\u1ea5t, b\u1ea1n c\u00f3 th\u1ec3 truy c\u1eadp \u1ee9ng d\u1ee5ng qua t\u00ean mi\u1ec1n ri\u00eang [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":131131,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7343],"class_list":["post-131051","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n8n","tag-n8n"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/131051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=131051"}],"version-history":[{"count":6,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/131051\/revisions"}],"predecessor-version":[{"id":131133,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/131051\/revisions\/131133"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/131131"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=131051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=131051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=131051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}