Local Development
Set up a local development environment using Nix, Vagrant on Linux, or Vagrant on Windows
Local Development
There are three ways to set up a local development environment for Pyrodactyl:
- Using Nix on Linux (recommended for faster performance)
- Using Vagrant on Linux (traditional VM-based approach)
- Using Vagrant on Windows (first Pterodactyl panel with Windows development support)
Local Dev with Nix
This approach offers several advantages:
- Faster boot times without VM overhead
- Lower resource consumption
- Flexible configuration through nix/buildsteps.sh
- Improved reliability across Linux distributions
Prerequisites for Nix Setup
- Nix Package Manager
- NodeJS (latest LTS version)
- Docker Engine
- Git
Getting Started with Nix
-
Install Nix and enable flakes support (configuration varies by distribution)
-
Clone the Pyrodactyl panel repository
-
Install dependencies:
-
Build the application:
This step:
- Caches build results
- Uploads sourcemaps to Sentry
- Subsequent builds are much faster if code hasn't changed
-
Create environment file:
-
Initialize development environment:
Nix Setup Process
The initialization process is completely automated:
- Sets up Wings and required services
- Configures databases and application
- Takes approximately 15 minutes
Once you see "Pyrodactyl is now up and running at localhost:8000", access the application and login using the credentials shown in your console.
Always use localhost:8000, not 127.0.0.1, to avoid CORS issues!
Visit http://localhost:8000/admin
to create your first server.
Known Issues with Nix
Currently, Pterodactyl Wings has compatibility issues with the NixOS development environment. This limitation is temporary and will be addressed in future updates.
Local Dev with Vagrant on Linux
Prerequisites for Vagrant Setup
- NodeJS (Latest LTS version)
- Git
- Vagrant
- libvirtd
- nfs-utils
Installing NFS Utils
For Fedora:
For Ubuntu/Debian:
Enable and start the NFS server:
Development Setup with Vagrant
-
Clone the Pyrodactyl panel repository
-
Install dependencies:
-
Build the project:
This step:
- Caches build results
- Uploads sourcemaps to Sentry
- Subsequent builds without code changes are nearly instant
-
If using libvirt, install the vagrant-libvirt plugin
Files must be in /var/www/pterodactyl for vagrant up to work, unless specified otherwise in Vagrantfile
-
Initialize the environment:
This process:
- Sets up wings and required services
- Configures databases and applications
- Takes approximately 15 minutes
-
Access Pyrodactyl at
localhost:3000
and login with the console-provided credentials
Always use localhost, not 127.0.0.1, to avoid CORS issues!
Troubleshooting Vagrant Setup
VM Configuration
When using alternatives to libvirtd, modify the Vagrantfile to allocate more than the default 512MB RAM
NFS Mount Error
If you encounter a "Connection refused" error during first vagrant up
, simply retry the command
Permission Issues
Run commands with sudo:
Local Dev with Vagrant on Windows
Pyrodactyl is the world's first Pterodactyl panel that can be developed and run locally (with Wings) on Windows machines through Vagrant.
Prerequisites for Windows
- NodeJS (latest LTS version)
- Vagrant
- Git
Installing on Windows
-
Clone the Pyrodactyl panel repository
-
Install dependencies:
-
Build the application:
This step:
- Caches build results
- Uploads sourcemaps to Sentry
- Subsequent builds are much faster if code hasn't changed
-
Initialize the environment:
This process:
- Sets up Pterodactyl Wings and necessary services
- Configures databases and applications
- Takes approximately 15 minutes
-
Login using the credentials shown in your console
Always use localhost:8000, not 127.0.0.1, to avoid CORS issues!
- Visit
http://localhost:8000/admin
to create your first server
Development Notes
Development Server
- Running
npm run dev
serves a development build at localhost:3000 with Hot Module Replacement (HMR) - For production preview:
- Stop the dev server
- Run
npm run ship
- Access http://localhost:3000
Troubleshooting Connection Issues
- If localhost:3000 hangs indefinitely:
- Check for port conflicts with other applications (e.g., Steam using port 8080)
- After resolving conflicts, run
vagrant reload
to reset port mappings
VirtualBox Shared Folders
If encountering "Vagrant was unable to mount VirtualBox shared folders":
Performance Tips
- Set up Remote Caching via Turbo for faster builds
- Cached results allow production server builds to complete in milliseconds
Virtualization Notes
Avoid Hyper-V as your virtualization layer
- Recommended: VMWare Workstation or VirtualBox
- If prompted for password with Hyper-V, use your Windows credentials