PeerTube manual install fail - used cloudron 5 minute install all fine now

Hi, this is my first experience with Ubuntu 18 and installing something via ssh, so i followed the install guide of peertube, and i think do the job as better i can.

So at the end of 4-5 days « insane ssh trip log ^_^ » to make all together i have the nginx wellcome page only when i try to open:

https://peertube.it

so i think there is some stupid things to do but i’m a noob on that world and i don’t know what to do!

1 How can i make the peertube install show itself instead the nginx wellcome page?
2 There is any log i can show or command i can use to make the peertube install as default open instead the nginx wellcome page?

Sorry for that message but i’m out of resource now, i have worked hard for lot of days and i want complete the install!

Thanks to anyone want help me finish!

Offtopic:
If you want to build up the first PeerTube italian Community join here:

Previous request:
My old first request where after some change server won’t boot up anymore:
ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused

Hello,

Did you check the « Web Server » part of the install guide talking about the sites-available and sites-enabled ?

yes that is the part where i spend more time cause i don’t understand that point:

Then modify the webserver configuration file.
expecially that part i don’t know what is alias and storage key
Please pay attention to the alias keys of the static locations. It should correspond to the paths of your storage directories (set in the configuration file inside the storage key).

$ sudo vim /etc/nginx/sites-available/peertube

that is my side view of that part:

sudo vim /etc/nginx/sites-available/peertube

# Increase rate limit in HLS mode, because we don't have multiple simultaneous connections
if ($request_uri ~ -fragmented.mp4$) {
  set $peertube_limit_rate 5000k;
}

# Use this with nginx >= 1.17.0
# limit_rate $peertube_limit_rate;
# Or this if your nginx < 1.17.0
set $limit_rate $peertube_limit_rate;
limit_rate_after 5000k;

if ($request_method = 'OPTIONS') {
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
  add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
  add_header 'Access-Control-Max-Age' 1728000;
  add_header 'Content-Type' 'text/plain charset=UTF-8';
  add_header 'Content-Length' 0;
  return 204;
}

if ($request_method = 'GET') {
  add_header 'Access-Control-Allow-Origin' '*';
  add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
  add_header 'Access-Control-Allow-Headers' 'Range,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';

  # Don't spam access log file with byte range requests
  access_log off;
}

root /var/www/peertube/storage;

# Use this in tandem with fuse-mounting i.e. https://docs.joinpeertube.org/#/admin-remote-storage
# to serve files directly from a public bucket without proxying.
# Assumes you have buckets named after the storage subdirectories, i.e. 'videos', 'redundancy', etc.
#set $cdn <your S3-compatiable bucket public url mounted via fuse>;
#rewrite ^/static/webseed/(.*)$ $cdn/videos/$1 redirect;
#rewrite ^/static/redundancy/(.*)$ $cdn/redundancy/$1 redirect;
#rewrite ^/static/streaming-playlists/(.*)$ $cdn/streaming-playlists/$1 redirect;

rewrite ^/static/webseed/(.*)$ /videos/$1 break;
rewrite ^/static/redundancy/(.*)$ /redundancy/$1 break;
rewrite ^/static/streaming-playlists/(.*)$ /streaming-playlists/$1 break;

try_files $uri /;
  }

  # Websocket tracker
  location /tracker/socket {
# Peers send a message to the tracker every 15 minutes
# Don't close the websocket before this time
proxy_read_timeout 1200s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:9000;
  }

  location /socket.io {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;

proxy_pass http://127.0.0.1:9000;

# enable WebSockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
  }
}
"/etc/nginx/sites-available/peertube" 194L, 7996C

it is possibile i have to chmod some folder? like root /var/www/peertube/storage ???

this is my chmod status:

root@Ubuntu-1804-bionic-64-minimal /var/www/peertube/storage # stat /var/www/peertube/storage
  File: **/var/www/peertube/storage**
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 902h/2306d	Inode: 85070495    Links: 15
Access: (**0777**/drwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-11-27 09:27:44.018110692 +0100
Modify: 2020-11-27 08:01:54.247870678 +0100
Change: 2020-11-27 08:01:54.247870678 +0100
 Birth: -
root@Ubuntu-1804-bionic-64-minimal /var/www/peertube/storage # stat /var/www/peertube
  File: **/var/www/peertube**
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 902h/2306d	Inode: 85067925    Links: 9
Access: (**0777**/drwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-11-27 07:34:31.586496295 +0100
Modify: 2020-11-27 07:32:17.434310362 +0100
Change: 2020-11-27 07:32:17.434310362 +0100
 Birth: -
root@Ubuntu-1804-bionic-64-minimal /var/www/peertube/storage # stat /var/www
  File: **/var/www**
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 902h/2306d	Inode: 85067918    Links: 4
Access: (**0755**/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-11-27 07:40:01.818900735 +0100
Modify: 2020-11-27 06:14:54.534963078 +0100
Change: 2020-11-27 06:14:54.534963078 +0100
 Birth: -
root@Ubuntu-1804-bionic-64-minimal /var/www/peertube/storage # stat /var/
  File: **/var/**
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 902h/2306d	Inode: 85065729    Links: 14
Access: (**0755**/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2020-11-26 23:08:30.887837541 +0100
Modify: 2020-11-26 23:08:29.035814843 +0100
Change: 2020-11-26 23:08:29.035814843 +0100
 Birth: -

i have to modify that:

alias /var/www/peertube/peertube-latest/client/dist/$1; ???

and that

root /var/www/peertube/storage; ???

or not?

i have found something strange using the

nginx -t command

nginx: [warn] conflicting server name « peertube.it » on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name « peertube.it » on [::]:80, ignored
nginx: [warn] conflicting server name « peertube.it » on [::]:443, ignored
nginx: [warn] conflicting server name « peertube.it » on 0.0.0.0:443, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

/etc/init.d/nginx configtest

  • Testing nginx configuration

Did you do, after creating and modifying /etc/nginx/sites-available/peertube :

cd /etc/nginx/sites-enabled
sudo ln -s ../sites-available/peertube. 
sudo nginx -t && sudo nginx -s reload

Plus, did you remark that the [peertube-domain] should be replaced by your domain name (i.e. peertube.it) in the following part of the document ?

Then set the domain for the webserver configuration file. Replace [peertube-domain] with the domain for the peertube server.

$ sudo sed -i 's/${WEBSERVER_HOST}/[peertube-domain]/g' /etc/nginx/sites-available/peertube
$ sudo sed -i 's/${PEERTUBE_HOST}/localhost:9000/g' /etc/nginx/sites-available/peertube

root @ Ubuntu-1804-bionic-64-minimal / # cd /etc/nginx/sites-enabled

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # sudo ln -s …/sites-enabled/peertube.

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # sudo nginx -t && sudo nginx -s reload

nginx: [emerg] open() « /etc/nginx/sites-enabled/peertube. » failed (40: Too many levels of symbolic links) in /etc/nginx/nginx.conf:62

nginx: configuration file /etc/nginx/nginx.conf test failed

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # cd /etc/nginx/sites-enabled

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # ls

default peertube peertube.

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # sudo ln -s …/sites-enabled/peertube

ln: failed to create symbolic link ‹ ./peertube ›: File exists

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # sudo nginx -t && sudo nginx -s reload

nginx: [emerg] open() « /etc/nginx/sites-enabled/peertube. » failed (40: Too many levels of symbolic links) in /etc/nginx/nginx.conf:62

nginx: configuration file /etc/nginx/nginx.conf test failed

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # rm peertube.

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # ls

default peertube

root @ Ubuntu-1804-bionic-64-minimal /etc/nginx/sites-enabled # sudo nginx -t && sudo nginx -s reload

nginx: [warn] conflicting server name « peertube.it » on 0.0.0.0:80, ignored

nginx: [warn] conflicting server name « peertube.it » on [::]:80, ignored

nginx: [warn] conflicting server name « peertube.it » on [::]:443, ignored

nginx: [warn] conflicting server name « peertube.it » on 0.0.0.0:443, ignored

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

nginx: [warn] conflicting server name « peertube.it » on 0.0.0.0:80, ignored

nginx: [warn] conflicting server name « peertube.it » on [::]:80, ignored

nginx: [warn] conflicting server name « peertube.it » on [::]:443, ignored

nginx: [warn] conflicting server name « peertube.it » on 0.0.0.0:443, ignored

@Framasky made a typing mistake in the second line of his example. this should be sudo ln -s ../sites-enables/peertube

But as we can see, there’s already a peertube in that directory. Please remove the peertube. by sudo remove /etc/nginx/sites-enabled/peertube. (take care about the dot (.) at the end of the file name!) Because this might involve some interference with the other and right peertube configuration file

change with my domain in that way [peertube.it]
sudo sed -i ‹ s/${WEBSERVER_HOST}/[peertube.it]/g › /etc/nginx/sites-available/peertube
sudo sed -i ‹ s/${PEERTUBE_HOST}/localhost:9000/g › /etc/nginx/sites-available/peertube

or peertube.it without the opening [and closing]
sudo sed -i ‹ s/${WEBSERVER_HOST}/peertube.it/g › /etc/nginx/sites-available/peertube
sudo sed -i ‹ s/${PEERTUBE_HOST}/localhost:9000/g › /etc/nginx/sites-available/peertube

cause the first time i do it this morning i do with the [peertube.it] and after some second in any case i send the command too without the opening [and closing]

so i send that command twice: i can see it in my shell log

so that is a possibile mistake i have send that command twice cause i don’t kown the right syntax

The second one was the correct formulation.

But, hélas!, you did after the first one, I guess.

Edit the /etc/nginx/sites-available/peertube and remove the [ ] around your domain name. (Look for sever {)

yes i have removed that cause i see the . after send the command

that’s the actual situation:

Schermata 2020-11-27 alle 10.07.14

what’s inside /etc/nginx/sites-enabled/nginx ?

i can go only inside the /etc/nginx/sites-enabled folder if i do ls i can see inside 2 subfolder here:
default + peertube but i can’t go inside and i can’t edit cause that are folder or shortcut to other?

Schermata 2020-11-27 alle 10.13.19

default and peertube are soft links (think of them as a shortcut somewhere else in the storage area), you can see their real destination with ls -l

they are, finally, simple text files that you can edit with vim

ok here what is see:

Schermata 2020-11-27 alle 10.22.26

so i don’t have /etc/nginx/sites-enabled/nginx <— not exist nginx folder

i try to open with vim the two other folder

Yes, I saw. I misregarded you previous posts. I told about default one

first the default one look like that:



Schermata 2020-11-27 alle 10.27.50

vim /etc/nginx/sites-available/default

/etc/nginx/sites-available/peertube look’s like that:



vim /etc/nginx/sites-available/peertube