Docker migration from a server to another, UI & API fine but only download working

Edit: title changed to reflect fixes, namely currently streaming does not work.

Well despite writing How to migrate a peertube docker instance to another host somehow I’m stuck.

I did roughly what was said there only to notice my docker-compose didn’t have a version pinned. I tried (from 6.3.1 to prod, so 7.x.y) and it looked fine but videos where not viewable.

I tried to rollback, copying all videos again, starting with v6.3.1-bookworm this time. I do docker-compose up and it starts, no problem.

When I connect though I get a blank page. I check the console and see ERROR TypeError: can’t access property « map », this.serverConfig.theme.builtIn is undefined but found nothing on Github.

but if I connect to the API, e.g. /api/v1/search/videos?tagOneOf=q2 then no problem content seems to be reached.

I don’t really know what’s wrong.

I even try to revert the DNS so that https://video.benetou.fr/ would point back to my “old” server with the old instance but somehow (and that’s really weird) I get the same error!

I tried debugging with curl but I just get We are sorry but it seems that PeerTube is not compatible with your web browser
so that doesn’t help me debug.

I imagine maybe something of the UI has to be rebuilt. Honestly lost here.

PS: old server IP is 176.31.224.110 and new is 91.98.148.229 , I kept both running for now but default to old.

Other services were actually pined so might not come from that either.

Here is the compose file https://fabien.benetou.fr/pub/home/peertube_transition_631.yaml

This make realize I somehow have an assets named volume… might be related. I can’t recall doing that.

So I recreate without assets volume on the new server, and at least it does load the interface but then I get The media could not be loaded, either because the server or network failed or because the format is not supported.

Console says chunk-DMXWVIMX.js:9 VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported. vi
(anonymous) @ chunk-DMXWVIMX.js:9
chunk-A6KXOXHG.js:9 Fatal error in player vi

Wondering if it could be related to MIME types because

wget https://video.benetou.fr/static/web-videos/d00ea9bd-3e4e-42ed-8261-09e6de9c2c9e-480.mp4 on the new server works (so direct access, no Web UI) via .e.g VLC but trying to play that same video straight from the browser fails, also no UI.

I downloaded a video from the new server https://video.benetou.fr/w/rugsEB2sSbqgixNm2QjumH (but forcing IP 91.98.148.229 via local /etc/hosts) and uploaded back behind on same new server, thus behind the same reverse proxy (nginx 1.19) and it works no problem https://fabien.benetou.fr/pub/home/TestNewServer.mp4 so maybe not MIME types issue.

Versions :

from 6.3.1 with Docker version 28.5.1, build e180ab8 on a Ubuntu 22.04.5 LTS behind nginx 1.19 :

root@ns3031697:/home/fabien# docker image ls | grep peer
chocobozzz/peertube production-bookworm b35f7a95ebdb 13 months ago 1.71GB

to Debian 13 with Docker version 28.5.2, build ecc6942.

I’m specifying the host distribution and Docker versions because I believe the rest is equivalent.

Tried with latest nginx namely nginx/1.29.3 as reverse proxy and same issue, it all works (UI, API, downloads) but no streaming HLS.js error: mediaError - fatal: true - manifestIncompatibleCodecsError so impossible to “normally” play a video.

I also read PeerTube platform migration | PeerTube documentation but nothing specific. It doesn’t seem to concern Docker.

I also checked logs https://fabien.benetou.fr/pub/home/peertube_moved_631.json but AFAICT nothing useful.

I did have a warning about storage.web-videos which should be of value web-videos rather than videos but I tried either way, didn’t change anything.

Apparently the SHA256 for this image I used then is chocobozzz/peertube@sha256:ceabd81bb608c22a154f4b0cf6c318a16b852fe17631220021ca6d4cbaada9ea so I tried pulling on that specific hash… but still no change.

Also checked few related issues in GitHub · Where software is built but nothing obvious come to mind. Policies from the reverse proxy are unchanged on the new instance. It’s all behind HTTPS AFAICT.

So… because I’m running out of ideas I just started from scratch :

and it works, namely there video is there (as usual) and it does stream.

Noted that I brought this instance down, it was just working for a test so if it doesn’t work anymore it’s normal.

So… now I have to figure out what changed. I don’t understand because I believe it’s the same reverse proxy with the same configuration, the same container with the same data… and yet.

Trying to summarize what I believe :

  1. new server works well as Docker host, reverse proxy (nginx like on old server) behaves as expected, all other services (e.g. PmWiki, CopyParty, etc) work just like before
  2. installing a fresh PeerTube install works, namely streaming works (which proves point 1)
  3. database is at least in part fine as the container on the new server display all content (video names, thumbnails, views, etc)
  4. video files are fine as the download links do work

If I run out of ideas I’ll consider PeerTube platform migration | PeerTube documentation but I’d rather avoid having to do so.

Eh… maybe it works after all? I’m very confused but please feel free to check https://video.benetou.fr/ and tell me videos to stream. Maybe it was a caching issue all along and I wasn’t patient enough?

My hypothesis is that the player in the browser, maybe due to WebWorks, had cached the IP of the content. So I was getting the UI/API from the new IP but the content itself (namely video files) from the old IP which might have created some CORS/CSP issues and that the player itself blocked it.