<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>PeerTube — Fediverse中文论坛</title>
        <link>https://fediverse.eu.org/</link>
        <pubDate>Mon, 08 Jun 2026 22:58:53 +0000</pubDate>
        <language>zh</language>
            <description>PeerTube — Fediverse中文论坛</description>
    <atom:link href="https://fediverse.eu.org/categories/peertube/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>搭建 PeerTube 一个去中心化的视频平台</title>
        <link>https://fediverse.eu.org/discussion/30/%E6%90%AD%E5%BB%BA-peertube-%E4%B8%80%E4%B8%AA%E5%8E%BB%E4%B8%AD%E5%BF%83%E5%8C%96%E7%9A%84%E8%A7%86%E9%A2%91%E5%B9%B3%E5%8F%B0</link>
        <pubDate>Sat, 30 Apr 2022 08:29:54 +0000</pubDate>
        <category>PeerTube</category>
        <dc:creator>SouthFox</dc:creator>
        <guid isPermaLink="false">30@/discussions</guid>
        <description><![CDATA[<h2 data-id="peertube">什么是 PeerTube？</h2>

<p><a rel="nofollow" href="/home/leaving?target=https%3A%2F%2Fviews.southfox.me%2Fw%2FkkGMgK9ZtnKfYAgnEtQxbv%3Fsubtitle%3Dzh">https://views.southfox.me/w/kkGMgK9ZtnKfYAgnEtQxbv?subtitle=zh</a></p>

<h2 data-id="n-a">搭建</h2>

<p>如果环境允许的话，还是推荐使用源码安装，毕竟使用 <code spellcheck="false" tabindex="0">Docker</code> 会产生一些小毛病……<br />
当然本教程依然用 <code spellcheck="false" tabindex="0">docker-compose</code> 进行安装（<br />
参考<a rel="nofollow" href="/home/leaving?target=https%3A%2F%2Fdocs.joinpeertube.org%2Finstall-docker">官方文档</a></p>

<ul><li>提前为实例地址申请好 <code spellcheck="false" tabindex="0">HTTPS</code> 证书待用</li>
<li>新建一个文件夹并进入 <code spellcheck="false" tabindex="0">cd /your/peertube/directory</code></li>
<li>获取 <code spellcheck="false" tabindex="0">docker-compose.yml</code> 文件</li>
</ul><pre spellcheck="false" tabindex="0">curl https://raw.githubusercontent.com/chocobozzz/PeerTube/master/support/docker/production/docker-compose.yml &gt; docker-compose.yml
</pre>

<ul><li>获取 <code spellcheck="false" tabindex="0">.env</code> 配置文件</li>
</ul><pre spellcheck="false" tabindex="0">curl https://raw.githubusercontent.com/Chocobozzz/PeerTube/master/support/docker/production/.env &gt; .env
</pre>

<ul><li>如果机子打算安装其他服务（即宿主机 <code spellcheck="false" tabindex="0">80</code> <code spellcheck="false" tabindex="0">443</code> 端口已被占用），那么就修改 <code spellcheck="false" tabindex="0">docker-compose.yml</code> 文件使用宿主机的 <code spellcheck="false" tabindex="0">Web</code> 程序进行反代（本教程使用的 <code spellcheck="false" tabindex="0">Web</code> 程序为 <code spellcheck="false" tabindex="0">nginx</code>）</li>
</ul><pre spellcheck="false" tabindex="0">version: "3.3"

services:

  # You can comment this webserver section if you want to use another webserver/proxy
  #webserver:
  #  image: chocobozzz/peertube-webserver:latest
    # If you don't want to use the official image and build one from sources:
    # build:
    #   context: .
    #   dockerfile: Dockerfile.nginx
    #env_file:
    #  - .env
    #ports:
    # - "80:80"
    # - "443:443"
    #volumes:
    #  - type: bind
        # Switch sources if you downloaded the whole repository
        #source: ../../nginx/peertube
     #   source: ./docker-volume/nginx/peertube
     #   target: /etc/nginx/conf.d/peertube.template
     # - assets:/var/www/peertube/peertube-latest/client/dist:ro
     # - ./docker-volume/data:/var/www/peertube/storage
     # - certbot-www:/var/www/certbot
     # - ./docker-volume/certbot/conf:/etc/letsencrypt
    #depends_on:
    #  - peertube
    #restart: "always"

  # You can comment this certbot section if you want to use another webserver/proxy
  #certbot:
  #  container_name: certbot
  #  image: certbot/certbot
  #  volumes:
  #    - ./docker-volume/certbot/conf:/etc/letsencrypt
  #    - certbot-www:/var/www/certbot
  #  restart: unless-stopped
  #  entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h &amp; wait $${!}; done;"
  #  depends_on:
  #    - webserver

  peertube:
    # If you don't want to use the official image and build one from sources:
    # build:
    #   context: .
    #   dockerfile: ./support/docker/production/Dockerfile.bullseye
    image: chocobozzz/peertube:production-bullseye
    # Use a static IP for this container because nginx does not handle proxy host change without reload
    # This container could be restarted on crash or until the postgresql database is ready for connection
    networks:
      default:
        ipv4_address: 172.20.0.42 #官方配置给出的地址可能会被占用
    env_file:
      - .env
    ports:
     #- "1935:1935" # If you don't want to use the live feature, you can comment this line
     - "127.0.0.1:9000:9000" # If you provide your own webserver and reverse-proxy, otherwise not suitable for production
    volumes:
      - assets:/app/client/dist
      - ./docker-volume/data:/data
      - ./docker-volume/config:/config
    depends_on:
      - postgres
      - redis
      - postfix
    restart: "always"

...

</pre>

<p>着重修改 <code spellcheck="false" tabindex="0">webserver</code>, <code spellcheck="false" tabindex="0">certbot</code>, <code spellcheck="false" tabindex="0">peertube</code> 这几项,</p>
]]>
        </description>
    </item>
   </channel>
</rss>
