summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2021-07-29 10:43:37 -0400
committerLuke Smith <luke@lukesmith.xyz>2021-07-29 10:43:37 -0400
commit44da736b021b30bc6a8aa91700e4ba46f326fdfb (patch)
tree58837ff255316f93aa7c38c79c9ffd3ca6af28c4
parentb2bcf9854e4562865134ce6265240e131c796cd8 (diff)
parent2850cb7954833f2c6eb1febeaa91a4026ad09b3d (diff)
Merge branch 'diamonop1234-master'
-rw-r--r--cgi.html2
-rw-r--r--git.html2
-rw-r--r--index.html2
-rw-r--r--nextcloud.html4
-rw-r--r--peertube.html198
-rw-r--r--pix/peertube-login.jpgbin0 -> 76446 bytes
-rw-r--r--pix/peertube.svg118
-rw-r--r--rss.xml6
8 files changed, 322 insertions, 10 deletions
diff --git a/cgi.html b/cgi.html
index f54d547..ef1526a 100644
--- a/cgi.html
+++ b/cgi.html
@@ -260,7 +260,7 @@ end</code></pre>
<h2>Contribution</h2>
<ul>
<li>Martin Chrzanowski -- <a
- href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/crypto.html">donate</a></li>
+ href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/donate.html">donate</a></li>
</ul>
</main>
<footer><a href="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><a href="index.html"><li><img src="pix/chad.gif" alt="chad"></li></a><a href="rss.xml"><li><img src="pix/rss.svg" alt="RSS"></li></a><a href="pix/btc.png"><li><img src="pix/btc.svg" alt="BTC"></li></a><a href="pix/xmr.png"><li><img src="pix/xmr.svg" alt="XMR"></li></a><a href="https://github.com/lukesmithxyz/landchad"><li><img src="pix/git.svg" alt="Github"></li></a></footer>
diff --git a/git.html b/git.html
index 951e8d1..67ea0a3 100644
--- a/git.html
+++ b/git.html
@@ -182,7 +182,7 @@ mkdir git</code></pre>
<h2>Contribution</h2>
<ul>
<li>Martin Chrzanowski -- <a
- href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/crypto.html">donate</a></li>
+ href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/donate.html">donate</a></li>
</ul>
</main>
<footer><a href="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><a href="index.html"><li><img src="pix/chad.gif" alt="chad"></li></a><a href="rss.xml"><li><img src="pix/rss.svg" alt="RSS"></li></a><a href="pix/btc.png"><li><img src="pix/btc.svg" alt="BTC"></li></a><a href="pix/xmr.png"><li><img src="pix/xmr.svg" alt="XMR"></li></a><a href="https://github.com/lukesmithxyz/landchad"><li><img src="pix/git.svg" alt="Github"></li></a></footer>
diff --git a/index.html b/index.html
index 8441d6c..5f1f203 100644
--- a/index.html
+++ b/index.html
@@ -64,6 +64,7 @@
<li><a href="git.html">Host your own <img src="pix/git.svg"><code>git</code> repositories</a></li>
<li><a href="xmpp.html">Private and Encrypted Chat with <img src="pix/xmpp.svg" alt="xmpp logo">XMPP</a></li>
<li><a href="pleroma.html">Pleroma, a federated Twitter-like Microblogging Site</a></li>
+ <li><a href="peertube.html"><img src="pix/peertube.svg" alt="peertube logo">PeerTube, a federated YouTube-like video Site</a></li>
<li><a href="nextcloud.html">Setting up a <img src="pix/nextcloud.svg">Nextcloud Instance (file hosting and more)</a></li>
<li><a href="gitea.html">Setting up <img src="pix/gitea.svg">Gitea</a></li>
<li><a href="irc.html">Creating your own chat server with <img src="pix/irc.svg">IRC</a></li>
@@ -112,7 +113,6 @@
<li>Email webclients</li>
<li>Simple static site generators</li>
<li>Calibre (library server)</li>
- <li><a href="https://joinpeertube.org/">PeerTube</a> (like YouTube)</li>
<li><a href="https://www.ejabberd.im/">XMPP ejabberd</a></li>
<li><a href="https://movim.eu/">Movim for XMPP</a></li>
</ul>
diff --git a/nextcloud.html b/nextcloud.html
index 2ba4472..a49b93e 100644
--- a/nextcloud.html
+++ b/nextcloud.html
@@ -52,9 +52,7 @@ server {
listen [::]:80;
server_name <strong>yourwebsite.com</strong>;
- location /nextcloud {
- return 301 https://$server_name$request_uri;
- }
+ return 301 https://$server_name$request_uri;
}
server {
diff --git a/peertube.html b/peertube.html
new file mode 100644
index 0000000..e38a2ba
--- /dev/null
+++ b/peertube.html
@@ -0,0 +1,198 @@
+<!DOCTYPE html>
+<html lang=en>
+ <head>
+ <title>PeerTube Instance &ndash; LandChad.net</title>
+ <meta charset="utf-8"/>
+ <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
+ <link rel='stylesheet' type='text/css' href='style.css'>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel='alternate' type='application/rss+xml' title='Land Chad RSS' href='/rss.xml'>
+ </head>
+<body>
+ <header><h1>PeerTube Instance</h1></header>
+ <nav></nav>
+ <main>
+
+ <img class=titleimg src="pix/peertube.svg" alt="PeerTube logo">
+
+ <p>PeerTube is a self-hosted and (optionally) federated video sharing platform that saves bandwith on videos the more people watch.
+ PeerTube instances can follow each other to share videos and grow the federated network,
+ but you can always keep your instance to yourself if you choose to.</p>
+
+ <h2>Prerequisites</h2>
+
+ <p><strong>Most</strong> of PeerTube's dependencies can be installed with this command:</p>
+
+ <pre><code>apt install -y curl sudo unzip vim ffmpeg postgresql postgresql-contrib g++ make redis-server git python-dev cron wget</code></pre>
+
+ <p>It's also important to start all associated daemons:</p>
+
+ <pre><code>systemctl start postgresql redis</code></pre>
+
+ <p>PeerTube also requires <strong>NodeJS 14</strong> and <strong>yarn</strong> which cannot be installed from the Debian repositories. This means they have to be installed from separate, external repos:</p>
+
+ <pre><code>curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
+apt install -y nodejs
+npm install --global yarn</code></pre>
+
+ <p>In addition to these dependencies, it's recommended to create a dedicated PeerTube user to install and manage PeerTube.</p>
+
+ <pre><code>useradd -m -d /var/www/peertube -s /bin/bash -p peertube peertube</code></pre>
+
+ <h2>Database</h2>
+
+ <p>PeerTube requires a PostgreSQL database to function. To create it, first make a new Postgres user named PeerTube:</p>
+
+ <pre><code>su postgres
+createuser -P peertube
+createdb -O peertube -E UTF8 -T template0 peertube_prod
+psql -c "CREATE EXTENSION pg_trgm;" peertube_prod
+psql -c "CREATE EXTENSION unaccent;" peertube_prod
+exit</code></pre>
+
+ <p>Be sure to <strong>make note of your Postgres user password,</strong> as it will be needed later when setting up PeerTube.</p>
+
+ <h2>Installation</h2>
+
+ <p>This handy one-liner can be used to determine the latest PeerTube version:</p>
+
+ <pre><code>VERSION=$(curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4) && echo "Latest Peertube version is $VERSION"</code></pre>
+
+ <p>Next, a basic directory structure needs to be setup in the PeerTube user's home directory (/var/www/peertube).</p>
+
+ <p>To ensure permissions remain the same while managing files as PeerTube, <code>sudo</code> can be used to perform actions:</p>
+
+ <pre><code>sudo -u peertube mkdir config storage versions
+sudo -u peertube chmod 750 config</code></pre>
+
+ <p>Finally, a PeerTube release can be downloaded from the GitHub page and installed using yarn:</p>
+
+ <pre><code>cd versions
+sudo -u peertube ln -s versions/peertube-${VERSION} ./peertube-latest
+cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile</code></pre>
+
+ <h2>Configuration</h2>
+
+ <p>PeerTube's default config file can be copied over to <code>/var/www/peertube/config.production.yaml</code> so it can actually be used:</p>
+
+ <pre><code>cd /var/www/peertube
+ sudo -u peertube cp peertube-latest/production.yaml config/production.yaml</code></pre>
+
+ <p>Now the <code>production.yaml</code> file must be edited in the following ways:</p>
+
+ <p>First, add the hostname:</p>
+
+ <pre><code>webserver:
+ https: true
+ hostname: <strong>'example.org'</strong>
+ port: 443</code></pre>
+
+ <p>Then, the database:</p>
+
+ <pre><code>database:
+ hostname: 'localhost'
+ port: 5432
+ ssl: false
+ suffix: '_prod'
+ username: <strong>'peertube'</strong>
+ password: <strong>'your_password'</strong>
+ pool:
+ max: 5</code></pre>
+
+ <p>An email to generate the admin user:</p>
+
+ <pre><code>admin:
+ # Used to generate the root user at first startup
+ # And to receive emails from the contact form
+ email: <strong>'chad@example.org'</strong></code></pre>
+
+ <p>And <strong>optionally,</strong> email server information:</p>
+
+ <pre><code>smtp:
+ # smtp or sendmail
+ transport: smtp
+ # Path to sendmail command. Required if you use sendmail transport
+ sendmail: null
+ hostname: <strong>mail.example.org</strong>
+ port: 465 # If you use StartTLS: 587
+ username: <strong>your_email_username</strong>
+ password: <strong>your_email_password</strong>
+ tls: true # If you use StartTLS: false
+ disable_starttls: false
+ ca_file: null # Used for self signed certificates
+ from_address: <strong>'admin@example.org'</strong></code></pre>
+
+ <h2>NGINX</h2>
+
+ <p>PeerTube includes an NGINX configuration that can be copied over to <code>/etc/nginx/sites-available:</code>
+
+ <pre><code>cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube</code></pre>
+
+ <p>Because the PeerTube config is so long, it's recommended to use <code>sed</code> to modify the contents of the file,
+ replacing <code>${WEBSERVER_HOST}</code> with your hostname,
+ and <code>$(PEERTUBE_HOST)</code> with your localhost and port, which by default should be <code>127.0.0.1:9000</code>:
+
+ <pre><code>sed -i 's/${WEBSERVER_HOST}/<strong>example.org</strong>/g' /etc/nginx/sites-available/peertube
+sed -i 's/${PEERTUBE_HOST}/127.0.0.1:9000/g' /etc/nginx/sites-available/peertube</code></pre>
+
+ <p>Once you're happy with the NGINX config file, link it to <code>sites-enabled</code> to activate it:</p>
+
+ <pre><code>ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube</code></pre>
+
+ <h3>Encryption with Certbot</h3>
+
+ <p>It's <strong>highly recommended</strong> to generate certificates for use with your PeerTube site, and this can be easily done with Let's Encrypt's <code>certbot</code> command:</p>
+
+ <pre><code>systemctl stop nginx
+certbot certonly --standalone -d <strong>example.org</strong>
+sudo systemctl restart nginx</code></pre>
+
+ <p>The certificates are generated <strong>standalone</strong> since the PeerTube NGINX config file already includes configuration for certbot.</p>
+
+ <h2>Running PeerTube</h2>
+
+ <p>A config file for a systemd daemon is included in PeerTube and can be setup like so:</p>
+
+ <pre><code>cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/
+systemctl daemon-reload</code></pre>
+
+ <p>Now, finally, run the PeerTube daemon to start PeerTube:</p>
+
+ <pre><code>systemctl start peertube</pre></code>
+
+ <h2>Using PeerTube</h2>
+
+ <p>To set a password for your admin user, run:</p>
+
+ <pre><code>cd /var/www/peertube/peertube-latest &amp;&amp; NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root</code></pre>
+
+ <p>Login to your PeerTube instance using the admin email specified in your <code>production.yaml</code> file and the admin password you just set.</p>
+
+ <img src="pix/peertube-login.jpg" height=400px>
+
+ <p>Once logged in, it's recommended to create a separate user without admin privileges for uploading videos to PeerTube.
+ This can be done easily from the users tab in the administration section:</p>
+
+ <p>Enjoy your PeerTube instance!</p>
+
+ <hr>
+
+ <h2>Updating PeerTube</h2>
+
+ <p>PeerTube is constantly adding new features, so it's a good idea to <a href="https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md">check for new updates</a> and add them if you wish. Just in the past year, they have added livestreaming and more.</p>
+
+ <p>Updating is fairly easy now since an <code>upgrade.sh</code> script has been added. Just run:</p>
+
+ <pre><code>cd /var/www/peertube/peertube-latest/scripts &amp;&amp; sudo -H -u peertube ./upgrade.sh</code></pre>
+
+ <p>
+ Although check the <a href="https://github.com/Chocobozzz/PeerTube/blob/develop/CHANGELOG.md">changelog</a> to see if there are additional manual requirements for particular updates.
+ </p>
+
+ <hr>
+ <p><em>Written by <a href="https://denshi.live">Denshi.</a> Donate Monero <a href="https://denshi.live/donate.html">here</a> <a href="https://denshi.live/images/monero.png">[QR]</a></em></p>
+
+ </main>
+ <footer><a href="https://landchad.net">LandChad.net</a></br>Because Everyone should be an Internet LandChad.</br><a href="index.html"><li><img src="pix/chad.gif" alt="chad"></li></a><a href="rss.xml"><li><img src="pix/rss.svg" alt="RSS"></li></a><a href="pix/btc.png"><li><img src="pix/btc.svg" alt="BTC"></li></a><a href="pix/xmr.png"><li><img src="pix/xmr.svg" alt="XMR"></li></a><a href="https://github.com/lukesmithxyz/landchad"><li><img src="pix/git.svg" alt="Github"></li></a></footer>
+</body>
+</html>
diff --git a/pix/peertube-login.jpg b/pix/peertube-login.jpg
new file mode 100644
index 0000000..d191cc4
--- /dev/null
+++ b/pix/peertube-login.jpg
Binary files differ
diff --git a/pix/peertube.svg b/pix/peertube.svg
new file mode 100644
index 0000000..38992a5
--- /dev/null
+++ b/pix/peertube.svg
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ viewBox="2799 -911 16 22"
+ version="1.1"
+ id="svg13"
+ sodipodi:docname="logo.svg"
+ width="16"
+ height="22"
+ inkscape:version="0.92.2 5c3e80d, 2017-08-06">
+ <metadata
+ id="metadata17">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1916"
+ inkscape:window-height="1040"
+ id="namedview15"
+ showgrid="false"
+ inkscape:zoom="29.790476"
+ inkscape:cx="-1.1827326"
+ inkscape:cy="12.088"
+ inkscape:window-x="0"
+ inkscape:window-y="18"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg13" />
+ <defs
+ id="defs4">
+ <style
+ id="style2">
+ .cls-3 {
+ fill: #211f20;
+ }
+
+ .cls-4 {
+ fill: #737373;
+ }
+
+ .cls-5 {
+ fill: #f1680d;
+ }
+
+ .cls-6 {
+ fill: rgba(255, 255, 255, 0);
+ }
+ </style>
+ </defs>
+ <g
+ id="Artboard_1"
+ data-name="Artboard – 1"
+ class="cls-1"
+ transform="translate(0.03356777,-1.9929667)">
+ <g
+ id="Symbol_3_1"
+ data-name="Symbol 3 – 1"
+ transform="translate(2759,-975)">
+ <g
+ id="Group_44"
+ data-name="Group 44"
+ transform="translate(0,2.333)">
+ <path
+ id="Path_4"
+ data-name="Path 4"
+ class="cls-3"
+ d="m -949,-500 v 10.667 l 8,-5.333"
+ transform="translate(989,564)"
+ inkscape:connector-curvature="0"
+ style="fill:#211f20" />
+ <path
+ id="Path_5"
+ data-name="Path 5"
+ class="cls-4"
+ d="m -949,-500 v 10.667 l 8,-5.333"
+ transform="translate(989,574.667)"
+ inkscape:connector-curvature="0"
+ style="fill:#737373" />
+ <path
+ id="Path_6"
+ data-name="Path 6"
+ class="cls-5"
+ d="m -949,-500 v 10.667 l 8,-5.333"
+ transform="translate(997,569.333)"
+ inkscape:connector-curvature="0"
+ style="fill:#f1680d" />
+ <path
+ id="Path_7"
+ data-name="Path 7"
+ class="cls-6"
+ d="M 0,0 V 10.667 L 8,5.333 Z"
+ transform="rotate(180,24,40)"
+ inkscape:connector-curvature="0"
+ style="fill:rgba(255,255,255,0)" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/rss.xml b/rss.xml
index 51b5e11..7ff0899 100644
--- a/rss.xml
+++ b/rss.xml
@@ -228,8 +228,7 @@ end</code></pre>
</p>
<h2>Contribution</h2>
<ul>
- <li>Martin Chrzanowski -- <a
- href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/crypto.html">donate</a></li>
+ <li>Martin Chrzanowski -- <a href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/donate.html">donate</a></li>
</ul>
</main>
@@ -1645,8 +1644,7 @@ mkdir git</code></pre>
</p>
<h2>Contribution</h2>
<ul>
- <li>Martin Chrzanowski -- <a
- href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/crypto.html">donate</a></li>
+ <li>Martin Chrzanowski -- <a href="https://m-chrzan.xyz">website</a>, <a href="https://m-chrzan.xyz/donate.html">donate</a></li>
</ul>
</main>