Skip to content

Local Dev on Linux (Vagrant)

Naterfute edited this page Dec 27, 2024 · 4 revisions

Prerequisites

  • NodeJS (Latest LTS version)
  • Git
  • Vagrant
  • libvirtd
  • nfs-utils

Installing NFS Utils

  1. Fedora:

    sudo dnf install nfs-utils

    Ubuntu/Debian:

    sudo apt-get install nfs-kernel-server
  2. Enable and start the NFS server:

    # Start the service
    sudo systemctl start nfs-server
    
    # Enable on boot
    sudo systemctl enable nfs-server

Development Setup

Follow these steps to set up your development environment:

  1. Clone the Pyrodactyl panel repository
  2. Install dependencies: npm i
  3. Build the project: npm run ship
    • This caches build results and uploads sourcemaps to Sentry
    • Subsequent builds without code changes are nearly instant
  4. If Using libvirt vagrant plugin install vagrant-libvirt

Important

Files must be in /var/www/pterodactyl for vagrant up to work, unless specified otherwise in Vagrantfile

  1. Run vagrant up to initialize the environment
    • Sets up wings and required services
    • Configures databases and applications
    • Takes approximately 15 minutes
  2. Access Pyrodactyl at localhost:3000 and login with the console-provided credentials

    ⚠️ Important: Use localhost, not 127.0.0.1, to avoid CORS issues

Troubleshooting

  • 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: sudo vagrant up