{"id":778,"date":"2025-05-31T17:44:24","date_gmt":"2025-05-31T09:44:24","guid":{"rendered":"https:\/\/www.zhzxs.xyz\/?p=778"},"modified":"2025-09-08T19:20:59","modified_gmt":"2025-09-08T11:20:59","slug":"1748684618","status":"publish","type":"post","link":"https:\/\/www.zhzxs.site\/index.php\/2025\/05\/31\/1748684618\/","title":{"rendered":"\ud83d\udcda \u4f7f\u7528 Docker \u5b89\u88c5\u90e8\u7f72 Calibre Web"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\ude80 \u4f7f\u7528 Docker \u5feb\u901f\u90e8\u7f72 Calibre Web<\/h1>\n\n\n\n<p><strong>Calibre Web<\/strong> \u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7535\u5b50\u4e66\u7ba1\u7406\u548c\u5728\u7ebf\u9605\u8bfb\u5e73\u53f0\uff0c\u901a\u8fc7 Docker \u90e8\u7f72\u975e\u5e38\u4fbf\u6377\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff0c\u6559\u4f60\u5feb\u901f\u642d\u5efa\uff1a<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udf1f \u524d\u63d0\u6761\u4ef6<\/h2>\n\n\n\n<p>\u2705 \u670d\u52a1\u5668\u5df2\u5b89\u88c5 <strong>Docker \u548c Docker Compose<\/strong><br>\u2705 \u5df2\u6709\u4e00\u4e2a <strong>Calibre \u7535\u5b50\u4e66\u5e93<\/strong>\uff08\u6216\u65b0\u5efa\u7a7a\u5e93\uff09<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1\ufe0f\u20e3 \u521b\u5efa\u6570\u636e\u76ee\u5f55<\/h2>\n\n\n\n<p>\u4ee5 <code>\/docker\/calibre-web<\/code> \u4e3a\u4f8b\uff0c\u5b58\u653e\u914d\u7f6e\u6587\u4ef6\u548c\u4e66\u5e93\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/docker\/calibre-web\/config\nmkdir -p \/docker\/calibre-web\/library\n<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u5df2\u6709\u4e66\u5e93\uff08\u4f8b\u5982 <code>\/data\/calibre-library<\/code>\uff09\uff0c\u53ef\u76f4\u63a5\u5c06\u5176\u6302\u8f7d\u5230\u5bb9\u5668\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2\ufe0f\u20e3 \u521b\u5efa Docker Compose \u6587\u4ef6\uff08\u63a8\u8350\uff09<\/h2>\n\n\n\n<p>\u5728 <code>\/docker\/calibre-web<\/code> \u76ee\u5f55\u4e0b\u521b\u5efa <code>docker-compose.yml<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>version: \"3\"\nservices:\n  calibre-web:\n    image: lscr.io\/linuxserver\/calibre-web:latest\n    container_name: calibre-web\n    environment:\n      - PUID=0\n      - PGID=0\n      - TZ=Asia\/Shanghai\n      - DOCKER_MODS=linuxserver\/mods:universal-calibre #optional\n      - OAUTHLIB_RELAX_TOKEN_SCOPE=1 #optional\n    volumes:\n      - .\/config:\/config\n      - .\/library:\/books\n    ports:\n      - 18083:8083\n    restart: unless-stopped<\/code><\/pre>\n\n\n\n<p>\u8fd0\u884c\u5bb9\u5668\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udca1 \u4e0b\u8f7d\u521d\u59cb\u5316\u7684 <code>calibre.db<\/code> \u6570\u636e\u5e93\u6587\u4ef6\uff08\u91cd\u8981\uff09\uff1a<br>\ud83d\udc49 <a href=\"https:\/\/cloud.zhzxs.site\/s\/cYMWpMWyFmjCkkk\">\u70b9\u51fb\u4e0b\u8f7d calibre db<\/a><br>\u653e\u5230 <code>\/docker\/calibre-web\/library<\/code> \u4e0b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3\ufe0f\u20e3 \u8bbf\u95ee\u548c\u767b\u5f55<\/h2>\n\n\n\n<p>\u6d4f\u89c8\u5668\u8bbf\u95ee\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;\u4f60\u7684\u670d\u52a1\u5668IP:8083\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udd11 <strong>\u9ed8\u8ba4\u7528\u6237\u540d<\/strong>\uff1a<code>admin<\/code><br>\ud83d\udd11 <strong>\u9ed8\u8ba4\u5bc6\u7801<\/strong>\uff1a<code>admin123<\/code>\uff08\u767b\u5f55\u540e\u53ef\u4fee\u6539\uff09<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4\ufe0f\u20e3 \u914d\u7f6e\u4e66\u5e93\u8def\u5f84<\/h2>\n\n\n\n<p>\u767b\u5f55\u540e\u8fdb\u5165\u8bbe\u7f6e\uff0c\u5c06\u4e66\u5e93\u8def\u5f84\u8bbe\u7f6e\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/books\n<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u5df2\u6709 Calibre \u6570\u636e\u5e93\uff0c\u76f4\u63a5\u6302\u8f7d\u8def\u5f84\u5373\u53ef\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83c\udf10 \u53ef\u9009\uff1a\u914d\u7f6e Nginx \u53cd\u5411\u4ee3\u7406\uff08\u542b HTTPS\uff09<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udcdd 1. \u521b\u5efa Nginx \u914d\u7f6e\u6587\u4ef6<\/h3>\n\n\n\n<p>\u8def\u5f84\uff1a<code>\/etc\/nginx\/sites-available\/calibre-web.conf<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80;\n    server_name calibre.yourdomain.com;  # \u66ff\u6362\u4e3a\u4f60\u7684\u57df\u540d\n\n    # HTTP \u8df3\u8f6c\u5230 HTTPS\uff08\u5982\u6709\u8bc1\u4e66\uff09\n    # return 301 https:\/\/$host$request_uri;\n\n    location \/ {\n        proxy_pass http:\/\/127.0.0.1:8083;\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        proxy_read_timeout 90;\n        proxy_connect_timeout 90;\n    }\n\n    access_log \/var\/log\/nginx\/calibre-web_access.log;\n    error_log \/var\/log\/nginx\/calibre-web_error.log;\n}\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udfc3 2. \u542f\u7528\u7ad9\u70b9\u5e76\u91cd\u8f7d Nginx<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ln -s \/etc\/nginx\/sites-available\/calibre-web.conf \/etc\/nginx\/sites-enabled\/\nsudo nginx -t\nsudo systemctl reload nginx\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd12 3. \u914d\u7f6e HTTPS \u8bc1\u4e66\uff08\u4f7f\u7528 Certbot\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo certbot --nginx -d calibre.yourdomain.com\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcf1 \u624b\u673a\u9605\u8bfb\u652f\u6301<\/h2>\n\n\n\n<p>\u914d\u5408\u4ee5\u4e0b\u5e94\u7528\uff0c\u53ef\u5728\u624b\u673a\u4e0a\u5b9e\u73b0\u5728\u7ebf\u9605\u8bfb\u548c\u6717\u8bfb\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/moondownload.com\/\">Moon+ Reader<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/jing332\/tts-server-android\">TTS Server for Android<\/a><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u603b\u7ed3\u6b65\u9aa4<\/h2>\n\n\n\n<p>1\ufe0f\u20e3 \u51c6\u5907\u76ee\u5f55\uff08config \u548c library\uff09<br>2\ufe0f\u20e3 \u4f7f\u7528 Docker Compose \u542f\u52a8\u5bb9\u5668<br>3\ufe0f\u20e3 \u6d4f\u89c8\u5668\u8bbf\u95ee <code>http:\/\/IP:8083<\/code> \u767b\u5f55\u548c\u7ba1\u7406<br>4\ufe0f\u20e3 \uff08\u53ef\u9009\uff09Nginx \u53cd\u5411\u4ee3\u7406\u53ca HTTPS<br>5\ufe0f\u20e3 \uff08\u53ef\u9009\uff09\u624b\u673a\u642d\u914d Moon+ Reader \u548c TTS Server \u4f7f\u7528<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\ude80 \u4f7f\u7528 Docker \u5feb\u901f\u90e8\u7f72 Calibre Web Calibre Web \u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7535\u5b50\u4e66\u7ba1\u7406\u548c\u5728\u7ebf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":104,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[153,52],"class_list":["post-778","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-2","tag-calibre-web","tag-52"],"_links":{"self":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/comments?post=778"}],"version-history":[{"count":12,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/778\/revisions"}],"predecessor-version":[{"id":840,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/778\/revisions\/840"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/media\/104"}],"wp:attachment":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/media?parent=778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/categories?post=778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/tags?post=778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}