User Tools


server:peertube

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

server:peertube [2025/06/18 09:30] – created marlonivoserver:peertube [2025/08/24 07:39] (current) marlonivo
Line 1: Line 1:
-1. Systemvorbereitung+====== PeerTube Installation ======
  
-    Alle nötigen Pakete installieren:+===== 1. System preparation =====
  
 +Install all required packages:
 +
 +<code bash>
 apt install -y curl sudo unzip vim ffmpeg postgresql postgresql-contrib g++ make redis-server git python-dev cron wget apt install -y curl sudo unzip vim ffmpeg postgresql postgresql-contrib g++ make redis-server git python-dev cron wget
 +</code>
  
-    PostgreSQL und Redis starten:+Start PostgreSQL and Redis:
  
 +<code bash>
 systemctl start postgresql redis systemctl start postgresql redis
 +</code>
  
-2. Node.js & Yarn Installation +===== 2. Node.js & Yarn installation =====
- +
-Deine Anleitung sagt, Node.js 14 wird benötigt, aber PeerTube 7.2.1 (neuere Version) benötigt Node.js >20.+
  
-Deshalb musst du Node.js 20 installieren (statt 14)um das Problem mit dem inkompatiblen Node.js zu beheben.+Your guide says Node.js 14 is neededbut PeerTube 7.2.1 (newer version) requires Node.js >= 20.
  
-So installierst du Node.js 20 und yarn:+So you must install Node.js 20 (instead of 14) to fix the incompatibility.
  
 +<code bash>
 curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
 sudo apt install -y nodejs sudo apt install -y nodejs
 npm install --global yarn npm install --global yarn
 +</code>
  
-Danach:+Check versions:
  
-node -v  sollte v20.x.x oder höher anzeigen+<code bash> 
 +node -v   should show v20.x.x or higher
 yarn -v yarn -v
 +</code>
  
-3. PeerTube Benutzer anlegen+===== 3. Create PeerTube user =====
  
 +<code bash>
 useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube
 +</code>
  
-4. PostgreSQL Datenbank und Nutzer einrichten+===== 4. Set up PostgreSQL database and user =====
  
 +<code bash>
 su -l postgres su -l postgres
-createuser -P peertube          # Passwort merken!+createuser -P peertube          # remember the password!
 createdb -O peertube -E UTF8 -T template0 peertube_prod createdb -O peertube -E UTF8 -T template0 peertube_prod
 psql -c "CREATE EXTENSION pg_trgm;" peertube_prod psql -c "CREATE EXTENSION pg_trgm;" peertube_prod
 psql -c "CREATE EXTENSION unaccent;" peertube_prod psql -c "CREATE EXTENSION unaccent;" peertube_prod
 exit exit
 +</code>
  
-5. PeerTube Verzeichnisse erstellen+===== 5. Create PeerTube directories =====
  
 +<code bash>
 su -l peertube su -l peertube
 mkdir config storage versions mkdir config storage versions
 chmod 750 config chmod 750 config
 exit exit
 +</code>
  
-6. PeerTube herunterladen entpacken+===== 6. Download extract PeerTube =====
  
 +<code bash>
 su -l peertube su -l peertube
 VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4)
Line 55: Line 70:
 rm peertube-${VERSION}.zip rm peertube-${VERSION}.zip
 exit exit
 +</code>
  
-7. Yarn installieren (PeerTube Abhängigkeiten)+===== 7. Install Yarn dependencies =====
  
 +<code bash>
 su -l peertube su -l peertube
 cd /var/www/peertube cd /var/www/peertube
Line 64: Line 81:
 yarn install --production --pure-lockfile yarn install --production --pure-lockfile
 exit exit
 +</code>
  
-8. Konfiguration anpassen+===== 8. Adjust configuration =====
  
 +<code bash>
 su -l peertube su -l peertube
 cd /var/www/peertube cd /var/www/peertube
 cp peertube-latest/config/production.yaml.example config/production.yaml cp peertube-latest/config/production.yaml.example config/production.yaml
 vim config/production.yaml vim config/production.yaml
-Hier hostname, DatenbankAdmin-Mail, SMTP etc. eintragen (siehe Anleitung)+set hostname, databaseadmin email, SMTP etc.
 exit exit
 +</code>
  
-9. SSL Zertifikat mit Certbot holen+===== 9. Get SSL certificate with Certbot =====
  
-certbot --nginx -d dein.hostname.tld certonly+<code bash> 
 +certbot --nginx -d your.hostname.tld certonly 
 +</code>
  
-10. Nginx konfigurieren+===== 10. Configure Nginx =====
  
 +<code bash>
 cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube
-sed -i 's/${WEBSERVER_HOST}/dein.hostname.tld/g' /etc/nginx/sites-available/peertube+sed -i 's/${WEBSERVER_HOST}/your.hostname.tld/g' /etc/nginx/sites-available/peertube
 sed -i 's/${PEERTUBE_HOST}/127.0.0.1:9000/g' /etc/nginx/sites-available/peertube sed -i 's/${PEERTUBE_HOST}/127.0.0.1:9000/g' /etc/nginx/sites-available/peertube
 ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
 systemctl reload nginx systemctl reload nginx
 +</code>
  
-11. PeerTube als Service starten+===== 11. Start PeerTube as a service =====
  
 +<code bash>
 cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/ cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/
 systemctl daemon-reload systemctl daemon-reload
 systemctl start peertube systemctl start peertube
-systemctl status peertube  prüfen, ob es läuft+systemctl status peertube   check if running 
 +</code>
  
-12. Admin-Passwort setzen+===== 12. Set admin password =====
  
 +<code bash>
 su -l peertube su -l peertube
 cd /var/www/peertube/peertube-latest cd /var/www/peertube/peertube-latest
 NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root
 exit exit
 +</code>
 +