{"id":262,"date":"2026-08-06T17:13:52","date_gmt":"2026-08-06T09:13:52","guid":{"rendered":"https:\/\/www.handytoo.com\/?p=262"},"modified":"2026-08-06T17:16:06","modified_gmt":"2026-08-06T09:16:06","slug":"n8n-docker-%e9%83%a8%e7%bd%b2%e6%b5%8b%e8%af%95%e7%94%9f%e4%ba%a7%e7%ba%a7%e9%85%8d%e7%bd%ae%e5%85%a8%e6%b5%81%e7%a8%8b%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.handytoo.com\/?p=262","title":{"rendered":"n8n Docker \u90e8\u7f72\u6d4b\u8bd5+\u751f\u4ea7\u7ea7\u914d\u7f6e\u5168\u6d41\u7a0b\u8bb0\u5f55"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"n8n-%E7%AE%80%E4%BB%8B\">n8n \u7b80\u4ecb<\/h2>\n\n\n\n<p>n8n\u662f\u4e00\u6b3e\u4e13\u4e3a\u6280\u672f\u56e2\u961f\u6253\u9020\u7684\u5f00\u6e90\u5de5\u4f5c\u6d41\u81ea\u52a8\u5316\u5e73\u53f0\uff08Workflow Automation Platform\uff09\uff0c\u517c\u5177\u300c\u4f4e\u4ee3\u7801\uff08No-code\uff09\u300d\u4e0e\u300c\u53ef\u7f16\u7a0b\uff08Pro-code\uff09\u300d\u53cc\u91cd\u7279\u6027\u3002\u5b83\u8ba9\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u4e0d\u540c\u7cfb\u7edf\u3001API \u548c\u670d\u52a1\u8fde\u63a5\u8d77\u6765\uff0c\u81ea\u52a8\u6267\u884c\u4efb\u52a1\u3001\u6570\u636e\u540c\u6b65\u3001\u901a\u77e5\u3001\u96c6\u6210 AI \u6a21\u578b\u7b49\u5404\u79cd\u6d41\u7a0b\u3002n8n \u4e0d\u4ec5\u80fd\u8282\u7701\u5927\u91cf\u91cd\u590d\u6027\u5de5\u4f5c\uff0c\u8fd8\u80fd\u5728\u56e2\u961f\u5185\u90e8\u6784\u5efa\u7a33\u5b9a\u3001\u5b89\u5168\u7684\u81ea\u52a8\u5316\u4f53\u7cfb\u3002<\/p>\n\n\n\n<p>\u5b83\u8ba9\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u4e0d\u540c\u7cfb\u7edf\u3001API \u548c\u670d\u52a1\u8fde\u63a5\u8d77\u6765\uff0c\u81ea\u52a8\u6267\u884c\u4efb\u52a1\u3001\u6570\u636e\u540c\u6b65\u3001\u901a\u77e5\u3001\u96c6\u6210 AI \u6a21\u578b\u7b49\u5404\u79cd\u6d41\u7a0b\u3002<br>n8n \u4e0d\u4ec5\u80fd\u8282\u7701\u5927\u91cf\u91cd\u590d\u6027\u5de5\u4f5c\uff0c\u8fd8\u80fd\u5728\u56e2\u961f\u5185\u90e8\u6784\u5efa\u7a33\u5b9a\u3001\u5b89\u5168\u7684\u81ea\u52a8\u5316\u4f53\u7cfb\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"-%E6%A0%B8%E5%BF%83%E5%8A%9F%E8%83%BD%E4%BA%AE%E7%82%B9\">\ud83d\udd11 \u6838\u5fc3\u529f\u80fd\u4eae\u70b9<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u529f\u80fd<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>\ud83e\udde0 \u53ef\u7f16\u7a0b\u4e0e\u53ef\u89c6\u5316\u517c\u5907<\/td><td>\u652f\u6301\u53ef\u89c6\u5316\u62d6\u62fd\u8282\u70b9\uff0c\u4e5f\u80fd\u76f4\u63a5\u7f16\u5199 JavaScript\/Python \u903b\u8f91\u3002<\/td><\/tr><tr><td>\ud83e\udd16 AI \u539f\u751f\u652f\u6301<\/td><td>\u5185\u7f6e LangChain\u3001OpenAI \u63a5\u53e3\uff0c\u53ef\u642d\u5efa\u81ea\u5b9a\u4e49 AI Agent \u6d41\u7a0b\u3002<\/td><\/tr><tr><td>\ud83e\udde9 400+ \u96c6\u6210\u8282\u70b9<\/td><td>\u652f\u6301 GitHub\u3001Slack\u3001MySQL\u3001Redis\u3001Google Sheets\u3001Telegram\u3001OpenAI \u7b49\u5e38\u7528\u670d\u52a1\u3002<\/td><\/tr><tr><td>\ud83d\udd10 \u5b8c\u5168\u81ea\u6258\u7ba1<\/td><td>Fair-Code \u8bb8\u53ef\u534f\u8bae\uff0c\u652f\u6301\u672c\u5730\u90e8\u7f72\uff0c\u6570\u636e\u5b8c\u5168\u638c\u63a7\u5728\u81ea\u5df1\u624b\u4e2d\u3002<\/td><\/tr><tr><td>\ud83e\uddf1 \u4f01\u4e1a\u7ea7\u7279\u6027<\/td><td>\u63d0\u4f9b\u6743\u9650\u7ba1\u7406\u3001SSO\u3001\u79bb\u7ebf\u90e8\u7f72\uff08Air-gapped\uff09\u7b49\u4f01\u4e1a\u529f\u80fd\u3002<\/td><\/tr><tr><td>\ud83c\udf0d \u6d3b\u8dc3\u793e\u533a\u751f\u6001<\/td><td>\u8d85\u8fc7 900+ \u9884\u5236\u5de5\u4f5c\u6d41\u6a21\u677f\uff0c\u53ef\u5feb\u901f\u590d\u7528\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"-%E9%83%A8%E7%BD%B2%E7%8E%AF%E5%A2%83%E5%88%86%E7%BA%A7%EF%BC%88%E6%A0%B8%E5%BF%83%E4%BC%98%E5%8C%96%EF%BC%89\">\u90e8\u7f72\u73af\u5883\u5206\u7ea7\uff08\u6838\u5fc3\u4f18\u5316\uff09<\/h3>\n\n\n\n<p>\u4e3a\u907f\u514d\u6d4b\u8bd5\/\u751f\u4ea7\u73af\u5883\u6df7\u6dc6\u5bfc\u81f4\u7684\u98ce\u9669\uff0c\u5148\u660e\u786e\u4e0d\u540c\u573a\u666f\u7684\u90e8\u7f72\u89c4\u8303\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7ef4\u5ea6<\/th><th>\u6d4b\u8bd5\u73af\u5883<\/th><th>\u751f\u4ea7\u73af\u5883<\/th><\/tr><\/thead><tbody><tr><td>\u6570\u636e\u5e93<\/td><td>SQLite\uff08\u5185\u7f6e\uff0c\u5feb\u901f\u542f\u52a8\uff09<\/td><td>PostgreSQL\uff08\u7a33\u5b9a\u3001\u9ad8\u6027\u80fd\uff09<\/td><\/tr><tr><td>\u955c\u50cf\u6807\u7b7e<\/td><td>latest\uff08\u5c1d\u65b0\uff09<\/td><td>\u56fa\u5b9a\u7248\u672c\uff08stable\uff0c\u907f\u514d\u517c\u5bb9\u95ee\u9898\uff09<\/td><\/tr><tr><td>\u7f51\u7edc\u66b4\u9732<\/td><td>5678\u7aef\u53e3\u76f4\u51fa\uff08\u4ec5\u5185\u7f51\u6d4b\u8bd5\uff09<\/td><td>\u53cd\u5411\u4ee3\u7406+HTTPS\uff08\u516c\u7f51\u8bbf\u95ee\uff09<\/td><\/tr><tr><td>\u5bc6\u7801\u7ba1\u7406<\/td><td>\u793a\u4f8b\u5360\u4f4d\u7b26\uff08\u4ec5\u6d4b\u8bd5\uff09<\/td><td>.env\u6587\u4ef6\/Secret\u7ba1\u7406\uff08\u5f3a\u5bc6\u7801\uff09<\/td><\/tr><tr><td>\u91cd\u542f\u7b56\u7565<\/td><td>\u65e0\uff08\u6d4b\u8bd5\u7ed3\u675f\u5373\u5220\uff09<\/td><td>unless-stopped\uff08\u5f02\u5e38\u81ea\u52a8\u6062\u590d\uff09<\/td><\/tr><tr><td>\u6570\u636e\u5907\u4efd<\/td><td>\u65e0<\/td><td>\u5b9a\u671f\u5907\u4efd\u6570\u636e\u5e93+\u6570\u636e\u5377<\/td><\/tr><tr><td>\u8fd0\u884c\u7528\u6237<\/td><td>node<\/td><td>node<\/td><\/tr><tr><td>\u8d44\u6e90\u9650\u5236<\/td><td>\u65e0<\/td><td>\u663e\u5f0f\u914d\u7f6e\u5185\u5b58\/CPU\u9650\u5236<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e0b\u8f7d n8n \u955c\u50cf<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code><em># \u6d4b\u8bd5\u7528<\/em>\ndocker pull n8nio\/n8n:latest\n<em># \u751f\u4ea7\u7528<\/em>\ndocker pull n8nio\/n8n:stable<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b89\u88c5n8n<\/h3>\n\n\n\n<p>1 \u521b\u5efa\u8d26\u53f7\u548c\u76ee\u5f55<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo useradd -m n8n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"51-%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8%EF%BC%88%E9%80%82%E5%90%88%E5%88%9D%E5%AD%A6%E8%80%85%EF%BC%89\">2 \u6d4b\u8bd5\u73af\u5883\u5feb\u901f\u542f\u52a8\uff08\u9002\u5408\u521d\u5b66\u8005\uff09<\/h3>\n\n\n\n<p>\u6b64\u65b9\u5f0f\u4f7f\u7528\u9ed8\u8ba4\u914d\u7f6e\u4e0e SQLite \u5b58\u50a8\uff0c\u5f00\u7bb1\u5373\u7528\uff0c\u6d4b\u8bd5\u7ed3\u675f\u540e\u6570\u636e\u53ef\u4e22\u5f03\uff1a<\/p>\n\n\n\n<p>\u4ee3\u7801\u8bed\u8a00\uff1aBash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em># \u5feb\u901f\u542f\u52a8\uff08\u6d4b\u8bd5\u7528\uff0c--rm\u8868\u793a\u505c\u6b62\u540e\u5220\u9664\u5bb9\u5668\uff09<\/em>\ndocker run -it --rm \\ \n  --name n8n \\ \n  -p 5678:5678 \\ \n  -e N8N_SECURE_COOKIE=false \\\n  -v \/home\/n8n:\/home\/node\/.n8n \\ \n  n8nio\/n8n:latest\n<\/code><\/pre>\n\n\n\n<p>\u542f\u52a8\u6210\u529f\u540e\uff0c\u8bbf\u95ee\u6d4f\u89c8\u5668\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:\/\/localhost:5678  |  http:\/\/localhost:5678<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"52-%E5%87%86%E7%94%9F%E4%BA%A7%E6%8C%81%E4%B9%85%E5%8C%96%E9%83%A8%E7%BD%B2%EF%BC%88%E6%8E%A8%E8%8D%90%EF%BC%8C%E9%95%BF%E6%9C%9F%E8%BF%90%E8%A1%8C%EF%BC%89\">3 \u51c6\u751f\u4ea7\u6301\u4e45\u5316\u90e8\u7f72\uff08\u63a8\u8350\uff0c\u957f\u671f\u8fd0\u884c\uff09<\/h3>\n\n\n\n<p><strong>\u51c6\u751f\u4ea7\u57fa\u7840\u5f62\u6001<\/strong>\uff0c\u9700\u914d\u5408\u53cd\u5411\u4ee3\u7406\u4f7f\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em># \u6838\u5fc3\uff1a\u5f02\u5e38\u9000\u51fa\u81ea\u52a8\u91cd\u542f\uff08\u751f\u4ea7\u5fc5\u5907\uff09<\/em>\n<em># \u6838\u5fc3\uff1a\u9650\u5236\u5185\u5b58\uff0c\u907f\u514dOOM\uff0c\u4ec5\u7ed1\u5b9a\u672c\u5730\u56de\u73af\u5730\u5740\uff08\u5b89\u5168\uff09<\/em>\ndocker run -d --name n8n \\ \n  --restart unless-stopped \\ \n  --memory 2G \\ \n  -p 127.0.0.1:5678:5678 \\ \n  -e TZ=Asia\/Shanghai \\ \n  -e GENERIC_TIMEZONE=Asia\/Shanghai \\ \n  -v \/home\/n8n\/data:\/home\/node\/.n8n \\ \n  -v \/home\/n8n\/files:\/home\/node\/files \\ \n  n8nio\/n8n:stable\n<\/code><\/pre>\n\n\n\n<p>\u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u53c2\u6570<\/th><th>\u542b\u4e49<\/th><\/tr><\/thead><tbody><tr><td><code>--restart unless-stopped<\/code><\/td><td>\u5bb9\u5668\u5f02\u5e38\/\u4e3b\u673a\u91cd\u542f\u540e\u81ea\u52a8\u6062\u590d\uff08\u751f\u4ea7\u5fc5\u5907\uff09<\/td><\/tr><tr><td><code>--memory 2G<\/code><\/td><td>\u9650\u5236\u5185\u5b58\u4f7f\u7528\uff0c\u907f\u514d\u5360\u7528\u8fc7\u591a\u8d44\u6e90<\/td><\/tr><tr><td><code>-p 127.0.0.1:5678:5678<\/code><\/td><td>\u4ec5\u7ed1\u5b9a\u672c\u5730\u56de\u73af\u5730\u5740\uff0c\u7981\u6b62\u76f4\u8fde\u516c\u7f51, nginx\u53cd\u5411\u4ee3\u7406<\/td><\/tr><tr><td><code>-v \/data\/n8n\/data:\/home\/node\/.n8n<\/code><\/td><td>\u6302\u8f7d\u6570\u636e\u76ee\u5f55\uff0c\u9632\u6b62\u91cd\u542f\u4e22\u5931\u5de5\u4f5c\u6d41<\/td><\/tr><tr><td><code>-e TZ=Asia\/Shanghai<\/code><\/td><td>\u8bbe\u7f6e\u65f6\u533a\u4e3a\u5317\u4eac\u65f6\u95f4<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>n8n \u7b80\u4ecb n8n\u662f\u4e00\u6b3e\u4e13\u4e3a\u6280\u672f\u56e2\u961f\u6253\u9020\u7684\u5f00\u6e90\u5de5\u4f5c\u6d41\u81ea\u52a8\u5316\u5e73\u53f0\uff08Workflow Automation Pl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[33,42],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-ai","tag-ai","tag-n8n"],"_links":{"self":[{"href":"https:\/\/www.handytoo.com\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.handytoo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.handytoo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.handytoo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.handytoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":9,"href":"https:\/\/www.handytoo.com\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":272,"href":"https:\/\/www.handytoo.com\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions\/272"}],"wp:attachment":[{"href":"https:\/\/www.handytoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.handytoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.handytoo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}