committed by
GitHub
parent
693df6bbb6
commit
e019808e5d
+30
-30
@@ -15,22 +15,22 @@ You don't need programming experience to set SyncLounge up, but without a passab
|
||||
|
||||
## Server Pre-Reqs
|
||||
|
||||
* **Linux**: These docs assume a debian/ubuntu distro, but it should be easy enough to install packages on the distro of your choice. nodejs should run on Windows, and feel free to write a different guide for that.
|
||||
* **A domain** pointed at your server in DNS. Here I'll be using synclounge.yourdomain.com as the example domain, but whichever one you use should point at your server. You could also just use your server's public IP if you don't have a domain
|
||||
* **nginx** or another comparable web server. I prefer nginx. Any web server that works for reverse proxying (including web sockets!) will be fine, but I'm only giving config for nginx, since nginx also handles web sockets well especially. Feel free to hit me up with a working apache2 or similar config
|
||||
* **git** To check out the synclounge code. If you're running ubuntu/debian, this is as easy as: `sudo apt-get install git`
|
||||
* **nodejs and npm** with Node at least v8.4.0.
|
||||
* Preferred method is probably using nvm (node version manager), which will install a local version of node in your home directory. [Here's a guide for NVM installation.](https://tecadmin.net/install-nodejs-with-nvm/)
|
||||
* You can use the distro package version most likely, or at least find a repo or PPA for them. [Here's a sample Ubuntu guide.](https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/) Note that if using packages, you'll need to use sudo when we install global npm packages.
|
||||
* Either way, run, `node -v` and `npm -v` to confirm you have them.
|
||||
- **Linux**: These docs assume a debian/ubuntu distro, but it should be easy enough to install packages on the distro of your choice. nodejs should run on Windows, and feel free to write a different guide for that.
|
||||
- **A domain** pointed at your server in DNS. Here I'll be using synclounge.yourdomain.com as the example domain, but whichever one you use should point at your server. You could also just use your server's public IP if you don't have a domain
|
||||
- **nginx** or another comparable web server. I prefer nginx. Any web server that works for reverse proxying (including web sockets!) will be fine, but I'm only giving config for nginx, since nginx also handles web sockets well especially. Feel free to hit me up with a working apache2 or similar config
|
||||
- **git** To check out the synclounge code. If you're running ubuntu/debian, this is as easy as: `sudo apt-get install git`
|
||||
- **nodejs and npm** with Node at least v8.4.0.
|
||||
- Preferred method is probably using nvm (node version manager), which will install a local version of node in your home directory. [Here's a guide for NVM installation.](https://tecadmin.net/install-nodejs-with-nvm/)
|
||||
- You can use the distro package version most likely, or at least find a repo or PPA for them. [Here's a sample Ubuntu guide.](https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/) Note that if using packages, you'll need to use sudo when we install global npm packages.
|
||||
- Either way, run, `node -v` and `npm -v` to confirm you have them.
|
||||
|
||||
**Note**: While you can run synclounge over https with an ssl certificate, I'm not going to do that here. You could easily use https instead of http in your URL, and setup your ssl certificate in your web server config. But unless you setup your plex server using https as well, connecting to your plex will fail.
|
||||
|
||||
## Setting up SyncLounge Code Directory
|
||||
|
||||
* Check out the synclounge project: `git clone https://github.com/samcm/synclounge`
|
||||
* enter directory: `cd synclounge`
|
||||
* install node libraries using npm: `npm install`
|
||||
- Check out the synclounge project: `git clone https://github.com/samcm/synclounge`
|
||||
- enter directory: `cd synclounge`
|
||||
- install node libraries using npm: `npm install`
|
||||
|
||||
## settings.json file
|
||||
|
||||
@@ -70,16 +70,16 @@ Here's an example settings.json file:
|
||||
|
||||
I've made some opinionated assumptions for simplicity here, and again read the whole SyncLounge documentation for more details, but the highlights are:
|
||||
|
||||
* **accessUrl** - Set this to the url you want synclounge to be at, and replace `http://synclounge.yourdomain.com` with that wherever you see it.
|
||||
* **Server ports**. These can be whatever you want. I've changed them from the default 8080 and 8081 since they're most commonly used. If you change these just keep them in mind when we do nginx/apache setup
|
||||
* `webapp_port` - The local port the web frontend will be served at.
|
||||
* `server_port` - The local port the backend will be served at.
|
||||
* **authentication** - sets who is allowed to use your SyncLounge. I have this set so that if someone has access to your plex server, they have access to your synclounge server (presuming you're trying to stream from your own plex server library!) If you want to do that, set `YOUR_PLEX_MACHINE_ID` to your server ID.
|
||||
* If you launch plex.tv and go to Settings -> Manage -> Libraries, you can see your server ID in the URL. It'll be the XXXX in `https://app.plex.tv/desktop#!/settings/server/XXXX/manage/libraries` . Put that hex code as your plex machine id.
|
||||
* If you don't want to authenticate that users have access to your plex server, you can either remove the authentication part of the settings, or replace it with `"authentication":{"mechanism":"none"},`
|
||||
* **HOWEVER**, the user will *still* need to log in with their plex account, because SyncLounge opens videos via plex using their plex account. Leaving authentication as none just means they can log in to your SyncLounge without their user having been given shared access to your plex server. However, unless they have access to a different plex server with the exact same videos you're trying to play, SyncLounge won't work for them anyway. I'd say for 95% of use cases, you're trying to use SyncLounge with your own plex server you've shared with other people, so authenticating they have access to your plex server let's you know there's a problem when they go to sign in, as opposed to waiting til they get into the room with you and nothing will play for them.
|
||||
* In 95% of cases, you want them to give you their plex account email address, you want to add them to sharing in your plex server (and them confirm it via email), and *then* you want to give them the SyncLounge invite link. If you fall into that case, leave the authentication as I described and add your machine id in.
|
||||
* **servers** - I'm replacing the default server list with the custom server. If you want the other servers you can set this server object to `customServer` as shown in the official docs. The upside of replacing all the servers is your users can skip picking a server. Set the name, location, and url details here, and optionally a thumbnail which won't get shown if you only have one server anyway.
|
||||
- **accessUrl** - Set this to the url you want synclounge to be at, and replace `http://synclounge.yourdomain.com` with that wherever you see it.
|
||||
-* **Server ports**. These can be whatever you want. I've changed them from the default 8080 and 8081 since they're most commonly used. If you change these just keep them in mind when we do nginx/apache setup
|
||||
- `webapp_port` - The local port the web frontend will be served at.
|
||||
- `server_port` - The local port the backend will be served at.
|
||||
- **authentication** - sets who is allowed to use your SyncLounge. I have this set so that if someone has access to your plex server, they have access to your synclounge server (presuming you're trying to stream from your own plex server library!) If you want to do that, set `YOUR_PLEX_MACHINE_ID` to your server ID.
|
||||
- If you launch plex.tv and go to Settings -> Manage -> Libraries, you can see your server ID in the URL. It'll be the XXXX in `https://app.plex.tv/desktop#!/settings/server/XXXX/manage/libraries` . Put that hex code as your plex machine id.
|
||||
- If you don't want to authenticate that users have access to your plex server, you can either remove the authentication part of the settings, or replace it with `"authentication":{"mechanism":"none"},`
|
||||
- **HOWEVER**, the user will *still* need to log in with their plex account, because SyncLounge opens videos via plex using their plex account. Leaving authentication as none just means they can log in to your SyncLounge without their user having been given shared access to your plex server. However, unless they have access to a different plex server with the exact same videos you're trying to play, SyncLounge won't work for them anyway. I'd say for 95% of use cases, you're trying to use SyncLounge with your own plex server you've shared with other people, so authenticating they have access to your plex server let's you know there's a problem when they go to sign in, as opposed to waiting til they get into the room with you and nothing will play for them.
|
||||
- In 95% of cases, you want them to give you their plex account email address, you want to add them to sharing in your plex server (and them confirm it via email), and *then* you want to give them the SyncLounge invite link. If you fall into that case, leave the authentication as I described and add your machine id in.
|
||||
- **servers** - I'm replacing the default server list with the custom server. If you want the other servers you can set this server object to `customServer` as shown in the official docs. The upside of replacing all the servers is your users can skip picking a server. Set the name, location, and url details here, and optionally a thumbnail which won't get shown if you only have one server anyway.
|
||||
|
||||
## Build SyncLounge web files
|
||||
|
||||
@@ -93,10 +93,10 @@ Then go get a drink or a snack, because it will take a minute. You may or may no
|
||||
This is just to test out that it's all working while you can see the console output. If you're a confident person you can just switch to the Production options. But you might want to try these if it's not working.
|
||||
You need to both run the SyncLounge web and server instances. You can do this is multiple ssh windows, but I suggest using `screen`. If you don't have screen installed, you can get it with `sudo apt-get install screen` . As a quick screen tutorial:
|
||||
|
||||
* List any existing screen sessions: `screen -ls`
|
||||
* Open a new named screen session: `screen -S YourName`
|
||||
* Send the screen session you're in to the background: Hold down the CTRL key, then press and release A, then D
|
||||
* Resume a screen session running in the background: `screen -r YourName`
|
||||
- List any existing screen sessions: `screen -ls`
|
||||
- Open a new named screen session: `screen -S YourName`
|
||||
- Send the screen session you're in to the background: Hold down the CTRL key, then press and release A, then D
|
||||
- Resume a screen session running in the background: `screen -r YourName`
|
||||
So when running the server commands I suggest running `screen -S sl-server` to open a screen for that, then CTRL-A-D to get out of it, then `screen -S sl-web` to run the web commands. Then you can rejoin the screens with `screen -r sl-web` or `screen -r sl-server` . But I'm a guide writer, not a cop, so do whatever's easiest for you.
|
||||
|
||||
To run the synclounge server, run: `node server.js` and leave it running. You'll see output like:
|
||||
@@ -163,9 +163,9 @@ proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
Once you have the config setup how you want:
|
||||
|
||||
* Symlink it to sites-enabled: `sudo ln -s /etc/nginx/sites-available/synclounge.yourdomain.com.conf /etc/nginx/sites-enabled/`
|
||||
* Check your nginx config for errors: `sudo nginx -t`
|
||||
* If everything looks good, reload nginx with your changes: `sudo service nginx reload`
|
||||
- Symlink it to sites-enabled: `sudo ln -s /etc/nginx/sites-available/synclounge.yourdomain.com.conf /etc/nginx/sites-enabled/`
|
||||
- Check your nginx config for errors: `sudo nginx -t`
|
||||
- If everything looks good, reload nginx with your changes: `sudo service nginx reload`
|
||||
|
||||
Then try going to your synclounge install in your browser!
|
||||
|
||||
@@ -179,8 +179,8 @@ If you're running the server or web files still from testing, stop them (just ct
|
||||
|
||||
Then from the synclounge directory, we just need to run 2 commands:
|
||||
|
||||
* `pm2 start webapp.js --name=sl-web`
|
||||
* `pm2 start server.js --name=sl-server`
|
||||
- `pm2 start webapp.js --name=sl-web`
|
||||
- `pm2 start server.js --name=sl-server`
|
||||
|
||||
If you run `pm2 list`, you should see two processes running:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user