{"id":496,"date":"2025-08-04T06:55:03","date_gmt":"2025-08-04T06:55:03","guid":{"rendered":"https:\/\/bbotech.vn\/guide-to-installing-n8n-with-docker-compose-and-nginx\/"},"modified":"2025-10-28T08:17:45","modified_gmt":"2025-10-28T08:17:45","slug":"guide-to-installing-n8n-with-docker-compose-and-nginx","status":"publish","type":"post","link":"https:\/\/bbotech.vn\/vi\/guide-to-installing-n8n-with-docker-compose-and-nginx\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t n8n v\u1edbi Docker Compose v\u00e0 Nginx"},"content":{"rendered":"<h3 data-start=\"157\" data-end=\"177\">T\u00f4i. \u0110i\u1ec1u ki\u1ec7n ti\u00ean quy\u1ebft<\/h3>\n<ol data-start=\"179\" data-end=\"678\">\n<li data-start=\"179\" data-end=\"531\">\n<p data-start=\"182\" data-end=\"239\"><strong data-start=\"182\" data-end=\"237\">Docker v\u00e0 Docker Compose \u0111\u00e3 \u0111\u01b0\u1ee3c c\u00e0i \u0111\u1eb7t tr\u00ean m\u00e1y c\u1ee7a b\u1ea1n<\/strong><\/p>\n<ul data-start=\"243\" data-end=\"364\">\n<li data-start=\"243\" data-end=\"287\">\n<p data-start=\"245\" data-end=\"287\"><strong data-start=\"245\" data-end=\"256\">Docker:<\/strong> C\u00f4ng c\u1ee5 \u0111\u1ec3 ch\u1ea1y container.<\/p>\n<\/li>\n<li data-start=\"291\" data-end=\"364\">\n<p data-start=\"293\" data-end=\"364\"><strong data-start=\"293\" data-end=\"312\">Docker Compose:<\/strong> C\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd nhi\u1ec1u container b\u1eb1ng YAML.<\/p>\n<\/li>\n<\/ul>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">docker --version<br \/>\ndocker-compose --version<br \/>\n<\/code><\/div>\n<\/div>\n<p data-start=\"438\" data-end=\"531\">\u2013 N\u1ebfu b\u1ea1n N\u1ebfu b\u1ea1n ch\u01b0a c\u00e0i \u0111\u1eb7t, b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o h\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t Docker [t\u1ea1i \u0111\u00e2y].<\/p>\n<\/li>\n<li data-start=\"533\" data-end=\"678\">\n<p data-start=\"536\" data-end=\"588\"><strong data-start=\"536\" data-end=\"586\">M\u00e1y t\u00ednh ho\u1eb7c m\u00e1y ch\u1ee7 c\u00f3 \u0111\u1ee7 t\u00e0i nguy\u00ean<\/strong><\/p>\n<ul data-start=\"592\" data-end=\"678\">\n<li data-start=\"592\" data-end=\"616\">\n<p data-start=\"594\" data-end=\"616\">RAM t\u1ed1i thi\u1ec3u: <strong data-start=\"607\" data-end=\"614\">2GB<\/strong><\/p>\n<\/li>\n<li data-start=\"620\" data-end=\"649\">\n<p data-start=\"622\" data-end=\"649\">CPU: <strong data-start=\"627\" data-end=\"647\">\u00edt nh\u1ea5t 2 l\u00f5i<\/strong><\/p>\n<\/li>\n<li data-start=\"653\" data-end=\"678\">\n<p data-start=\"655\" data-end=\"678\">Dung l\u01b0\u1ee3ng \u1ed5 \u0111\u0129a: <strong data-start=\"667\" data-end=\"676\">20GB+<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr data-start=\"680\" data-end=\"683\" \/>\n<h3 data-start=\"685\" data-end=\"713\">II. T\u1ea1o d\u1ef1 \u00e1n<\/h3>\n<h4 data-start=\"715\" data-end=\"789\">1. T\u1ea1o m\u1ed9t th\u01b0 m\u1ee5c \u0111\u1ec3 l\u01b0u tr\u1eef c\u00e1c t\u1ec7p c\u1ea5u h\u00ecnh v\u00e0 d\u1eef li\u1ec7u n8n:<\/h4>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\"><span class=\"hljs-built_in\">mkdir<\/span> n8n-docker<br \/>\n<span class=\"hljs-built_in\">cd<\/span> n8n-docker<br \/>\n<\/code><\/div>\n<\/div>\n<hr data-start=\"837\" data-end=\"840\" \/>\n<h4 data-start=\"842\" data-end=\"920\">2. B\u00ean trong th\u01b0 m\u1ee5c n\u00e0y, h\u00e3y t\u1ea1o t\u1ec7p <code data-start=\"881\" data-end=\"895\">compose.yaml<\/code> \u0111\u1ec3 c\u1ea5u h\u00ecnh n8n.<\/h4>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-bash\">nano compose.yaml<br \/>\n<\/code><\/div>\n<\/div>\n<p data-start=\"955\" data-end=\"983\">Th\u00eam n\u1ed9i dung sau:<\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"sticky top-9\">\n<div class=\"absolute end-0 bottom-0 flex h-9 items-center pe-2\">\n<div class=\"bg-token-bg-elevated-secondary text-token-text-secondary flex items-center gap-4 rounded-sm px-2 font-sans text-xs\"><\/div>\n<\/div>\n<\/div>\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre! language-yaml\"><code class=\"whitespace-pre! language-yaml\"><span class=\"hljs-attr\">d\u1ecbch v\u1ee5:<\/span><br \/>\n<span class=\"hljs-attr\">n8n:<\/span><br \/>\n<span class=\"hljs-attr\">h\u00ecnh \u1ea3nh:<\/span> <span class=\"hljs-string\">docker.n8n.io\/n8nio\/n8n:1.85.0<\/span><br \/>\n<span class=\"hljs-attr\">kh\u1edfi \u0111\u1ed9ng l\u1ea1i:<\/span> <span class=\"hljs-string\">lu\u00f4n lu\u00f4n<\/span><br \/>\n<span class=\"hljs-attr\">c\u1ed5ng:<\/span><br \/>\n<span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">\"5678:5678\"<\/span><br \/>\n<span class=\"hljs-attr\">m\u00f4i tr\u01b0\u1eddng:<\/span><br \/>\n<span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">N8N_HOST=yourdomain.com\/<\/span> <span class=\"hljs-comment\"># Thay th\u1ebf b\u1eb1ng t\u00ean mi\u1ec1n c\u1ee7a b\u1ea1n<\/span><br \/>\n<span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">N8N_PORT=5678<\/span><br \/>\n<span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">N8N_PROTOCOL=https<\/span><br \/>\n<span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">N8N_BASIC_AUTH_ACTIVE=true<\/span><br \/>\n<span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">N8N_BASIC_AUTH_USER=admin<\/span> <span class=\"hljs-comment\"># Thay th\u1ebf b\u1eb1ng t\u00ean ng\u01b0\u1eddi d\u00f9ng c\u1ee7a b\u1ea1n<\/span><br \/>\n<span class=\"hljs-bullet\">-<\/span> <span class=\"hljs-string\">N8N_BASIC_AUTH_PAS<br \/>\n<\/span><\/code><\/code><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>T\u00f4i. \u0110i\u1ec1u ki\u1ec7n ti\u00ean quy\u1ebft Docker v\u00e0 Docker Compose \u0111\u00e3 \u0111\u01b0\u1ee3c c\u00e0i \u0111\u1eb7t tr\u00ean m\u00e1y c\u1ee7a b\u1ea1n Docker: C\u00f4ng c\u1ee5 \u0111\u1ec3 ch\u1ea1y container. Docker Compose: C\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd nhi\u1ec1u container b\u1eb1ng YAML. docker &#8211;version docker-compose &#8211;version \u2013 N\u1ebfu b\u1ea1n N\u1ebfu b\u1ea1n ch\u01b0a c\u00e0i \u0111\u1eb7t, b\u1ea1n c\u00f3 th\u1ec3 tham kh\u1ea3o h\u01b0\u1edbng d\u1eabn c\u00e0i \u0111\u1eb7t Docker [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":498,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25],"tags":[],"class_list":["post-496","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tin-cong-nghe"],"acf":[],"_links":{"self":[{"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/posts\/496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/comments?post=496"}],"version-history":[{"count":1,"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/posts\/496\/revisions"}],"predecessor-version":[{"id":511,"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/posts\/496\/revisions\/511"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/media\/498"}],"wp:attachment":[{"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/media?parent=496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/categories?post=496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bbotech.vn\/vi\/wp-json\/wp\/v2\/tags?post=496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}