Community GuidesCustomization

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.

Updating the Panel replaces its source files, so your changes are lost. First check whether an extension or a theme can do what you need. Both keep working across updates.

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 nodejs

Building the Frontend

Install the build tools, then build the frontend:

cd /var/www/pterodactyl
npm ci
npm run build:production

The 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 watch

Stop it with CTRL+C, then run npm run build:production when you are done.

Edit on GitHub

Last updated on

On this page