# Run the Dev Server

## Start the Server

<PackageManagerCommand type="exec" command="fluxlay dev" />

Or specify a directory:

<PackageManagerCommand type="exec" command="fluxlay dev ./my-wallpaper" />

## How It Works

1. Validates `fluxlay.yaml` in the project directory.
2. Finds an available port starting from 3000.
3. Starts a Vite dev server.
4. Writes a `dev.json` to the app data directory so the desktop app can discover it.
5. The desktop app renders the wallpaper with hot module replacement (HMR).

## Requirements

- The [Fluxlay desktop app](/en/studio/developer/how-to/setup/install-app.md) must be running.
- A valid `fluxlay.yaml` must exist in the project root.
