{"id":112,"date":"2026-10-22T11:22:55","date_gmt":"2026-10-22T03:22:55","guid":{"rendered":"https:\/\/www.youutaku.cn\/?p=112"},"modified":"2026-11-07T19:10:38","modified_gmt":"2026-11-07T11:10:38","slug":"uptime-kuma-%e5%ae%8c%e6%95%b4%e5%ae%89%e8%a3%85%e6%95%99%e7%a8%8b%ef%bc%9a%e6%90%ad%e5%bb%ba%e8%87%aa%e6%89%98%e7%ae%a1%e7%bd%91%e7%ab%99%e7%9b%91%e6%8e%a7%e4%b8%8e%e7%8a%b6%e6%80%81%e9%a1%b5","status":"publish","type":"post","link":"https:\/\/www.youutaku.cn\/index.php\/2026\/10\/22\/uptime-kuma-%e5%ae%8c%e6%95%b4%e5%ae%89%e8%a3%85%e6%95%99%e7%a8%8b%ef%bc%9a%e6%90%ad%e5%bb%ba%e8%87%aa%e6%89%98%e7%ae%a1%e7%bd%91%e7%ab%99%e7%9b%91%e6%8e%a7%e4%b8%8e%e7%8a%b6%e6%80%81%e9%a1%b5\/","title":{"rendered":"Uptime Kuma \u5b8c\u6574\u5b89\u88c5\u6559\u7a0b\uff1a\u642d\u5efa\u81ea\u6258\u7ba1\u7f51\u7ad9\u76d1\u63a7\u4e0e\u72b6\u6001\u9875"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728\u8fd0\u8425\u7f51\u7ad9\u3001API \u670d\u52a1\u6216\u5728\u7ebf\u5e94\u7528\u7684\u8fc7\u7a0b\u4e2d\uff0c\u670d\u52a1\u53ef\u7528\u6027\u662f\u6700\u6838\u5fc3\u7684\u6307\u6807\u4e4b\u4e00\u3002\u4f20\u7edf\u7b2c\u4e09\u65b9\u76d1\u63a7\u5de5\u5177\u5f80\u5f80\u5b58\u5728\u514d\u8d39\u989d\u5ea6\u6709\u9650\u3001\u6570\u636e\u4e0d\u81ea\u4e3b\u3001\u544a\u8b66\u6e20\u9053\u53d7\u9650\u7b49\u95ee\u9898\uff0c\u800c Uptime Kuma \u4f5c\u4e3a\u4e00\u6b3e\u5f00\u6e90\u3001\u8f7b\u91cf\u3001\u529f\u80fd\u5f3a\u5927\u7684\u81ea\u6258\u7ba1\u76d1\u63a7\u5de5\u5177\uff0c\u5b8c\u7f8e\u89e3\u51b3\u4e86\u8fd9\u4e9b\u75db\u70b9\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Uptime Kuma \u652f\u6301 HTTP\u3001HTTPS\u3001TCP\u3001Ping\u3001DNS\u3001Docker \u5bb9\u5668\u7b49\u591a\u79cd\u76d1\u63a7\u7c7b\u578b\uff0c\u5185\u7f6e\u90ae\u4ef6\u3001Telegram\u3001Discord\u3001\u4f01\u4e1a\u5fae\u4fe1\u3001\u98de\u4e66\u7b49\u6570\u5341\u79cd\u544a\u8b66\u901a\u77e5\u6e20\u9053\uff0c\u8fd8\u652f\u6301\u751f\u6210\u7f8e\u89c2\u7684\u516c\u5f00\u72b6\u6001\u9875\uff0c\u754c\u9762\u7b80\u6d01\u73b0\u4ee3\uff0c\u90e8\u7f72\u95e8\u69db\u6781\u4f4e\uff0c\u662f\u66ff\u4ee3 Uptime Robot\u3001StatusCake \u7b49\u5546\u4e1a\u5de5\u5177\u7684\u7edd\u4f73\u9009\u62e9\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6587\u5c06\u4ece\u73af\u5883\u51c6\u5907\u5f00\u59cb\uff0c\u8be6\u7ec6\u8bb2\u89e3\u4e09\u79cd\u4e3b\u6d41\u5b89\u88c5\u65b9\u5f0f\u3001\u521d\u59cb\u5316\u914d\u7f6e\u3001\u53cd\u5411\u4ee3\u7406\u3001\u6570\u636e\u5907\u4efd\u4e0e\u5e38\u89c1\u95ee\u9898\uff0c\u5e2e\u4f60\u4ece\u96f6\u642d\u5efa\u4e00\u5957\u5b8c\u5168\u81ea\u4e3b\u7684\u670d\u52a1\u76d1\u63a7\u7cfb\u7edf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u524d\u7f6e\u51c6\u5907<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 \u670d\u52a1\u5668\u8981\u6c42<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Uptime Kuma \u8d44\u6e90\u5360\u7528\u6781\u4f4e\uff0c\u6700\u4f4e\u914d\u7f6e\u5373\u53ef\u6d41\u7545\u8fd0\u884c\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li>- \u7cfb\u7edf\uff1aDebian 11+\/Ubuntu 20.04+\uff08\u63a8\u8350\uff09\u3001CentOS 7+\u3001Windows\u3001macOS\u200b<\/li>\n\n\n\n<li>\u67b6\u6784\uff1ax86_64\u3001ARM64\uff08\u652f\u6301\u6811\u8393\u6d3e\uff09\u200b<\/li>\n\n\n\n<li>\u914d\u7f6e\uff1a1 \u6838 CPU\u3001512MB \u5185\u5b58\u30011GB \u78c1\u76d8\u7a7a\u95f4\u200b<\/li>\n\n\n\n<li>\u7f51\u7edc\uff1a\u516c\u7f51\u670d\u52a1\u5668\u53ef\u76d1\u63a7\u5916\u7f51\u670d\u52a1\uff0c\u5185\u7f51\u670d\u52a1\u5668\u53ef\u76d1\u63a7\u5185\u90e8\u670d\u52a1<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">1.2 \u73af\u5883\u8bf4\u660e<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6587\u63a8\u8350\u4f7f\u7528 Docker + Docker Compose \u65b9\u5f0f\u90e8\u7f72\uff0c\u8fd9\u4e5f\u662f\u5b98\u65b9\u9996\u63a8\u7684\u65b9\u6848\uff0c\u5177\u6709\u73af\u5883\u9694\u79bb\u3001\u5347\u7ea7\u7b80\u5355\u3001\u6570\u636e\u6301\u4e45\u5316\u65b9\u4fbf\u7684\u4f18\u52bf\u3002\u82e5\u4f60\u5c1a\u672a\u5b89\u88c5 Docker\uff0c\u53ef\u5148\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4e00\u952e\u5b89\u88c5\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># Debian\/Ubuntu \u4e00\u952e\u5b89\u88c5 Docker\ncurl -fsSL https:\/\/get.docker.com | bash\n# \u542f\u52a8 Docker \u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\nsystemctl enable --now docker\n# \u9a8c\u8bc1\u5b89\u88c5\ndocker --version<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># Debian\/Ubuntu \u4e00\u952e\u5b89\u88c5 Docker<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">curl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-fsSL<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">https:\/\/get.docker.com<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">bash<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"># \u542f\u52a8 Docker \u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--now<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"># \u9a8c\u8bc1\u5b89\u88c5<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--version<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u65b9\u5f0f\u4e00\uff1aDocker Compose \u5b89\u88c5\uff08\u63a8\u8350\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Docker Compose \u9002\u5408\u957f\u671f\u7ef4\u62a4\uff0c\u914d\u7f6e\u6e05\u6670\uff0c\u5347\u7ea7\u548c\u5907\u4efd\u90fd\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.1 \u521b\u5efa\u5de5\u4f5c\u76ee\u5f55<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>mkdir -p \/opt\/uptime-kuma\ncd \/opt\/uptime-kuma<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">mkdir<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-p<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/opt\/uptime-kuma<\/span><\/span>\n<span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/opt\/uptime-kuma<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2.2 \u7f16\u5199\u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u521b\u5efa &nbsp;<code>docker-compose.yml<\/code>&nbsp; \u6587\u4ef6\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>vim docker-compose.yml<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">vim<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-compose.yml<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>version: '3.3'\n\nservices:\n  uptime-kuma:\n    image: louislam\/uptime-kuma:1\n    container_name: uptime-kuma\n    restart: always\n    ports:\n      - \"3001:3001\"\n    volumes:\n      - .\/data:\/app\/data\n    environment:\n      - TZ=Asia\/Shanghai<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #85E89D\">version<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">&#39;3.3&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #85E89D\">services<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">uptime-kuma<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">louislam\/uptime-kuma:1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">container_name<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">uptime-kuma<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">always<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">ports<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;3001:3001&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">.\/data:\/app\/data<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">TZ=Asia\/Shanghai<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">YAML<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6e\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>image: louislam\/uptime-kuma:1<\/code>&nbsp;\uff1a\u4f7f\u7528\u5b98\u65b9\u7a33\u5b9a\u7248\u955c\u50cf\uff0c&nbsp;<code>1<\/code>&nbsp; \u6807\u7b7e\u5bf9\u5e94 1.x \u7a33\u5b9a\u5206\u652f\u200b<\/li>\n\n\n\n<li><code>ports: \"3001:3001\"<\/code>&nbsp;\uff1a\u5bbf\u4e3b\u673a 3001 \u7aef\u53e3\u6620\u5c04\u5bb9\u5668 3001 \u7aef\u53e3\uff0c\u53ef\u81ea\u884c\u4fee\u6539\u5bbf\u4e3b\u673a\u7aef\u53e3<\/li>\n\n\n\n<li><code>volumes: .\/data:\/app\/data<\/code>&nbsp;\uff1a\u5c06\u76d1\u63a7\u6570\u636e\u3001\u914d\u7f6e\u6301\u4e45\u5316\u5230\u672c\u5730 &nbsp;<code>data<\/code>&nbsp; \u76ee\u5f55\uff0c\u9632\u6b62\u5bb9\u5668\u91cd\u5efa\u4e22\u5931\u6570\u636e\u200b<\/li>\n\n\n\n<li><code>TZ=Asia\/Shanghai<\/code>&nbsp;\uff1a\u8bbe\u7f6e\u65f6\u533a\u4e3a\u4e0a\u6d77\uff0c\u907f\u514d\u65f6\u95f4\u663e\u793a\u9519\u8bef<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2.3 \u542f\u52a8\u670d\u52a1<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>docker compose up -d<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">up<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2.4 \u9a8c\u8bc1\u8fd0\u884c<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u5bb9\u5668\u72b6\u6001\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>docker compose <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u72b6\u6001\u663e\u793a &nbsp;<code>Up<\/code>&nbsp;\uff0c\u8bf4\u660e\u542f\u52a8\u6210\u529f\u3002\u6b64\u65f6\u5728\u6d4f\u89c8\u5668\u8bbf\u95ee &nbsp;<code>http:\/\/\u670d\u52a1\u5668IP:3001&nbsp;<\/code> \u5373\u53ef\u8fdb\u5165 Uptime Kuma \u521d\u59cb\u5316\u9875\u9762\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u65b9\u5f0f\u4e8c\uff1aDocker \u5355\u547d\u4ee4\u5feb\u901f\u542f\u52a8<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u53ea\u9700\u8981\u5feb\u901f\u4f53\u9a8c\uff0c\u4e0d\u60f3\u7f16\u5199\u914d\u7f6e\u6587\u4ef6\uff0c\u53ef\u76f4\u63a5\u6267\u884c\u4e00\u6761\u547d\u4ee4\u542f\u52a8\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>docker run -d \\\n  --name uptime-kuma \\\n  --restart always \\\n  -p 3001:3001 \\\n  -v \/opt\/uptime-kuma\/data:\/app\/data \\\n  -e TZ=Asia\/Shanghai \\\n  louislam\/uptime-kuma:1<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">run<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #79B8FF\">--name<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">uptime-kuma<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #79B8FF\">--restart<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">always<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #79B8FF\">-p<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">3001<\/span><span style=\"color: #9ECBFF\">:3001<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #79B8FF\">-v<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/opt\/uptime-kuma\/data:\/app\/data<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #79B8FF\">-e<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">TZ=Asia\/Shanghai<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #9ECBFF\">louislam\/uptime-kuma:1<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8be5\u65b9\u5f0f\u6548\u679c\u4e0e Compose \u5b8c\u5168\u4e00\u81f4\uff0c\u53ea\u662f\u540e\u7eed\u7ba1\u7406\u9700\u8981\u901a\u8fc7 &nbsp;<code>docker<\/code>&nbsp; \u547d\u4ee4\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u65b9\u5f0f\u4e09\uff1a\u624b\u52a8 Node.js \u5b89\u88c5\uff08\u65e0 Docker \u73af\u5883\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u670d\u52a1\u5668\u65e0\u6cd5\u4f7f\u7528 Docker\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7 Node.js \u6e90\u7801\u90e8\u7f72\uff0c\u9002\u5408\u6709\u5b9a\u5236\u5f00\u53d1\u9700\u6c42\u7684\u573a\u666f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4.1 \u5b89\u88c5 Node.js<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Uptime Kuma \u8981\u6c42 Node.js 18 LTS \u53ca\u4ee5\u4e0a\u7248\u672c\uff0c\u63a8\u8350\u4f7f\u7528 20 LTS\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># \u5b89\u88c5 Node.js 20.x\uff08Debian\/Ubuntu\uff09\ncurl -fsSL https:\/\/deb.nodesource.com\/setup_20.x | bash -\napt install -y nodejs git\n# \u9a8c\u8bc1\u7248\u672c\nnode -v<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># \u5b89\u88c5 Node.js 20.x\uff08Debian\/Ubuntu\uff09<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">curl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-fsSL<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">https:\/\/deb.nodesource.com\/setup_20.x<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">bash<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">-<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">nodejs<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">git<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"># \u9a8c\u8bc1\u7248\u672c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">node<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-v<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4.2 \u514b\u9686\u9879\u76ee\u5e76\u5b89\u88c5\u4f9d\u8d56<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd \/opt\ngit clone https:\/\/github.com\/louislam\/uptime-kuma.git\ncd uptime-kuma\nnpm run setup<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/opt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">clone<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">https:\/\/github.com\/louislam\/uptime-kuma.git<\/span><\/span>\n<span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">uptime-kuma<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">run<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">setup<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4.3 \u524d\u53f0\u542f\u52a8\u6d4b\u8bd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bbf\u95ee &nbsp;<code>http:\/\/\u670d\u52a1\u5668IP:3001<\/code>&nbsp;\uff0c\u786e\u8ba4\u9875\u9762\u6b63\u5e38\u6253\u5f00\u540e\uff0c\u6309 &nbsp;<code>Ctrl+C<\/code>&nbsp; \u505c\u6b62\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4.4 \u914d\u7f6e Systemd \u5f00\u673a\u81ea\u542f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u521b\u5efa\u670d\u52a1\u6587\u4ef6\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>vim \/etc\/systemd\/system\/uptime-kuma.service<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">vim<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/systemd\/system\/uptime-kuma.service<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;Unit&#93;\nDescription=Uptime Kuma - Self-hosted monitoring tool\nAfter=network.target\n\n&#91;Service&#93;\nType=simple\nUser=root\nWorkingDirectory=\/opt\/uptime-kuma\nExecStart=\/usr\/bin\/node server\/server.js\nRestart=always\nRestartSec=5\nEnvironment=TZ=Asia\/Shanghai\n\n&#91;Install&#93;\nWantedBy=multi-user.target<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">&#91;Unit&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">Description<\/span><span style=\"color: #E1E4E8\">=Uptime Kuma - Self-hosted monitoring tool<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">After<\/span><span style=\"color: #E1E4E8\">=network.target<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">&#91;Service&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">Type<\/span><span style=\"color: #E1E4E8\">=simple<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">User<\/span><span style=\"color: #E1E4E8\">=root<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">WorkingDirectory<\/span><span style=\"color: #E1E4E8\">=\/opt\/uptime-kuma<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">ExecStart<\/span><span style=\"color: #E1E4E8\">=\/usr\/bin\/node server\/server.js<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">Restart<\/span><span style=\"color: #E1E4E8\">=always<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">RestartSec<\/span><span style=\"color: #E1E4E8\">=5<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">Environment<\/span><span style=\"color: #E1E4E8\">=<\/span><span style=\"color: #F97583\">TZ<\/span><span style=\"color: #E1E4E8\">=Asia\/Shanghai<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">&#91;Install&#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">WantedBy<\/span><span style=\"color: #E1E4E8\">=multi-user.target<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">INI<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u542f\u52a8\u670d\u52a1\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>systemctl daemon-reload\nsystemctl enable --now uptime-kuma\n# \u67e5\u770b\u8fd0\u884c\u72b6\u6001\nsystemctl status uptime-kuma<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">daemon-reload<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--now<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">uptime-kuma<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A737D\"># \u67e5\u770b\u8fd0\u884c\u72b6\u6001<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">status<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">uptime-kuma<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u521d\u59cb\u5316\u914d\u7f6e\u4e0e\u6838\u5fc3\u529f\u80fd<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">5.1 \u9996\u6b21\u6253\u5f00<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5f00 &nbsp;<code>http:\/\/\u670d\u52a1\u5668IP:3001<\/code>&nbsp;\uff0c\u9996\u6b21\u8bbf\u95ee\u4f1a\u8fdb\u5165\u521b\u5efa\u7ba1\u7406\u5458\u8d26\u6237\u9875\u9762\uff0c\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u5bc6\u7801\u540e\u70b9\u51fb\u300cCreate\u300d\u5373\u53ef\u8fdb\u5165\u540e\u53f0\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5.2 \u6dfb\u52a0\u7b2c\u4e00\u4e2a\u76d1\u63a7<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u70b9\u51fb\u5de6\u4fa7\u300c\u6dfb\u52a0\u76d1\u63a7\u9879\u300d<\/li>\n\n\n\n<li>\u9009\u62e9\u76d1\u63a7\u7c7b\u578b\uff1a\u6700\u5e38\u7528\u7684\u662f HTTP(s)\uff0c\u9002\u5408\u76d1\u63a7\u7f51\u7ad9\u3001\u63a5\u53e3\u200b<\/li>\n\n\n\n<li>\u586b\u5199\u76d1\u63a7\u540d\u79f0\u3001\u76ee\u6807 URL\u200b<\/li>\n\n\n\n<li>\u8bbe\u7f6e\u68c0\u6d4b\u95f4\u9694\uff08\u9ed8\u8ba4 60 \u79d2\uff0c\u53ef\u6839\u636e\u9700\u6c42\u8c03\u6574\uff09\u200b<\/li>\n\n\n\n<li>\u914d\u7f6e\u91cd\u8bd5\u6b21\u6570\u4e0e\u8d85\u65f6\u65f6\u95f4\u200b<\/li>\n\n\n\n<li>\u52fe\u9009\u544a\u8b66\u901a\u77e5\u65b9\u5f0f\uff08\u9700\u5148\u5728\u300c\u8bbe\u7f6e \u2192 \u901a\u77e5\u300d\u4e2d\u6dfb\u52a0\u6e20\u9053\uff09\u200b<\/li>\n\n\n\n<li>\u70b9\u51fb\u300c\u4fdd\u5b58\u300d\uff0c\u76d1\u63a7\u7acb\u5373\u751f\u6548<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">5.3 \u914d\u7f6e\u544a\u8b66\u901a\u77e5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Uptime Kuma \u652f\u6301\u8fd1 50 \u79cd\u901a\u77e5\u6e20\u9053\uff0c\u4ee5 Telegram \u4e3a\u4f8b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5411 @BotFather \u53d1\u9001 \u00a0<code>\/newbot<\/code>\u00a0 \u521b\u5efa\u673a\u5668\u4eba\uff0c\u83b7\u53d6 Bot Token\u200b<\/li>\n\n\n\n<li>\u5411 @userinfobot \u53d1\u9001\u4efb\u610f\u6d88\u606f\uff0c\u83b7\u53d6\u81ea\u5df1\u7684 Chat ID\u200b<\/li>\n\n\n\n<li>\u5728 Uptime Kuma \u540e\u53f0\u300c\u8bbe\u7f6e \u2192 \u901a\u77e5 \u2192 \u6dfb\u52a0\u901a\u77e5\u300d\uff0c\u9009\u62e9\u300cTelegram\u300d\u200b<\/li>\n\n\n\n<li>\u586b\u5165 Bot Token \u548c Chat ID\uff0c\u70b9\u51fb\u300c\u6d4b\u8bd5\u300d\uff0c\u6536\u5230\u6d88\u606f\u5373\u914d\u7f6e\u6210\u529f<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">5.4 \u521b\u5efa\u516c\u5f00\u72b6\u6001\u9875<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u70b9\u51fb\u5de6\u4fa7\u300c\u72b6\u6001\u9875 \u2192 \u65b0\u5efa\u72b6\u6001\u9875\u300d\uff0c\u81ea\u5b9a\u4e49\u6807\u9898\u3001\u57df\u540d\u3001\u8981\u5c55\u793a\u7684\u76d1\u63a7\u9879\uff0c\u4fdd\u5b58\u540e\u5373\u53ef\u751f\u6210\u516c\u5f00\u53ef\u8bbf\u95ee\u7684\u72b6\u6001\u9875\u9762\uff0c\u5bf9\u5916\u5c55\u793a\u670d\u52a1\u53ef\u7528\u6027\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u8fdb\u9636\u914d\u7f6e<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">6.1 Nginx \u53cd\u5411\u4ee3\u7406 + \u57df\u540d + HTTPS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u76f4\u63a5\u7528 IP+\u7aef\u53e3\u8bbf\u95ee\u4e0d\u591f\u4f18\u96c5\uff0c\u5efa\u8bae\u7ed1\u5b9a\u57df\u540d\u5e76\u914d\u7f6e HTTPS\u3002\u5047\u8bbe\u57df\u540d\u4e3a \u00a0<code>status.example.com<\/code>\u00a0\uff0c\u914d\u7f6e\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>server {\n    listen 80;\n    server_name status.example.com;\n    return 301 https:\/\/$host$request_uri;\n}\n\nserver {\n    listen 443 ssl http2;\n    server_name status.example.com;\n\n    ssl_certificate \/path\/to\/fullchain.pem;\n    ssl_certificate_key \/path\/to\/privkey.pem;\n\n    location \/ {\n        proxy_pass http:\/\/127.0.0.1:3001;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        \n        # \u5fc5\u987b\u914d\u7f6e WebSocket \u652f\u6301\uff0c\u5426\u5219\u9875\u9762\u4f1a\u65ad\u5f00\u8fde\u63a5\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n    }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F97583\">server<\/span><span style=\"color: #E1E4E8\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">   <\/span><span style=\"color: #F97583\"> listen <\/span><span style=\"color: #E1E4E8\">80;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">   <\/span><span style=\"color: #F97583\"> server_name <\/span><span style=\"color: #E1E4E8\">status.example.com;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">return<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">301<\/span><span style=\"color: #E1E4E8\"> https:\/\/$host$request_uri;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F97583\">server<\/span><span style=\"color: #E1E4E8\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">   <\/span><span style=\"color: #F97583\"> listen <\/span><span style=\"color: #E1E4E8\">443 ssl http2;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">   <\/span><span style=\"color: #F97583\"> server_name <\/span><span style=\"color: #E1E4E8\">status.example.com;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">   <\/span><span style=\"color: #F97583\"> ssl_certificate <\/span><span style=\"color: #E1E4E8\">\/path\/to\/fullchain.pem;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">   <\/span><span style=\"color: #F97583\"> ssl_certificate_key <\/span><span style=\"color: #E1E4E8\">\/path\/to\/privkey.pem;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #F97583\">location<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">\/ <\/span><span style=\"color: #E1E4E8\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">       <\/span><span style=\"color: #F97583\"> proxy_pass <\/span><span style=\"color: #E1E4E8\">http:\/\/127.0.0.1:3001;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">       <\/span><span style=\"color: #F97583\"> proxy_set_header <\/span><span style=\"color: #E1E4E8\">Host $host;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">       <\/span><span style=\"color: #F97583\"> proxy_set_header <\/span><span style=\"color: #E1E4E8\">X-Real-IP $remote_addr;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">       <\/span><span style=\"color: #F97583\"> proxy_set_header <\/span><span style=\"color: #E1E4E8\">X-Forwarded-For $proxy_add_x_forwarded_for;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">       <\/span><span style=\"color: #F97583\"> proxy_set_header <\/span><span style=\"color: #E1E4E8\">X-Forwarded-Proto $scheme;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">        <\/span><span style=\"color: #6A737D\"># \u5fc5\u987b\u914d\u7f6e WebSocket \u652f\u6301\uff0c\u5426\u5219\u9875\u9762\u4f1a\u65ad\u5f00\u8fde\u63a5<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">       <\/span><span style=\"color: #F97583\"> proxy_set_header <\/span><span style=\"color: #E1E4E8\">Upgrade $http_upgrade;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">       <\/span><span style=\"color: #F97583\"> proxy_set_header <\/span><span style=\"color: #E1E4E8\">Connection <\/span><span style=\"color: #9ECBFF\">&quot;upgrade&quot;<\/span><span style=\"color: #E1E4E8\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">}<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Nginx<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bc1\u4e66\u53ef\u4f7f\u7528 Certbot \u4e00\u952e\u7533\u8bf7\u514d\u8d39 Let's Encrypt \u8bc1\u4e66\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>apt install -y certbot python3-certbot-nginx\ncertbot --nginx -d status.example.com<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">apt<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">certbot<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">python3-certbot-nginx<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">certbot<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--nginx<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">status.example.com<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6.2 \u670d\u52a1\u66f4\u65b0\u65b9\u6cd5<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Docker Compose \u65b9\u5f0f<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd \/opt\/uptime-kuma\ndocker compose pull\ndocker compose up -d<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/opt\/uptime-kuma<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">pull<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">up<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u624b\u52a8 Node.js \u65b9\u5f0f<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cd \/opt\/uptime-kuma\ngit pull\nnpm run setup\nsystemctl restart uptime-kuma<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">cd<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/opt\/uptime-kuma<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">git<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">pull<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">npm<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">run<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">setup<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">restart<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">uptime-kuma<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6.3 \u6570\u636e\u5907\u4efd<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Uptime Kuma \u7684\u6240\u6709\u6570\u636e\uff08\u76d1\u63a7\u914d\u7f6e\u3001\u7528\u6237\u4fe1\u606f\u3001\u5386\u53f2\u8bb0\u5f55\uff09\u90fd\u5b58\u50a8\u5728 \u00a0<code>data<\/code>\u00a0 \u76ee\u5f55\u4e2d\uff0c\u5b9a\u671f\u5907\u4efd\u8be5\u76ee\u5f55\u5373\u53ef\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro padding-bottom-disabled cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly># \u5907\u4efd\u547d\u4ee4\u793a\u4f8b\ntar -zcvf uptime-kuma-backup-$(date +%Y%m%d).tar.gz \/opt\/uptime-kuma\/data<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A737D\"># \u5907\u4efd\u547d\u4ee4\u793a\u4f8b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">tar<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-zcvf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">uptime-kuma-backup-$(<\/span><span style=\"color: #B392F0\">date<\/span><span style=\"color: #9ECBFF\"> +%Y%m%d).tar.gz<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/opt\/uptime-kuma\/data<\/span><\/span><\/code><\/pre><span style=\"display:flex;align-items:flex-end;padding:10px;width:100%;justify-content:flex-end;background-color:#24292e;color:#d3d7dd;font-size:12px;line-height:1;position:relative\">Bash<\/span><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e03\u3001\u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/h2>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<ol class=\"wp-block-list\">\n<li>1.\u00a0\u65e0\u6cd5\u8bbf\u95ee\u9875\u9762\u200b\n<ul class=\"wp-block-list\">\n<li>\u68c0\u67e5\u670d\u52a1\u5668\u9632\u706b\u5899\u3001\u4e91\u670d\u52a1\u5546\u5b89\u5168\u7ec4\u662f\u5426\u5f00\u653e 3001 \u7aef\u53e3\u200b<\/li>\n\n\n\n<li>\u6267\u884c \u00a0<code>docker ps<\/code>\u00a0 \u786e\u8ba4\u5bb9\u5668\u6b63\u5e38\u8fd0\u884c\u200b<\/li>\n\n\n\n<li>\u67e5\u770b\u5bb9\u5668\u65e5\u5fd7\uff1a\u00a0<code>docker logs uptime-kuma<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u200b\u53cd\u5411\u4ee3\u7406\u540e\u9875\u9762\u63d0\u793a\u8fde\u63a5\u65ad\u5f00\u200b\n<ul class=\"wp-block-list\">\n<li>99% \u662f Nginx \u672a\u914d\u7f6e WebSocket \u5347\u7ea7\u5934\uff0c\u68c0\u67e5 \u00a0<code>Upgrade<\/code>\u00a0 \u548c \u00a0<code>Connection<\/code>\u00a0 \u914d\u7f6e\u200b<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u5fd8\u8bb0\u7ba1\u7406\u5458\u5bc6\u7801\u200b\n<ul class=\"wp-block-list\">\n<li>Docker \u65b9\u5f0f\uff1a\u00a0<code>docker exec -it uptime-kuma npm run reset-passwor<\/code>d<\/li>\n\n\n\n<li>\u624b\u52a8\u65b9\u5f0f\uff1a\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\u6267\u884c \u00a0<code>npm run reset-password<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u76d1\u63a7\u4e00\u76f4\u663e\u793a\u79bb\u7ebf\u4f46\u670d\u52a1\u6b63\u5e38\u200b\n<ul class=\"wp-block-list\">\n<li>\u68c0\u67e5\u670d\u52a1\u5668\u7f51\u7edc\u662f\u5426\u80fd\u8bbf\u95ee\u76ee\u6807\u5730\u5740\u200b- \u5c1d\u8bd5\u8c03\u6574\u8d85\u65f6\u65f6\u95f4\uff0c\u6216\u5173\u95ed HTTPS \u8bc1\u4e66\u9a8c\u8bc1\uff08\u4ec5\u6d4b\u8bd5\u7528\uff09<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u5199\u5728\u6700\u540e<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Uptime Kuma \u7684\u4f18\u52bf\u4e0d\u4ec5\u5728\u4e8e\u529f\u80fd\u5168\u9762\uff0c\u66f4\u5728\u4e8e\u8f7b\u91cf\u5316\u548c\u9ad8\u5ea6\u53ef\u5b9a\u5236\u3002\u65e0\u8bba\u662f\u4e2a\u4eba\u7ad9\u957f\u76d1\u63a7\u51e0\u4e2a\u7ad9\u70b9\uff0c\u8fd8\u662f\u56e2\u961f\u76d1\u63a7\u6570\u5341\u4e2a\u670d\u52a1\uff0c\u5b83\u90fd\u80fd\u5f88\u597d\u5730\u80dc\u4efb\u3002\u914d\u5408\u516c\u5f00\u72b6\u6001\u9875\uff0c\u8fd8\u80fd\u5411\u7528\u6237\u900f\u660e\u5c55\u793a\u670d\u52a1\u53ef\u7528\u6027\uff0c\u63d0\u5347\u4fe1\u4efb\u611f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u90e8\u7f72\u5b8c\u6210\u540e\uff0c\u5efa\u8bae\u642d\u914d\u90ae\u4ef6 + \u5373\u65f6\u901a\u8baf\u5de5\u5177\u7684\u53cc\u901a\u9053\u544a\u8b66\uff0c\u786e\u4fdd\u670d\u52a1\u5f02\u5e38\u65f6\u80fd\u7b2c\u4e00\u65f6\u95f4\u6536\u5230\u901a\u77e5\u3002\u5982\u679c\u6709\u66f4\u591a\u76d1\u63a7\u8282\u70b9\u9700\u6c42\uff0c\u8fd8\u53ef\u4ee5\u90e8\u7f72\u591a\u5b9e\u4f8b\u5b9e\u73b0\u5206\u5e03\u5f0f\u76d1\u63a7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u60f3\u6446\u8131\u7b2c\u4e09\u65b9\u76d1\u63a7\u7684\u989d\u5ea6\u9650\u5236\u4e0e\u6570\u636e\u7126\u8651\uff1fUptime Kuma \u5f00\u6e90\u81ea\u6258\u7ba1\uff0c\u652f\u6301\u591a\u7c7b\u578b\u76d1\u63a7\u3001\u6570\u5341\u79cd\u544a\u8b66\u548c\u516c\u5f00\u72b6\u6001\u9875\u3002\u672c\u6587\u4ece\u96f6\u8bb2\u900f\u4e09\u79cd\u5b89\u88c5\u3001\u53cd\u5411\u4ee3\u7406\u3001\u5907\u4efd\u4e0e\u6392\u9519\uff0c512MB \u5185\u5b58\u5373\u53ef\u8fd0\u884c\u3002","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[31],"tags":[36,35],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-31","tag-uptime-kuma","tag-35"],"_links":{"self":[{"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":24,"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youutaku.cn\/index.php\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}