v0.12.0 is a massive breaking change. If you have an instance of SyncParty deployed with data you care about, please make sure to copy the following files to a different directory before pulling the new version:
server/db
(the database)server/uploads
(all uploaded files)server/persistence.json
(current playing position for each item, for each user)After pulling the current version, create a data
directory on 1st level.
After setting up (see below), copy both files as well as the uploads
folder back into data
. If you run npm run prod:deploy
now, the app should work the same as before. Fingers crossed ?
Watch videos or listen to music synchronously with your friends. Imagine a virtual living room of a shared flat in a terribly cool city.
Demo video: https://www.youtube.com/watch?v=6t5-cAwSfjk
.mp4
, .mp3
, .m4a
, .flac
etc.)As this application is self-hosted, your & your friends' data stays as private as your server is secure. This project is completely open source and there is no tracking involved. However, if you're watching content on YouTube or similar sites, the 3rd party's usual tracking will happen.
npm ci
.env.example
into a new .env
.env
file:
NODE_ENV=production
3000
and 4000
work just fine; they are also used in the nginx example below.authbind
to run pm2 without root; see https://pm2.keymetrics.io/docs/usage/specifics/#listening-on-port-80-w-o-rootnpm run prod:deploy
server_name syncparty.YOURSITE.xyz;
location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /socket.io/ {
proxy_pass http://localhost:4000/socket.io/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
location /peerjs/ {
proxy_pass http://localhost:3000/peerjs/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
client_max_body_size 2048M;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/syncparty.YOURSITE.xyz/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/syncparty.YOURSITE.xyz/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
If you spot a bug or want to contribute feel free to create an issue.
npm ci
.env.example
into a new .env
.env
file:
NODE_ENV=development
(default)3000
and 4000
are default.npm run dev:server
npm run dev:client
https://localhost:3000
SyncParty is written in TypeScript, using ES Modules.
The server is built with Express, Sequelize, sqlite, express-session. Cookie-based authentication: Passport.js.
The client is a React application in TypeScript.
Realtime communication is realized with Socket.io. Video chat via PeerJS.
The built client application is delivered via the app server. If you run npm run prod:deploy
, the built files are copied into the public
dir of the build folder. An index.html
is statically served to respond to all requests, except those routed to /api/...
. A reverse proxy like nginx is needed to use HTTPS. You can find an example configuration above.
The app has to be built before you can create users.
npm run dev:server
npm run prod:server:build
or having run npm run prod:deploy
at least onceYou can run the following commands with a preceding space, preventing the passwords from being written into your bash history. [TODO better CLI]
[SPACE] npm run cli create-user <USERNAME> <PASSWORD> admin
[SPACE] npm run cli create-user <USERNAME> <PASSWORD>
[SPACE TO BYPASS BASH HISTORY] npm run cli
+
create-user <USERNAME> <PASSWORD> [admin]
list-users
delete-user <USERNAME>
delete-all-users
change-password <USERNAME> <NEW PASSWORD>