Valet Linux+

Introduction

Valet Linux+ offers a robust and efficient local development environment specifically tailored for Linux users. It sets up and manages a lightweight development environment with minimal resource consumption. Designed for simplicity, Valet Linux+ eliminates the need for virtual machines and /etc/hosts file modifications. It leverages Nginx and DnsMasq to serve your PHP applications on the .test TLD by default, with support for custom domains.

This package is ideal for developers seeking a fast and easy-to-configure environment, providing all the essential tools — Nginx, PHP, MySQL/MariaDB, Redis and Mailpit — automatically configured to run on system startup. Whether you are working on Laravel projects or other PHP frameworks, Valet Linux+ ensures a smooth and efficient workflow. Its support for custom drivers lets you extend it to any PHP application or CMS.

In other words, a blazing fast PHP development environment that uses roughly 7 MB of RAM. Valet Linux+ isn't a complete replacement for Vagrant, Docker or Homestead, but it is a great alternative if you want flexible basics, prefer extreme speed, or work on a machine with a limited amount of RAM.

Note

Valet Linux+ is a maintained fork of genesisweb/valet-linux-plus. Already using the original package? See Migrating from genesisweb.

Installation

Make sure your system meets the requirements first.

Step 1: Install Valet Linux+

Install Valet Linux+ globally using Composer:

bash
composer global require fernandoebert/valet-linux-plus

Step 2: Update PATH (optional)

Ensure Composer's global bin directory is in your system's executable path by adding the following line to your ~/.bash_profile, ~/.bashrc or ~/.zshrc:

bash
export PATH="$PATH:$HOME/.config/composer/vendor/bin"

Reload the shell configuration to apply the changes:

bash
source ~/.bashrc

Step 3: Run Valet install

Run the install command to configure and install Valet Linux+ and its dependencies:

bash
valet install

Prefer MariaDB over MySQL? Use:

bash
valet install --mariadb

During the installation Valet:

  • installs and configures Nginx, PHP-FPM, DnsMasq, Mailpit, Redis and MySQL (or MariaDB);
  • installs the ngrok binary used by valet share;
  • asks for a password for the valet database user (see Database);
  • links the valet executable to /usr/local/bin/valet;
  • asks whether to link Valet's PHP helper to /usr/local/bin/php — answer yes so the php command respects isolated PHP versions.

Note

Valet automatically starts its services each time your machine boots. There is no need to run valet start or valet install again once the initial installation is complete.

Log locations

Logs related to Valet Linux+ are stored in the ~/.config/valet/Log directory (for example nginx-error.log). Check this directory to diagnose issues or monitor Valet's activity.

Configuration directory

Everything Valet manages lives in ~/.config/valet:

Path Purpose
config.json Domain, ports, parked paths, database credentials
Sites/ Symbolic links created by valet link
Nginx/ Per-site Nginx configs (secured, isolated and proxied sites)
Certificates/ Local CA and site certificates
Drivers/ Your custom drivers
Extensions/ PHP files loaded on every valet call to register extra commands
Log/ Log files

Updating

bash
valet update

Updates Valet Linux+ to the latest release (when available) and cleans up cruft. Use valet is-latest to check whether you are on the latest version.

Uninstalling

bash
valet uninstall
composer global remove fernandoebert/valet-linux-plus

valet uninstall removes the Nginx, PHP-FPM, DnsMasq and Mailpit configuration, the /usr/local/bin/valet and /usr/local/bin/php links and the ~/.config/valet directory (parked paths, links, certificates and stored database credentials). Your databases are not removed.

Warning

Back up ~/.config/valet first if you plan to reinstall later and keep your sites' configuration.