Skip to content

Local Dev on Linux (Nix)

Naterfute edited this page Nov 23, 2024 · 2 revisions

Prerequisites

  • Nix Package Manager
  • NodeJS (latest LTS version)
  • Docker Engine
  • Git

What is this?

This guide describes local development setup using Nix instead of Vagrant. 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

Getting Started

  1. Install Nix and enable flakes support (configuration varies by distribution)
  2. Clone the Pyrodactyl panel repository
  3. Install dependencies: npm i
  4. Build the application: npm run ship
    • This caches build results and uploads sourcemaps to Sentry
    • Subsequent builds are much faster if code hasn't changed
  5. Create environment file: cp .env.nix .env
  6. Initialize development environment: nix run
    • Completely Automated
    • Sets up Wings and required services
    • Configures databases and application
    • Takes approximately 15 minutes
  7. Once you see "Pyrodactyl is now up and running at localhost:8000", access the application
  8. Login using the credentials shown in your console

    ⚠️ Important: Always use localhost:8000, not 127.0.0.1, to avoid CORS issues!

  9. Visit http://localhost:8000/admin to create your first server

Known Issues

Currently, Pterodactyl Wings has compatibility issues with the NixOS development environment. This limitation is temporary and will be addressed in future updates.

Clone this wiki locally