English简体中文

Paircast Server Deployment Guide

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.

Other setups (full Docker, Kubernetes) and every config field are documented in GO-IM's deploy/README.md and Paircast's server/README.md.

0. What you need

ItemNotes
ServerLinux, 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
VersionsThe 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 storagemp4 / m4v / mkv files in S3-compatible storage (Alibaba Cloud OSS, Tencent Cloud COS, Qiniu, MinIO, …) plus a read-only access key

1. Start GO-IM

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.

2. Register Paircast with GO-IM

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

3. Start the Paircast server (accounts and admin)

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.

4. Media library and watch rooms

4.1 Connect your video storage

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.

4.2 Subtitles and posters

4.3 Stickers (optional)

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.

5. Reverse proxy and HTTPS

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.

6. User accounts

The Paircast app has no sign-up; the admin creates every account.

6.1 Add users in the app

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.

6.2 From the command line (optional)

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.

7. Use it in the app

  1. Open Paircast → Service Configuration (top right of the login screen) → enter paircast.example.com → Save.
  2. Sign in with the admin or a friend's account, pick a title, open a room and send the invite link.

See the User Guide for details.

8. Maintenance

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)
Every secret (JWT, session secret, SMTP, app secrets, storage, TMDB, OpenSubtitles) stays in the server's 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.

9. Troubleshooting

SymptomFix
The server exits right after startingCheck 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 wrongAccounts 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 connectPAIRCAST_IM_PUBLIC_URL in .env is missing or wrong; it must be GO-IM's public address
The domain returns 404The reverse proxy doesn't send the Paircast domain to port 8090 (step 5)
No posters / online subtitlesTMDB / OpenSubtitles keys aren't set; add them and recreate the container

10. More