Server setup
Keep in mind that by the end, you will need a generated user key pair from a client/player installation in order to tell the server who the owner is and to be able to connect to it.
The current simplified way to install the server is to use the provided docker-compose.yaml file below.
services:
watch-together-server:
image: docker-registry.watchtogetherplayer.com/v2/watch-together-server:latest
ports:
- "9001:9001"
- "9000:9000"
volumes:
- ./wt-server/FileStorage:/App/FileStorage
- ./wt-server/logs:/App/logs
depends_on:
- postgres
postgres:
image: postgres:17.2-alpine
volumes:
- ./wt-server/database:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_USER=postgres
Instructions
- Install docker compose on the target server/system
- Create a docker-compose.yaml in the directory where the data will be stored
- Copy and paste the contents above inside the file
- Run docker compose up -d (inside the directory with the docker-compose.yaml file)
docker compose up -d
This will pull the necessary images and run the server.
There will be a new directory created called "wt-server" where you started the command.
Inside this directory there will be 3 sub-directories:
- FileStorage - Configuration, temporary directories, and the "Media" directory that you will be interacting with.
- logs - Server logs.
- database - Postgres database data.
The FileStorage directory will look like this:
- FileStorage
- Configuration
- KeyManager
- Media
- MediaLibrary
- RequestTemporary
- UploadTemporary
- UserManager
Right now you will be interested in the UserManager directory.
In there you will find a file called "serverOwnerKey.txt".
Inside it you have to paste your client public key.
You get it by starting your player/client application and in the server tab key section clicking copy.
Once pasted and saved, restart the server. (Go back to where the docker-compose.yaml file is)
docker compose restart
The startup process shouldn't take long and you should now be able to connect to your server by providing the address to the server in your player/client.
You can observe the server logs live with:
docker compose logs -f
The server listens on port 9001 by default, you don't have to type the port in the client if you didn't change it.
After connecting you should have an admin panel button appear in the bottom left corner of the client app.
This is the place where you manage the server, its media, including users, and their access.
You can now proceed to adding media to your server and inviting users.
Updating the server
When a new version of the server comes out, you will eventually want to update it.
To do so is very simple:
First we stop it:
docker compose down
Then we pull the new images:
docker compose pull
And start it back up:
docker compose up -d
(-d makes it "detached", so it doesn't consume your input and doesn't stop when you log out)
Cleanup
Old server images can start taking up storage.
To clean them up after an update you can run:
docker image prune
It will ask you if you want to remove "dangling" images, you confirm and the space should be reclaimed.