Pterodactyl File Manager increase 250 file limit
Pterodactyl is an open-source game control panel. When you view game server files, the file manager only lists 250 files per directory.
This is done to improve page loading performance, but if you have many files, you may want to disable the 250 file limit. To do this, edit file
1 2 |
cd /var/www/pterodactyl vi resources/scripts/components/server/files/FileManagerContainer.tsx |
Find
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<div> {files.length > 250 && ( <div css={tw`rounded bg-yellow-400 mb-px p-3`}> <p css={tw`text-yellow-900 text-sm text-center`}> This directory is too large to display in the browser, limiting the output to the first 250 files. </p> </div> )} {sortFiles(files.slice(0, 250)).map((file) => ( <FileObjectRow key={file.key} file={file} /> ))} <MassActionsBar /> </div> |
Replace with
1 2 3 4 5 6 |
<div> {sortFiles(files).map((file) => ( <FileObjectRow key={file.key} file={file} /> ))} <MassActionsBar /> </div> |
Another way is just to change the number 250 to a higher number.
Now rebuild the files
1 |
yarn build:production |
Create Laravel template cache
1 |
php artisan view:clear |
Change permissions for files. This command depends on the web server and OS you use. On RHEL-based OS with Nginx web server, I used
1 |
chown -R nginx:nginx /var/www/pterodactyl/ |
Back to pterodactyl