The Paircast backend has two parts: the Paircast server (server/ in the Paircast repo) handles accounts, the admin console, the media library and watch rooms; the open-source IM GO-IM handles chat and playback-sync signals. This guide deploys both on one Linux host with Docker. Once they are running, enter the server address in the app's Service Configuration.
| Item | Notes |
|---|---|
| Server | Linux, 2 vCPU / 2 GB or more, with Docker 20.10+ and Docker Compose v2 |
| Domains (recommended) | Two subdomains pointing at the server, for HTTPS: one for the Paircast server (e.g. paircast.example.com, the address users enter in the app) and one for GO-IM (e.g. im.example.com). Not needed for LAN-only use |
| Versions | The Paircast server ships with the app under the same version; Paircast 2.0.0 needs GO-IM 2.0.0 or later (stickers and the avatar storage layout depend on it). The default latest images satisfy this; when pinning versions, see the Paircast Releases notes for the matching GO-IM version |
| Mail account (optional) | Any mailbox with SMTP, used to send initial passwords to you and your friends; without it the passwords show up in the log / app |
| Video storage | mp4 / m4v / mkv files in S3-compatible storage (Alibaba Cloud OSS, Tencent Cloud COS, Qiniu, MinIO, …) plus a read-only access key |
mkdir go-im && cd go-im
base=https://raw.githubusercontent.com/chaishuanzhu/GO-IM/main/deploy/docker
curl -fsSLO $base/docker-compose.minimal.yml
curl -fsSLO $base/config.minimal.json
# Required: JWT signing secret
sed -i.bak "s|CHANGE_ME_run_openssl_rand_base64_48|$(openssl rand -base64 48 | tr -d '\n/+=')|" config.minimal.json
Accounts are managed by the Paircast server, so GO-IM's own sign-up endpoint isn't needed; close it by adding "disable_registration": true under gateway.auth in config.minimal.json.
The Paircast server calls GO-IM's server API as an integrated app. Add this under gateway in config.minimal.json:
"server_api": {
"apps": [
{
"app_id": "paircast",
"webhook_url": "http://paircast:8090/im/webhook",
"webhook_events": ["group.member_left", "group.dismissed"]
}
]
},
The app secrets go in apps.env in the same directory (both GO-IM and the Paircast server read it). Then start GO-IM:
echo "GOIM_APP_PAIRCAST_SECRET=$(openssl rand -hex 32)" >> apps.env
echo "GOIM_APP_PAIRCAST_WEBHOOK_SECRET=$(openssl rand -hex 32)" >> apps.env
docker compose -f docker-compose.minimal.yml up -d
curl http://127.0.0.1:8080/health # ready when it returns "status":"ok"
This starts the gateway, MySQL, Redis and RustFS (which stores small files such as shared subtitles and avatars). Whenever you change config.minimal.json, .env or apps.env, recreate the gateway so it reloads (“restart the gateway” below):
docker compose -f docker-compose.minimal.yml up -d --force-recreate gateway
Download the Paircast server's compose file and config into the same directory:
base=https://raw.githubusercontent.com/chaishuanzhu/Paircast/main/server/deploy/docker
curl -fsSLO $base/docker-compose.paircast.yml
curl -fsSLO $base/paircast.json
Set the session secret, GO-IM's public address (sent to the app at sign-in so it knows where to connect for chat), the admin email and the password of Paircast's database user in .env:
echo "PAIRCAST_SESSION_SECRET=$(openssl rand -hex 32)" >> .env
echo "PAIRCAST_IM_PUBLIC_URL=https://im.example.com" >> .env
echo "PAIRCAST_ADMIN_EMAIL=you@example.com" >> .env
echo "PAIRCAST_MYSQL_PASSWORD=$(openssl rand -hex 16)" >> .env
Mail (SMTP) is optional: with it, the initial passwords for you and new users are emailed to each address; without it, the admin's initial password goes to the Paircast server log and new users' passwords are shown in the app for the admin to pass on. To send mail, add this to paircast.json:
"mail": {
"enabled": true,
"host": "smtp.example.com",
"port": 465,
"username": "no_reply@example.com",
"from": "Paircast <no_reply@example.com>"
}
Keep the SMTP password out of the config file; put it in .env: PAIRCAST_MAIL_PASSWORD=your-smtp-password.
Configure the library in the next step, then start everything. On startup the Paircast server creates an admin account for PAIRCAST_ADMIN_EMAIL and mails it a random password (without mail, or if sending fails, the password is in docker compose -f docker-compose.paircast.yml logs paircast). Sign in to the app with that email and password; you will be asked to change the password the first time.
Point media.sources in paircast.json at your storage (keys don't go here):
"media": {
"sources": [
{
"id": "oss",
"name": "My Library",
"type": "s3",
"s3": {
"endpoint": "oss-cn-hangzhou.aliyuncs.com",
"bucket": "my-videos",
"region": "cn-hangzhou",
"prefix": "films/",
"use_ssl": true,
"path_style": false
}
}
]
}
Add the read-only keys to .env, then start it:
MEDIA_OSS_ACCESS_KEY=read-only-access-key
MEDIA_OSS_SECRET_KEY=read-only-secret-key
docker compose -f docker-compose.paircast.yml up -d
docker compose -f docker-compose.paircast.yml logs paircast # ready when it shows listening on :8090
After changing paircast.json, .env or apps.env, run docker compose -f docker-compose.paircast.yml up -d --force-recreate (“restart the Paircast server” below). The app's Library lists the mp4 / m4v / mkv files under prefix.
endpoint is the regional S3 API host without https://; do not use a CDN domain. Play links are presigned for this host, so it must be publicly reachable from phones — not a container-internal address like rustfs:9000. Qiniu and MinIO usually need "path_style": true.id becomes part of every movie ID, so don't change it later. If your id is not oss, add matching PAIRCAST_MEDIA_<UPPERCASE_ID>_ACCESS_KEY / _SECRET_KEY entries to environment in docker-compose.paircast.yml.paircast database on GO-IM's MySQL server, with its own paircast user that can only access that database (the paircast-db service in the compose file creates both on every start). Shared subtitles live in RustFS; nothing else needs deploying.Inception.2010.mkv with Inception.2010.srt, Inception.2010.zh.ass or Inception.2010_en.vtt (srt / vtt / ass / ssa).{name}.nfo and {name}-poster.jpg next to the video are used first; otherwise the server can query TMDB.TMDB_ACCESS_TOKEN=… (your TMDB API Read Access Token) to .env and restart the Paircast server.OPENSUBTITLES_API_KEY=… to .env and restart the Paircast server.Stickers are a GO-IM feature: they live under the stickers/ prefix of the GO-IM object storage bucket and the GO-IM gateway serves them publicly at /stickers/. The Paircast server needs no sticker settings. Import packs from the GO-IM repo:
S3_ENDPOINT=http://127.0.0.1:9000 S3_BUCKET=im-files \
S3_ACCESS_KEY=rustfsadmin S3_SECRET_KEY=… \
scripts/upload_stickers.sh stickers-dist
See “Object storage layout and stickers” in GO-IM's deploy/README.md for the pack format and build scripts.
The Paircast server and GO-IM each get their own domain: the Paircast domain goes to 8090, the GO-IM domain to 8080. Users enter only the Paircast address in the app; at sign-in the server tells the app where GO-IM is (PAIRCAST_IM_PUBLIC_URL from the previous step). Caddy obtains certificates automatically and passes WebSocket through:
# /etc/caddy/Caddyfile
paircast.example.com {
reverse_proxy 127.0.0.1:8090 # Paircast server
}
im.example.com {
reverse_proxy 127.0.0.1:8080 # GO-IM
}
The server address in the app is then paircast.example.com. With nginx, forward the Upgrade / Connection headers on the GO-IM site. For LAN-only use you don't need a certificate: use the site names :80 and :8081, enter http://192.168.x.x in the app and set PAIRCAST_IM_PUBLIC_URL to http://192.168.x.x:8081.
The Paircast app has no sign-up; the admin creates every account.
Sign in to the app as the admin → Me → Admin Console → User Management → Add User (top right) → enter your friend's email (nickname optional) → Add. With mail set up, the initial password is emailed to them; otherwise (or if sending fails) it is shown on screen — tap Copy and pass it on privately (it isn't shown again). They must change it on first sign-in.
Users can delete their own account in the app under Me → Delete Account after entering their password (admin accounts excepted). For a forgotten password, the admin can delete the old account in Admin Console → User Management and add the same email again; the same screen can also disable / enable accounts. Reports are handled under Admin Console → Reports; banning also disables the account.
SERVER=https://paircast.example.com
curl -s -X POST $SERVER/account/login -d account=you@example.com -d password='admin-password'
# note "token" in the response
curl -s -X POST $SERVER/console/users/create -H "Authorization: Bearer TOKEN_FROM_ABOVE" \
-d email=friend@example.com -d nickname=Sam
Without mail, or if the mail could not be sent, the response includes initial_password; pass it on privately.
paircast.example.com → Save.See the User Guide for details.
docker compose -f docker-compose.minimal.yml logs -f gateway # GO-IM logs
docker compose -f docker-compose.paircast.yml logs -f paircast # Paircast server logs
docker compose -f docker-compose.minimal.yml pull && docker compose -f docker-compose.minimal.yml up -d # upgrade GO-IM
docker compose -f docker-compose.paircast.yml pull && docker compose -f docker-compose.paircast.yml up -d # upgrade the Paircast server
GOIM_TAG=x.y.z docker compose -f docker-compose.minimal.yml up -d # pin / roll back (PAIRCAST_TAG for the Paircast server)
GOIM_TAG and PAIRCAST_TAG in .env and back up the MySQL and RustFS volumes regularly.RUSTFS_SECRET_KEY (both compose files share .env), and set gateway.check_origin to your domain.config.minimal.json / .env / apps.env. Never send them to users or commit them to git. Users only need the server address and their own account.
| Symptom | Fix |
|---|---|
| The server exits right after starting | Check docker compose -f docker-compose.paircast.yml logs paircast: missing app secret (check apps.env), empty media.sources, or the database init failed (logs paircast-db) |
| Sign-in says the account or password is wrong | Accounts live in the Paircast server, not in GO-IM; the admin's initial password is in the email or in logs paircast |
| Signed in, but chat doesn't connect | PAIRCAST_IM_PUBLIC_URL in .env is missing or wrong; it must be GO-IM's public address |
| The domain returns 404 | The reverse proxy doesn't send the Paircast domain to port 8090 (step 5) |
| No posters / online subtitles | TMDB / OpenSubtitles keys aren't set; add them and recreate the container |