Code Monkey home page Code Monkey logo

peertube's Introduction

Website | Join an instance | Create an instance | Chat with us | Donate

Be part of a network of multiple small federated, interoperable video hosting providers. Follow video creators and create videos. No vendor lock-in. All on a platform that is community-owned and ad-free.

Developed with ❤ by Framasoft

Framasoft logo

Client

Server
test suite status JavaScript Style Guide


screenshot

Introduction

PeerTube is a free, decentralized and federated video platform developed as an alternative to other platforms that centralize our data and attention, such as YouTube, Dailymotion or Vimeo. 🎬

To learn more:

✨ Features

All features for viewers | All features for content creators | All features for administrators

Video streaming, even in live!

Just upload your videos, and be sure they will stream anywhere. Add a description, some tags and your video will be discoverable by the entire video fediverse, not just your instance. You can even embed a player on your favorite website!

You are used to hosting live events? We got you covered too! Start livestreaming from your favorite client, and even host permanent streams!


Keep in touch with video creators

Follow your favorite channels from PeerTube or really any other place. No need to have an account on the instance you watched a video to follow its author, you can do all of that from the Fediverse (Mastodon, Pleroma, and plenty others), or just with good ol' RSS.


An interface to call home

Be it as a user or an instance administrator, you can decide what your experience will be like. Don't like the colors? They are easy to change. Don't want to list videos of an instance but let your users subscribe to them? Don't like the regular web client? All of that can be changed, and much more. No UX dark pattern, no mining your data, no video recommendation bullshit™.


Communities that help each other

In addition to visitors using P2P with WebRTC to share the load among them, instances can help each other by caching one another's videos. This way even small instances have a way to show content to a wider audience, as they will be shouldered by friend instances (more about that in our redundancy guide).

Content creators can get help from their viewers in the simplest way possible: a support button showing a message linking to their donation accounts or really anything else. No more pay-per-view and advertisements that hurt visitors and alter creativity (more about that in our FAQ).

🙌 Contributing

You don't need to be a programmer to help!

You can give us your feedback, report bugs, help us translate PeerTube, write documentation, and more. Check out the contributing guide to know how, it takes less than 2 minutes to get started. 😉

You can also join the cheerful bunch that makes our community:

Feel free to reach out if you have any questions or ideas! 💬

📦 Create your own instance

See the production guide, which is the recommended way to install or upgrade PeerTube. For hardware requirements, see Should I have a big server to run PeerTube? in the FAQ.

See the community packages, which cover various platforms (including YunoHost and Docker).

📖 Documentation

If you have a question, please try to find the answer in the FAQ first.

User documentation

See the user documentation.

Admin documentation

See how to create your own instance.

See the more general admin documentation.

Tools documentation

Learn how to import/upload videos from CLI or admin your PeerTube instance with the tools documentation.

Technical documentation

See the architecture blueprint for a more detailed explanation of the architectural choices.

See our REST API documentation:

See our ActivityPub documentation.

License

Logo

CC BY-SA 4.0, by Framasoft

Code

Copyright (C) 2015-2024 PeerTube Contributors (see CREDITS.md)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

peertube's People

Contributors

alterak avatar aujawindar avatar automcoding avatar chocobozzz avatar drgreenth avatar emansom avatar fontan030 avatar frankstrater avatar fusengum avatar gunchleoc avatar ihorhordiichuk avatar johnxlivingston avatar kimsible avatar kontrollanten avatar lucacalcaterra avatar meskobalazs avatar milotype avatar mkljczk avatar mohamadrv2007 avatar nutomic avatar paymanzafar1 avatar poslovitch avatar rigelk avatar s8321414 avatar sveinki avatar trendspotter avatar ujdhesa avatar wickloww avatar xmgz avatar zirisut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peertube's Issues

Configuring the docker container with env vars

What's the right way to do this? Here's the command I used:

docker service create --name bbvideo5 --label traefik.port=9000 -e HOST=video.beyondbitcoin.io -e PORT=80 --label traefik.frontend.rule=Host:video.beyondbitcoin.io --network traefik-net faddat/peertube

I know that this looks strange, I tried it with traefik.port=80 (which would set the port that my reverse proxy listens to the container on to 80, and I get nothing other than an error that it cannot reachthe backend. Most likely, I'm doing something simple wrong.

I'm of course getting:

image

... image doesn't seem to work atm-- it's the "check the webserver section of the config file error.

If I want to use env vars, do I need to take the values out of the /config folder? It does look like it is set up to read them, but it does not seem to be reading them. Peertube is fantastic!

There is error when upgrade

Hello,
When I run command
systemctl stop peertube
It said

Failed to stop peertube.service: Unit peertube.service not loaded.

When I run comand
npm run upgrade
It show me some errors, there is the log content here:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: build
4 verbose stack     at run (/usr/lib/node_modules/npm/lib/run-script.js:142:19)
4 verbose stack     at /usr/lib/node_modules/npm/lib/run-script.js:58:5
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:356:5
4 verbose stack     at checkBinReferences_ (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:320:45)
4 verbose stack     at final (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:354:3)
4 verbose stack     at then (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:124:5)
4 verbose stack     at ReadFileContext.<anonymous> (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:295:20)
4 verbose stack     at ReadFileContext.callback (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16)
4 verbose stack     at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:303:13)
5 verbose cwd /home/peertube/PeerTube/client
6 error Linux 4.10.3-041003-generic
7 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
8 error node v4.8.1
9 error npm  v2.15.11
10 error missing script: build
11 error If you need help, you may report this error at:
11 error     <https://github.com/npm/npm/issues>
12 verbose exit [ 1, true ]

Support avi video file format

I want to upload avi video, but it looks like this project only supports mp4 file. is there anyway to make it support avi ? or just transcoding avi files to mp4 files will be ok.

Kodi teamwork

Hi, the www.kodi.tv center community has already some experience with torrent movie playback (popcorntime, pulsar, quasar, ...). It might be useful to exchange the idea of decentralized videoplatform and to add features to interexchange the media?

Some suggestions

Hello,
I give some suggestions which I think are important
First of all, it better create different title, keyword, description for every pages automatically, it's good for SEO.
Second, it needs a user system, include register, login, integral, and Authority control.
That's all.

WebTorrent Size Issue

Currently there is issues with chrome for sure I'm not sure about firefox or other browsers, but uploading or downloading a file that's a lot greater than 1.8gb doesn't work, does the webseeding of the videos prevent this? If not there would have to be a way to recognize the size and opt to use the webseed directly (until the issue is resolved )

orphan video

Hello,

I have installed the last demo version of PeerTube and upload a video (Rien à cacher - Jérémie Zimmermann, La Parisienne) for test.
Then, I have drop the folder of PeerTube without delete the video uploaded.

But the video still listed in the list of videos and, of course, the video didn't work.

So I didn't think that is normal... ^^

But otherwise, it's a awesome idea ! ;)

Playlists support

I open this issue to discuss the working of playlists. My proposition follows.

DB model

  1. a playlist belongs to one and only one user,
  2. a user has zero or more playlists,
  3. a playlist contains zero or more ordered videos,
  4. a video belongs to zero or more playlists (maybe not?)
  5. a playlist has only one name,
  6. a playlist has only one creation date,
  7. a playlist has only one update date (maybe not?)

API routes

  1. get /playlist/:id: get informations about playlist (author, name, creation date, etc.)
  2. delete /playlist/:id suppress a playlist
  3. get /playlist/:id/videos: get videos in the playlist
  4. put /playlist/:id/video/:id: add a video to the playlist
  5. delete /playlist/:id/video/:id: remove a video from the playlist
  6. patch /playlist/:id/name/:name: rename the playlist

We need to discuss about reordering the playlist, too.

Investigating using webseed for the server instead of WebRTC

Instead of using WebRTC to send the videos to clients, a PeerTube server could use the webeed protocol (throught HTTP protocol). The main goal is to remove the Electron dependency that requires many GNU/Linux dependencies, and could consume a lot of memory & CPU (depending on the number of seeded files).

pros:

  • The server would not need the Electron process anymore (less OS
    dependencies, no memory & CPU overhead)
  • The server would not have to seed videos at each startup (which could
    be long on big files): it just has to serve the static files
  • Less code complexity (we don't need IPC/seperate Electron process)

cons:

  • Server has less control: it can't limit bandwitdh/number of peers per
    file
  • Webseeding seems to be less efficient on the client side (especially
    on Firefox). Seems to be due to the number of requests (small chunks) on
    high speed networks

Webseed seems to be the right solution for the PeerTube server, but we need to wait for some ameliorations in the WebTorrent library:

PeerTube webseed demonstration: http://peertube-webseed.cpy.re

Yunohost

It would be nice, because easy, to be able to install PeerTube on Yunohost.

[Upadated]Can't upload videos

I have used screen command to make peertube to run at background,it's my commond:

screen -dmS peertube
screen -r peertube
su - peertube
cd /home/peertube/PeerTube
NODE_ENV=production npm start

I can't visit the list page after I uploaded video. and there is no error information on web console.

Compilation errors in client

Running npm run build on latest sources gives me something that look like an angular issue.

 ~/dev/PeerTube   develop  npm run build           

[email protected] build /home/tcit/dev/PeerTube
npm run build:client:prod

[email protected] build:client:prod /home/tcit/dev/PeerTube
scripty

[email protected] webpack /home/tcit/dev/PeerTube/client
webpack "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"

Starting compilation using the angular compiler.
Angular compilation done, starting webpack bundling.
Error: Error at /home/tcit/dev/PeerTube/client/compiled/node_modules/ng2-completer/components/completer-cmp.ngfactory.ts:846:18: Property 'ctrInput' is private and only accessible within class 'CompleterCmp'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.component.ngfactory.ts:23:19: Namespace '''' has no exported member 'AdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.component.ngfactory.ts:51:38: Namespace ''
'' has no exported member 'AdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.component.ngfactory.ts:79:71: Namespace '''' has no exported member 'AdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.component.ngfactory.ts:79:126: Namespace ''
'' has no exported member 'AdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.component.ngfactory.ts:82:67: Namespace '''' has no exported member 'AdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friends.component.ngfactory.ts:23:19: Namespace ''
'' has no exported member 'FriendsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friends.component.ngfactory.ts:51:38: Namespace '''' has no exported member 'FriendsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friends.component.ngfactory.ts:79:73: Namespace ''
'' has no exported member 'FriendsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friends.component.ngfactory.ts:79:130: Namespace '''' has no exported member 'FriendsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friends.component.ngfactory.ts:82:69: Namespace ''
'' has no exported member 'FriendsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-list/friend-list.component.ngfactory.ts:35:19: Namespace '''' has no exported member 'FriendListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-list/friend-list.component.ngfactory.ts:64:38: Namespace ''
'' has no exported member 'FriendListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-list/friend-list.component.ngfactory.ts:92:76: Namespace '''' has no exported member 'FriendListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-list/friend-list.component.ngfactory.ts:92:136: Namespace ''
'' has no exported member 'FriendListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-list/friend-list.component.ngfactory.ts:261:72: Namespace '''' has no exported member 'FriendListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-add/friend-add.component.ngfactory.ts:41:19: Namespace ''
'' has no exported member 'FriendAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-add/friend-add.component.ngfactory.ts:70:38: Namespace '''' has no exported member 'FriendAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-add/friend-add.component.ngfactory.ts:98:75: Namespace ''
'' has no exported member 'FriendAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-add/friend-add.component.ngfactory.ts:98:134: Namespace '''' has no exported member 'FriendAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/friends/friend-add/friend-add.component.ngfactory.ts:365:71: Namespace ''
'' has no exported member 'FriendAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/requests.component.ngfactory.ts:23:19: Namespace '''' has no exported member 'RequestsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/requests.component.ngfactory.ts:51:38: Namespace ''
'' has no exported member 'RequestsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/requests.component.ngfactory.ts:79:74: Namespace '''' has no exported member 'RequestsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/requests.component.ngfactory.ts:79:132: Namespace ''
'' has no exported member 'RequestsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/requests.component.ngfactory.ts:82:70: Namespace '''' has no exported member 'RequestsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/request-stats/request-stats.component.ngfactory.ts:25:19: Namespace ''
'' has no exported member 'RequestStatsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/request-stats/request-stats.component.ngfactory.ts:55:38: Namespace '''' has no exported member 'RequestStatsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/request-stats/request-stats.component.ngfactory.ts:84:78: Namespace ''
'' has no exported member 'RequestStatsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/request-stats/request-stats.component.ngfactory.ts:84:140: Namespace '''' has no exported member 'RequestStatsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/requests/request-stats/request-stats.component.ngfactory.ts:209:74: Namespace ''
'' has no exported member 'RequestStatsComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/users.component.ngfactory.ts:23:19: Namespace '''' has no exported member 'UsersComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/users.component.ngfactory.ts:51:38: Namespace ''
'' has no exported member 'UsersComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/users.component.ngfactory.ts:79:71: Namespace '''' has no exported member 'UsersComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/users.component.ngfactory.ts:79:126: Namespace ''
'' has no exported member 'UsersComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/users.component.ngfactory.ts:82:67: Namespace '''' has no exported member 'UsersComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-list/user-list.component.ngfactory.ts:35:19: Namespace ''
'' has no exported member 'UserListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-list/user-list.component.ngfactory.ts:64:38: Namespace '''' has no exported member 'UserListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-list/user-list.component.ngfactory.ts:92:74: Namespace ''
'' has no exported member 'UserListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-list/user-list.component.ngfactory.ts:92:132: Namespace '''' has no exported member 'UserListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-list/user-list.component.ngfactory.ts:230:70: Namespace ''
'' has no exported member 'UserListComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-add/user-add.component.ngfactory.ts:38:19: Namespace '''' has no exported member 'UserAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-add/user-add.component.ngfactory.ts:67:38: Namespace ''
'' has no exported member 'UserAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-add/user-add.component.ngfactory.ts:95:73: Namespace '''' has no exported member 'UserAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-add/user-add.component.ngfactory.ts:95:130: Namespace ''
'' has no exported member 'UserAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/users/user-add/user-add.component.ngfactory.ts:185:69: Namespace '''' has no exported member 'UserAddComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin-routing.module.ngfactory.ts:31:75: Namespace ''
'' has no exported member 'AdminRoutingModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin-routing.module.ngfactory.ts:33:33: Namespace '''' has no exported member 'AdminRoutingModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin-routing.module.ngfactory.ts:138:28: Namespace ''
'' has no exported member 'AdminRoutingModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin-routing.module.ngfactory.ts:152:74: Namespace '''' has no exported member 'AdminRoutingModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:67:68: Namespace ''
'' has no exported member 'AdminModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:69:33: Namespace '''' has no exported member 'AdminRoutingModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:81:27: Namespace ''
'' has no exported member 'AdminModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:101:31: Namespace '''' has no exported member 'FriendService'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:102:32: Namespace ''
'' has no exported member 'RequestService'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:103:29: Namespace '''' has no exported member 'UserService'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:280:36: Namespace ''
'' has no exported member 'FriendService'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:284:37: Namespace '''' has no exported member 'RequestService'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:288:34: Namespace ''
'' has no exported member 'UserService'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:292:28: Namespace '''' has no exported member 'AdminModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/admin.module.ngfactory.ts:351:67: Namespace ''
'' has no exported member 'AdminModule'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/menu-admin.component.ngfactory.ts:23:19: Namespace '''' has no exported member 'MenuAdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/menu-admin.component.ngfactory.ts:51:38: Namespace ''
'' has no exported member 'MenuAdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/menu-admin.component.ngfactory.ts:79:75: Namespace '''' has no exported member 'MenuAdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/menu-admin.component.ngfactory.ts:79:134: Namespace ''
'' has no exported member 'MenuAdminComponent'.
Error at /home/tcit/dev/PeerTube/client/compiled/src/app/admin/menu-admin.component.ngfactory.ts:82:71: Namespace ''*'' has no exported member 'MenuAdminComponent'.
at UserError.Error (native)
at new UserError (/home/tcit/dev/PeerTube/client/node_modules/tools/@angular/tsc-wrapped/src/tsc.ts:33:25)
at check (/home/tcit/dev/PeerTube/client/node_modules/tools/@angular/tsc-wrapped/src/tsc.ts:69:11)
at Tsc.typeCheck (/home/tcit/dev/PeerTube/client/node_modules/tools/@angular/tsc-wrapped/src/tsc.ts:152:5)
at /home/tcit/dev/PeerTube/client/node_modules/tools/@angular/tsc-wrapped/src/main.ts:68:11
at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Linux 4.9.0-2-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "webpack" "--" "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] webpack: webpack "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] webpack script 'webpack "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the peertube-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! webpack "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs peertube-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls peertube-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/tcit/dev/PeerTube/client/npm-debug.log
/home/tcit/dev/PeerTube/node_modules/scripty/cli.js:38
if (er) { throw er }
^

Error: Error: scripty - script "fail" failed by exiting with a non-zero code (1).
at ChildProcess. (/home/tcit/dev/PeerTube/node_modules/scripty/lib/run/spawn-script.js:11:10)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

npm ERR! Linux 4.9.0-2-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build:client:prod"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:client:prod: scripty
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:client:prod script 'scripty'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the peertube package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! scripty
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs peertube
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls peertube
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/tcit/dev/PeerTube/npm-debug.log

npm ERR! Linux 4.9.0-2-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: npm run build:client:prod
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'npm run build:client:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the peertube package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build:client:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs peertube
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls peertube
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/tcit/dev/PeerTube/npm-debug.log

Add comments system to videos

  • Subscribe system. When your server displays a video from another pod, it subscribes to the events of comments from this video. The original server then sends the events to servers which subscribed.

  • Original server must also get comments from other servers, so... Two way subscription system ?

I can't run it for production

Hello,
I have installed it successfully, but I can't run it for production.
I have built a new database, and have setup the nginx conf file and the production.yaml file under the guide, but I haven't setup the Systemd tempete, I don't know how to do it.
Then when I run "NODE_ENV=production npm start" under peertube directory, it shows the bellow error:

> [email protected] start /root/PeerTube
> node server

info: [tube.xxx.net:80] Database is ready.
error: [tube.xxx.net:80] uncaughtException: type "json" does not exist
{ date: 'Wed Jan 18 2017 14:38:22 GMT+0800 (CST)',
  process:
   { pid: 4536,
     uid: 0,
     gid: 0,
     cwd: '/root/PeerTube',
     execPath: '/usr/local/bin/node',
     version: 'v7.4.0',
     argv: [ '/usr/local/bin/node', '/root/PeerTube/server' ],
     memoryUsage:
      { rss: 81862656,
        heapTotal: 76152832,
        heapUsed: 43398880,
        external: 62284 } },
  os:
   { loadavg: [ 0.14306640625, 0.13330078125, 0.2197265625 ],
     uptime: 2689054 },
  trace:
   [ { column: 14,
       file: '/root/PeerTube/node_modules/sequelize/lib/dialects/postgres/query.js',
       function: 'Query.formatError',
       line: 357,
       method: 'formatError',
       native: false },
     { column: 19,
       file: '/root/PeerTube/node_modules/sequelize/lib/dialects/postgres/query.js',
       function: '',
       line: 88,
       method: null,
       native: false },
     { column: 13,
       file: 'events.js',
       function: 'emitOne',
       line: 96,
       method: null,
       native: false },
     { column: 7,
       file: 'events.js',
       function: 'Query.emit',
       line: 188,
       method: 'emit',
       native: false },
     { column: 8,
       file: '/root/PeerTube/node_modules/pg/lib/query.js',
       function: 'Query.handleError',
       line: 131,
       method: 'handleError',
       native: false },
     { column: 26,
       file: '/root/PeerTube/node_modules/pg/lib/client.js',
       function: '',
       line: 180,
       method: null,
       native: false },
     { column: 13,
       file: 'events.js',
       function: 'emitOne',
       line: 96,
       method: null,
       native: false },
     { column: 7,
       file: 'events.js',
       function: 'Connection.emit',
       line: 188,
       method: 'emit',
       native: false },
     { column: 12,
       file: '/root/PeerTube/node_modules/pg/lib/connection.js',
       function: '',
       line: 121,
       method: null,
       native: false },
     { column: 13,
       file: 'events.js',
       function: 'emitOne',
       line: 96,
       method: null,
       native: false },
     { column: 7,
       file: 'events.js',
       function: 'Socket.emit',
       line: 188,
       method: 'emit',
       native: false },
     { column: 18,
       file: '_stream_readable.js',
       function: 'readableAddChunk',
       line: 176,
       method: null,
       native: false },
     { column: 10,
       file: '_stream_readable.js',
       function: 'Socket.Readable.push',
       line: 134,
       method: 'Readable.push',
       native: false },
     { column: 20,
       file: 'net.js',
       function: 'TCP.onread',
       line: 551,
       method: 'onread',
       native: false } ],
  stack:
   [ 'SequelizeBaseError: type "json" does not exist',
     '    at Query.formatError (/root/PeerTube/node_modules/sequelize/lib/dialects/postgres/query.js:357:14)',
     '    at Query.<anonymous> (/root/PeerTube/node_modules/sequelize/lib/dialects/postgres/query.js:88:19)',
     '    at emitOne (events.js:96:13)',
     '    at Query.emit (events.js:188:7)',
     '    at Query.handleError (/root/PeerTube/node_modules/pg/lib/query.js:131:8)',
     '    at Connection.<anonymous> (/root/PeerTube/node_modules/pg/lib/client.js:180:26)',
     '    at emitOne (events.js:96:13)',
     '    at Connection.emit (events.js:188:7)',
     '    at Socket.<anonymous> (/root/PeerTube/node_modules/pg/lib/connection.js:121:12)',
     '    at emitOne (events.js:96:13)',
     '    at Socket.emit (events.js:188:7)',
     '    at readableAddChunk (_stream_readable.js:176:18)',
     '    at Socket.Readable.push (_stream_readable.js:134:10)',
     '    at TCP.onread (net.js:551:20)' ] }

npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v7.4.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node server'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the peertube package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node server
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs peertube
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls peertube
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/PeerTube/npm-debug.log

Then I run "NODE_ENV=production npm run check", it says:

Checking server is up (http://tube.xxx.net:80/api/v1/ping)...
FAIL.
Checking CORS headers for the torrent (http://tube.xxx.net:80/static/torrents/test.torrent)...
access-control-allow-origin is not present.
access-control-allow-methods is not present.
access-control-allow-headers is not present.
FAIL.
Checking CORS headers for the video (http://tube.xxx.net:80/static/webseed/test.mp4)...
access-control-allow-origin is not present.
access-control-allow-methods is not present.
access-control-allow-headers is not present.
FAIL.
Checking tracker websocket (ws://tube.xxx.net:80:80/tracker/socket)...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: unexpected server response (502)
    at ClientRequest.response (/root/PeerTube/node_modules/ws/lib/WebSocket.js:719:15)
    at Object.onceWrapper (events.js:290:19)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:473:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
    at Socket.socketOnData (_http_client.js:362:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
/root/PeerTube/node_modules/scripty/cli.js:38
    if (er) { throw er }
              ^

Error: Error: scripty - script "fail" failed by exiting with a non-zero code (1).
    at ChildProcess.<anonymous> (/root/PeerTube/node_modules/scripty/lib/run/spawn-script.js:11:10)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

npm ERR! Linux 3.2.0-4-amd64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "check"
npm ERR! node v7.4.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] check: `scripty`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] check script 'scripty'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the peertube package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     scripty
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs peertube
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls peertube
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /root/PeerTube/npm-debug.log

The content of file /root/PeerTube/npm-debug.log is:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'check' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'precheck', 'check', 'postcheck' ]
5 info lifecycle [email protected]~precheck: [email protected]
6 silly lifecycle [email protected]~precheck: no script for precheck, continuing
7 info lifecycle [email protected]~check: [email protected]
8 verbose lifecycle [email protected]~check: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~check: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/root/PeerTube/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
10 verbose lifecycle [email protected]~check: CWD: /root/PeerTube
11 silly lifecycle [email protected]~check: Args: [ '-c', 'scripty' ]
12 silly lifecycle [email protected]~check: Returned: code: 1  signal: null
13 info lifecycle [email protected]~check: Failed to exec check script
14 verbose stack Error: [email protected] check: `scripty`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:885:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /root/PeerTube
17 error Linux 3.2.0-4-amd64
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "check"
19 error node v7.4.0
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error [email protected] check: `scripty`
22 error Exit status 1
23 error Failed at the [email protected] check script 'scripty'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the peertube package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     scripty
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs peertube
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls peertube
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Add video views

Add views attribute to videos.

Increment it when someone in the pod network get the video.

Pods that do not own the video need to send the event to the origin pod.
Origin pods need to increment the video views and notify all other pods in the network.

Split the client and server in different repositories

For now the client part (in Angular 2) and the server part (Express) are in the same repository.

But they have many differencies (the client is in TypeScript, the server in JavaScript...) and it does not make sense to keep them the same repo.

The idea is to move the client part in another repository when PeerTube will be ready to be released. For now it's simplier for everyone to have the complete project inside the same repository/server.

There is no speed to watch video

Hello,
I have installed PeerTube successfully, and uploaded some videos to test, but I can't watch the videos, there is no speed.
I have checked the videos, they are do in the directory "/root/PeerTube/videos" of server, and they are all mp4 type files, and on the videos list page, there are right snapshots of these videos, but when I opened one of them, there was no download speed, and no upload speed.

Please support multi-server

Please think about it, if peertube will be used for business, it must be support multi-server to save videos.

Add RSS and syndication feeds

It could be awesome to get the content of a PT instance via a RSS feed, even better with a RSS feed per tags.


Implemented in 244e76a:

  • instance-wide RSS feed
    • json
    • rss
    • atom
    • mrss
  • account-wide RSS feed
    • json
    • rss
    • atom
    • mrss

Delayed for later implementation

  • channel-wide RSS feed
    • json
    • rss
    • atom
    • mrss
  • per-tag RSS feed (as seen by an instance and local to an instance) -> BLOCKED until #60 gets done.

Mobile devices

A lot of people use current videoplattforms also from mobile devices. I guess PT would need an fallback to become compatible with the low performance of this embedded platforms?

Some scaling experiment?

Hi, this is an awesome project! I am part of the Nuit Debout developer team and we are developing a periscope.tv downloader which automatically records some live broadcasts for replay (so that they can't be deleted for example). We then upload them back into some online archives (youtube, maybe IPFS or anything) and it may be a great thing to upload them on the peertube network as well. The scaling may be an issue so I prefer asking here before we do anything serious: Have you already done some heavy-duty tests of the pod server? Would you be interested in experimenting this?

Note: this stream recorder is WIP.

Add NSFW (not safe for work) attribute to videos

  • In the upload form, add a checkbox to specify the video is NSFW
  • Add NSFW boolean in video model
  • Propagate this attribute to remote pods
  • Create 'see NSFW' checkbox in a user profile form
  • Add NSFW boolean in user model
  • Do not list by default NSFW videos Hide NSFW videos title and thumbnail

There are errors when use https

When I use https to visit the website, the browser console said
Fetch API cannot load http://aaa.com/static/torrents/fa099e4a-df7e-4165-b733-99ad00c5ebcc.torrent. Redirect from 'http://aaa.com/static/torrents/fa099e4a-df7e-4165-b733-99ad00c5ebcc.torrent' to 'https://aaa.com/static/torrents/fa099e4a-df7e-4165-b733-99ad00c5ebcc.torrent' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://aaa.com' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Production Mode ?

Can you let me know what the minimum configuration for Production Mode is ?

Thanks !

Seems doesn't support Chinese character

Hello,
I see that you have add Chinese character support for tag and title and description, and I had a look at the demo,

I have reinstalled my server's OS and peertube, but when I input Chinese character, the system says:

A tag should be between 2 and 10 alphanumeric characters long.

so I can't add any tag successfully.

Then I changed the tag to English, and uploaded a video whose file name is Chinese, then I met some error and can't complete the uploading.

This is the log file, in case you need it:
log.txt

Enable user registration

How can I enable new user registrations? or is that not something that can happen just yet? Is there a way to "drop" oauth into this?

Thanks!

Add video likes/dislikes

Add likes and dislikes attributes to videos.

A pod is in charge of its users votes. It sends the likes/dislikes events to the origin pod.
If this is the origin pod it just increment the likes/dislikes and send the new value to all other pods.

A user can only vote once per video.

Some video's problems

Hello,
Some videos can be watch but some can't, they are all mp4 files, why is that ?
And the limitation of video's duration is 7200s, Can I change it ?
It looks like only mp4 file can be uploaded successfully, Can I add some other file format? avi for example.

Add language attribute to video

At upload, propose predefined languages.

  • Add an attribute to video object for language code
  • Send it to remote pods
  • Allow to filter by language

Add ability for an administrator to remove any video

For now, only the user that uploaded the video can remove it. The idea is the pod administrator should have the possibility to remove any video (remote or from another user).

  • Add ability to remove a remote video (the video is remote, we do not notify friends)
  • Add ability to remove a video of another user that is on the same pod (so the video is local and we need to notify the video removal to our friends)

Is there a demo online?

This seems really cool! Is there a demo link online somewhere? There are a lot of dependencies to install -- a demo link would make things way easier for visitors to check it out!

Add licence attribute to videos

At upload, propose predefined licences.

  • Add an attribute to video object for the licence name
  • Send it to remote pods
  • Allow to filter by licence type

Please attention Chinese character

Please attention add Chinese character support as soon as possible, Chinese people really need it, I can introduce it to more Chinese people.

【Updated】The whole commands to install Peertube for Production

I didn't know nodejs before, so I had to learn how to install it since I started to install PeerTube. Below are the all commands I had used to install PeerTube, just for some people like me.

This is my OS environment:

Debian 8
LNMP(You can just install nginx)
root user

First of all, you need a nginx
If you don't know how to install it, you can use LNMP, it's a one key package to install nginx + mysql + php. you can install it with this command, it needs some time to complete:
wget -c http://soft.vpser.net/lnmp/lnmp1.3-full.tar.gz && tar zxf lnmp1.3-full.tar.gz && cd lnmp1.3-full && ./install.sh lnmp

When you need Non-Latin characters, you must set your local encoding first:
dpkg-reconfigure locales
Choose the option you use with suffix "UTF8", for example, en_US.UTF8, make sure that no Non-UTF8 option is chosen.

Then you should install postgresql
To do that, you should add a source list first:
nano /etc/apt/sources.list

Then you add this line into the sources.list file's end:
deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main

Then add key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
apt-key add -

Then install postgresql

apt-get update
aptitude install postgresql-9.4 postgresql-contrib-9.4 postgresql-doc-9.4

Then you should install ffmpeg and openssl

sh -c 'echo "deb http://www.deb-multimedia.org jessie main" >> /etc/apt/sources.list' && 
apt-get update && 
apt-get install deb-multimedia-keyring && 
apt-get install ffmpeg openssl sudo curl git build-essential

Then you install nodejs 4.x and npm

apt-get install python gcc make g++
curl -sL https://deb.nodesource.com/setup_4.x | bash - 
apt-get install nodejs -y

Then you install npm 3.x
npm install -g npm@3

You have to create a database, the database's name is peertube_prod or xxx_prod

su - postgres
psql postgres

Then you can input below commands:

CREATE USER peertube WITH PASSWORD 'peertube';
CREATE DATABASE peertube_prod OWNER peertube;
GRANT ALL PRIVILEGES ON DATABASE peertube to peertube;
\q

Then create a new user for peertube:
useradd -m -d /home/peertube_user -s /bin/bash -p peertube_user peertube_user

modify it's password:
passwd peertube_user

Then you can install PeerTube and build it

su - peertube_user
git clone -b master https://github.com/Chocobozzz/PeerTube
cd PeerTube
npm install
npm run build

Then you should setup the config file, first run below commands to generate the config file:
cp config/production.yaml.example config/production.yaml

Then you can modify the file production.yaml, it's location is PeerTube/config/production.yaml, you should modify the domain name and the database username and password.

Then you should add a virtual host with the domain name you want to use. If you are using LNMP, the command is:
lnmp vhost add

Then you should modify the virtual host conf file, insert the bellow content into the end of tag server{}.
the conf file's location is /usr/local/nginx/conf/vhost under LNMP, if you install nginx alone, it maybe is /etc/nginx/site-enabled/default.

  location / {
    proxy_pass http://localhost:9000;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    # For the video upload
    client_max_body_size 100m;
  }

  # Bypass PeerTube webseed route for better performances
  location /static/webseed {
    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';
    }

    alias /home/peertube_user/PeerTube/videos;
  }

  # 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://localhost:9000;
  }

If you want use https, you should have a look at this:
https://github.com/Chocobozzz/PeerTube/tree/master/support/nginx
(I met some error here, I can't watch video by https, somebody solved it please help me)

Then you should reload nginx:
service nginx reload

Then you can run PeerTube for production:

su - peertube_user
cd PeerTube
NODE_ENV=production npm start

The root user and password will be generated at first startup. You will see it in the PeerTube logs. you should remember it.

【solved】There are errors when run command "npm install"

Hello,
I run npm install under /home/peertube/PeerTube directory as user peertube, there are some warns:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of webpack@^2.1.0-beta but none was installed.
npm WARN [email protected] requires a peer of webpack@^2.2.0 but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of @angular/[email protected] but none was installed.
npm WARN [email protected] requires a peer of webpack@1 || ^2.2.0 but none was installed.
npm WARN [email protected] requires a peer of webpack@1 || 2 || ^2.0.0-beta || ^2.1.0-beta but none was installed.

Then when I run npm run build under the same directory, it shows more errors, the errors are from Starting compilation using the angular compiler.
:

npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls peertube-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/peertube/PeerTube/client/npm-debug.log
/home/peertube/PeerTube/node_modules/scripty/cli.js:38
    if (er) { throw er }
              ^

Error: Error: scripty - script "fail" failed by exiting with a non-zero code (1).
    at ChildProcess.<anonymous> (/home/peertube/PeerTube/node_modules/scripty/lib/run/spawn-script.js:11:10)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:854:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build:client:prod"
npm ERR! node v4.7.3
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:client:prod: `scripty`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:client:prod script 'scripty'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the peertube package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     scripty
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs peertube
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls peertube
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/peertube/PeerTube/npm-debug.log

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v4.7.3
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `npm run build:client:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'npm run build:client:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the peertube package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:client:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs peertube
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls peertube
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/peertube/PeerTube/npm-debug.log

This is the content of the file npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 silly lifecycle [email protected]~prebuild: no script for prebuild, continuing
7 info lifecycle [email protected]~build: [email protected]
8 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~build: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/peertube/PeerTube/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
10 verbose lifecycle [email protected]~build: CWD: /home/peertube/PeerTube
11 silly lifecycle [email protected]~build: Args: [ '-c', 'npm run build:client:prod' ]
12 silly lifecycle [email protected]~build: Returned: code: 1  signal: null
13 info lifecycle [email protected]~build: Failed to exec build script
14 verbose stack Error: [email protected] build: `npm run build:client:prod`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:854:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/peertube/PeerTube
17 error Linux 3.16.0-4-amd64
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
19 error node v4.7.3
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error [email protected] build: `npm run build:client:prod`
22 error Exit status 1
23 error Failed at the [email protected] build script 'npm run build:client:prod'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the peertube package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     npm run build:client:prod
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs peertube
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls peertube
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.