Building Panel Assets
Rebuild the Panel's frontend after you change its source code.
Introduction
The Panel's frontend is written in React and TypeScript. The release archive ships it prebuilt, with its source in resources/scripts; if you change the source, rebuild the frontend to see the change.
Build on a development or staging machine if you can. Building uses a lot of memory and CPU for a few minutes.
Installing Node.js
Building needs Node.js 22.12 or newer. Ubuntu's package is too old, so install it from NodeSource:
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt -y install nodejsBuilding the Frontend
Install the build tools, then build the frontend:
cd /var/www/pterodactyl
npm ci
npm run build:productionThe build writes to public/assets. Give the web server user ownership of the files again, then reload the Panel in your browser:
chown -R www-data:www-data /var/www/pterodactyl/*Working on the Frontend
While working on a change, run this to rebuild the frontend every time you save a file:
npm run watchStop it with CTRL+C, then run npm run build:production when you are done.
Last updated on