Makefile Commands

The NexPanel Makefile wraps common development tasks. Run make help to see all available targets from your terminal.

Development

Start the dev server with hot-reload:

make dev

Watches Go, HTML, CSS, and JS files. Rebuilds the binary and restarts the server on change.

Note

On the first run, make dev creates a local dev database and prints the default admin credentials to the terminal. See Environment Setup for details.

Build

make build        # Build for current platform
make build-all    # Build for Linux (amd64 + arm64)
make clean        # Remove built files and caches

CSS

make build-css    # Compile Tailwind CSS (minified)
make watch-css    # Watch CSS for changes

Dependencies

make tidy              # Clean go.mod
make deps              # Download dependencies
make check-updates     # Check available updates
make update-deps       # Update safely (minor/patch)
make update-dep PACKAGE=github.com/user/pkg  # Update a specific package
make update-deps-major # Update including major versions (use with caution)

Warning

make update-deps-major updates dependencies to their latest major versions, which often include breaking changes. Only run it when you are prepared to fix compile errors and test the panel thoroughly.

Cleanup

make clean

Removes:

  • dist/ - compiled binaries
  • tmp/ - Air's build cache
  • Any transient build artifacts

Help

make help

Reads the automation comments from the Makefile and prints a scannable list of every target.

Updating Tailwind

The Tailwind binary is downloaded on first run and cached in bin/tailwindcss. To update to a newer version:

  1. Change the version in the Makefile:

    TAILWIND_VERSION=v4.4.0
    
  2. Remove the cached binary:

    rm -f bin/tailwindcss
    
  3. Rebuild:

    make build-css
    

The new version downloads on the next run.

Version Naming

The version string is derived from the git state at build time.

Git State Version
Tag v1.0.0 1.0.0
No tag on main dev-abc1234
Feature branch feature-name-abc1234
Uncommitted changes Adds -unstable suffix

This is why make build on a dirty working tree produces a version with -unstable at the end.

Binary Outputs

Built binaries land in dist/:

dist/nexpanel-1.0.0                 # Single platform
dist/nexpanel-1.0.0-linux-amd64     # Linux amd64
dist/nexpanel-1.0.0-linux-arm64     # Linux arm64
dist/nexpanel-dev-abc1234           # Dev build (no tag)
Last updated: September 22, 2026