ActivityPub-federated video streaming platform using P2P directly in your web browser
Require NodeJS 22
Chocobozzz1947d5fd5991
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.ymlindex 94f07e6452..04cbe58cfa 100644--- a/.github/workflows/benchmark.yml+++ b/.github/workflows/benchmark.yml@@ -37,7 +37,7 @@ jobs:- uses: './.github/actions/reusable-prepare-peertube-build'with:- node-version: '20.x'+ node-version: '22.x'- uses: './.github/actions/reusable-prepare-peertube-run'diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.ymlindex 619a0fb455..747a5cb9e4 100644--- a/.github/workflows/docker.yml+++ b/.github/workflows/docker.yml@@ -54,7 +54,7 @@ jobs:- uses: './.github/actions/reusable-prepare-peertube-build'if: ${{ matrix.build-peertube }}with:- node-version: '20.x'+ node-version: '22.x'- name: Buildif: ${{ matrix.build-peertube }}diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.ymlindex 904abe568f..04d52e44f3 100644--- a/.github/workflows/nightly.yml+++ b/.github/workflows/nightly.yml@@ -20,7 +20,7 @@ jobs:- uses: './.github/actions/reusable-prepare-peertube-build'with:- node-version: '20.x'+ node-version: '22.x'- name: Buildrun: npm run nightlydiff --git a/.github/workflows/stats.yml b/.github/workflows/stats.ymlindex fd53cb9244..9b7ed353b1 100644--- a/.github/workflows/stats.yml+++ b/.github/workflows/stats.yml@@ -24,7 +24,7 @@ jobs:- uses: './.github/actions/reusable-prepare-peertube-build'with:- node-version: '20.x'+ node-version: '22.x'- name: Buildrun: npm run build -- --analyze-bundlediff --git a/.github/workflows/test.yml b/.github/workflows/test.ymlindex 3d13a1d858..bbbc7f71e4 100644--- a/.github/workflows/test.yml+++ b/.github/workflows/test.yml@@ -69,7 +69,7 @@ jobs:- uses: './.github/actions/reusable-prepare-peertube-build'with:- node-version: '20.x'+ node-version: '22.x'- uses: './.github/actions/reusable-prepare-peertube-run'diff --git a/AGENTS.md b/AGENTS.mdindex f3875d6841..9124e9202f 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -45,7 +45,7 @@ handled via FFmpeg, with optional distributed runners.### Prerequisites-- Node.js >= 20.x+- Node.js >= 22.x- pnpm >= 10.9 (do **not** use npm or yarn for install)- PostgreSQL >= 10 with `pg_trgm` and `unaccent` extensions- Redis >= 6.x@@ -278,7 +278,7 @@ docker run -p 8082:8080 \### CI pipelineGitHub Actions (`.github/workflows/test.yml`), Ubuntu 22.04, Node.js-20.x. Matrix strategy runs suites in parallel: `types-package`,+22.x. Matrix strategy runs suites in parallel: `types-package`,`client`, `api-1`–`api-5`, `cli-plugin`, `lint`, `transcription`,`external-plugins`.diff --git a/package.json b/package.jsonindex 13c7104457..fb88917b9b 100644--- a/package.json+++ b/package.json@@ -5,7 +5,7 @@"private": true,"licence": "AGPL-3.0","engines": {- "node": ">=20.x",+ "node": ">=22.x","pnpm": ">=10.9"},"type": "module",diff --git a/server/core/initializers/checker-before-init.ts b/server/core/initializers/checker-before-init.tsindex f156c33d22..9b85967b61 100644--- a/server/core/initializers/checker-before-init.ts+++ b/server/core/initializers/checker-before-init.ts@@ -331,15 +331,11 @@ export function checkNodeVersion () {logger.debug(`Checking NodeJS version ${v}`)- if (major < 20) {- throw new Error(`Your NodeJS version ${v} is not supported. Please upgrade.`)- }-- if (major === 20 && minor < 19) {- throw new Error(`NodeJS v20.19 and above is required`)+ if (major < 22) {+ throw new Error(`Your NodeJS version ${v} is not supported. Please upgrade to NodeJS 22 or NodeJS 24`)}if (major === 22 && minor < 12) {- throw new Error(`NodeJS v22.12 and above is required`)+ throw new Error(`NodeJS >= v22.12 or NodeJS 24 is required`)}}diff --git a/support/doc/dependencies.md b/support/doc/dependencies.mdindex 1fa82c03c4..b35e147f0a 100644--- a/support/doc/dependencies.md+++ b/support/doc/dependencies.md@@ -4,8 +4,8 @@Main dependencies supported by PeerTube:- * `node` LTS (**>= 20.19 and < 21** or **>= 22.12 and <23**)- * `yarn` 1.x for **PeerTube <= 7.3** or `pnpm` >= 10.x for **PeerTube >= 8.0**+ * `node` LTS (**>= 22.12 and <25**)+ * `pnpm` >= 10.x* `postgres` >=10.x* `redis-server` >=6.2* `ffmpeg` >=4.3 (using a ffmpeg static build [is not recommended](https://github.com/Chocobozzz/PeerTube/issues/6308))@@ -27,12 +27,9 @@ _note_: only **LTS** versions of external dependencies are supported. If no LTS1. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access. You can see a guide for how to do this in Debian/Ubuntu [here](https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-20-04).-1. Install NodeJS 20.x: https://nodesource.com/products/distributions+1. Install NodeJS 22.x: https://nodesource.com/products/distributions-1. **PeerTube <= v7.3 only** Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest):-[https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab)--1. **PeerTube >= v8.0 only** Install [PNPM](https://pnpm.io/fr/installation):+1. Install [PNPM](https://pnpm.io/fr/installation):```shsudo npm install -g pnpm@@ -67,9 +64,7 @@ sudo systemctl start redis postgresqlRun:```sh-sudo pacman -S nodejs-lts-iron yarn ffmpeg postgresql openssl redis git wget unzip python python-pip base-devel npm nginx-sudo pacman -S yarn # PeerTube <= v7.3 only-sudo pacman -S pnpm # PeerTube >= v8.0 only+sudo pacman -S nodejs-lts-iron ffmpeg postgresql openssl redis git wget unzip python python-pip base-devel npm nginx pnpm```Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis:@@ -80,11 +75,9 @@ sudo systemctl start redis postgresql## CentOS 7-1. Install NodeJS 20.x: https://nodesource.com/products/distributions--1. **PeerTube <= v7.3 only** Install [yarn](https://yarnpkg.com/en/docs/install):+1. Install NodeJS 22.x: https://nodesource.com/products/distributions-1. **PeerTube >= v8.0 only** Install [PNPM](https://pnpm.io/fr/installation):+1. Install [PNPM](https://pnpm.io/fr/installation):```shsudo npm install -g pnpm@@ -131,12 +124,9 @@ sudo systemctl enable --now postgresql## Centos 8-1. Install NodeJS 20.x: https://nodesource.com/products/distributions--1. **PeerTube <= v7.3 only** Install yarn:-[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)+1. Install NodeJS 22.x: https://nodesource.com/products/distributions-1. **PeerTube >= v8.0 only** Install [PNPM](https://pnpm.io/fr/installation):+1. Install [PNPM](https://pnpm.io/fr/installation):```shsudo npm install -g pnpm@@ -186,17 +176,12 @@ sudo systemctl enable --now postgresqlsudo dnf update -y```-1. Install NodeJS 20.x:+1. Install NodeJS 22.x:```sh- sudo dnf module install -y nodejs:20+ sudo dnf module install -y nodejs:22```-1. **PeerTube <= v7.3 only** Install yarn:- ```sh- sudo npm install --global yarn- ```--1. **PeerTube >= v8.0 only** Install PNPM:+1. Install PNPM:```shsudo npm install --global pnpm```@@ -236,12 +221,9 @@ sudo systemctl enable --now postgresql1. (Optional) Install certbot (choose instructions for your distribution):[https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions)-1. Install NodeJS 20.x: https://nodesource.com/products/distributions--1. **PeerTube <= v7.3 only** Install yarn:-[https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install)+1. Install NodeJS 22.x: https://nodesource.com/products/distributions-1. **PeerTube >= v8.0 only** Install PNPM:+1. Install PNPM:```shsudo npm install --global pnpm```@@ -335,17 +317,10 @@ sudo systemctl enable --now postgresql1. Install NodeJS```sh- sudo dnf module install nodejs:20- ```--1. **PeerTube <= v7.3 only** Install Yarn-- ```sh- curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo- sudo dnf install yarn+ sudo dnf module install nodejs:22```-1. **PeerTube >= v8.0 only** Install PNPM:+1. Install PNPM:```shsudo npm install --global pnpm```@@ -438,17 +413,12 @@ On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail```shpkgpkg update- pkg install -y sudo bash wget git python nginx pkgconf postgresql13-server postgresql13-contrib redis openssl node npm yarn ffmpeg unzip+ pkg install -y sudo bash wget git python nginx pkgconf postgresql13-server postgresql13-contrib redis openssl node npm ffmpeg unzip```1. install `sharp` build dependencies: https://sharp.pixelplumbing.com/install/#building-from-source-1. **PeerTube <= v7.3 only** Install Yarn:- ```sh- pkg install -y yarn- ```--1. **PeerTube >= v8.0 only** Install PNPM:+1. Install PNPM:```shsudo npm install --global pnpm```@@ -488,8 +458,7 @@ On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail```shbrew install ffmpeg nginx postgresql openssl gcc make redis git- brew install yarn # PeerTube <= v7.3 only- brew install pnpm # PeerTube >= v8.0 only+ brew install pnpm```1. Run the services:@@ -508,7 +477,6 @@ On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail```net-libs/nodejs- sys-apps/yarnsys-apps/pnpmmedia-video/ffmpeg[x264] # Optionally add vorbis,vpxdev-db/postgresql@@ -523,13 +491,12 @@ On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jail# app-crypt/certbot```-1. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 yarn:+1. If you are on a "stable" Gentoo you need to accept the testing keyword ~amd64 pnpm:```shmkdir -p /etc/portage/package.keywordscat << EOF >> /etc/portage/package.keywords/peertube- # required by yarn (argument) for PeerTube- sys-apps/yarn ~amd64+ # required by pnpm (argument) for PeerTubesys-apps/pnpm ~amd64EOF```@@ -569,13 +536,7 @@ On a fresh install of [FreeBSD](https://www.freebsd.org), new system or new jailpkg_add sudo bash wget git python nginx pkgconf postgresql-server postgresql-contrib redis openssl```-1. **PeerTube <= v7.3 only** Install yarn:-- ```sh- npm install --global yarn- ```--1. **PeerTube >= v8.0 only** Install PNPM:+1. Install PNPM:```shsudo npm install --global pnpm```diff --git a/support/doc/tools.md b/support/doc/tools.mdindex 0e4130fc6d..9e97c6e512 100644--- a/support/doc/tools.md+++ b/support/doc/tools.md@@ -12,7 +12,7 @@ It can be launched from a remote server/computer to easily upload videos, manageEnsure you have `node` installed on your system:```bash-node --version # Should be >= 20.x+node --version # Should be >= 22.x```Then install the CLI:@@ -143,7 +143,7 @@ You can read the admin documentation on how to use PeerTube runners on https://dEnsure you have `node`, `ffmpeg` and `ffprobe` installed on your system:```bash-node --version # Should be >= 20.x+node --version # Should be >= 22.xffprobe -version # Should be >= 4.3ffmpeg -version # Should be >= 4.3```diff --git a/support/docker/production/Dockerfile b/support/docker/production/Dockerfileindex 656fa9d377..68797c1409 100644--- a/support/docker/production/Dockerfile+++ b/support/docker/production/Dockerfile@@ -1,4 +1,4 @@-FROM node:20-trixie-slim+FROM node:22-trixie-slimARG ALREADY_BUILT=0