PHPackages                             xama5/valet-neutral - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. xama5/valet-neutral

ActiveLibrary

xama5/valet-neutral
===================

Blazing fast PHP development environment for Linux and MacOS

v1.0.0-rc.1(6y ago)30MITPHPPHP &gt;=5.6CI failing

Since Oct 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/xama5/valet-neutral)[ Packagist](https://packagist.org/packages/xama5/valet-neutral)[ RSS](/packages/xama5-valet-neutral/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

[![](images/logo.png)](images/logo.png)

Introduction
------------

[](#introduction)

Valet Neutral (or ValetN) is a development environment for macOS **and Linux**. No Vagrant, no Docker, no `/etc/hosts` file.

As neutral as Switzerland, and made in Switzerland. (pretty much hit two birds with one stone)

### ValetN vs. Valet+

[](#valetn-vs-valet)

Yet another Valet? Yes! The "official" Valet and Valet+ are developed for macOS, both lacking official support for Linux.

Time to bring some neutrality in there. This project supports both Linux and macOS, pulling in changes from both upstreams and make them work on Linux too. This means, you can use this very same package on either system and it will work just the same. Depending on your OS, you can enjoy most of the features Valet+ provides.

*Although there exists an inofficial Valet fork for Linux, it doesn't incorporate Valet+ features and is again only intended for use on a specific OS. In my opinion it also makes too many changes to the system, leaving you with a huge configuration mess of leftover files, if you ever decide to part ways with Valet.*

Valet Neutral makes as little changes as possible to your main system. It is almost completely isolated from your main system, while also following the main philosophy of Valet!

Please note, this package is also intended to replace Valet/Valet+ and also uses the `valet` command. The documentation of Valet Neutral and Valet+ is pretty much the same.

### Valet vs. Valet+

[](#valet-vs-valet)

Valet+ is a third-party fork of [Laravel Valet](https://github.com/laravel/valet). Valet+ adds functionality to Valet with a goal of making things even simpler and faster. We are very grateful to the Laravel team for providing the base that we built Valet+ on. Since this is a fork we'll pull in changes from the original Valet regularly as they are released.

Some of the documentation in this readme was taken from the Valet website and provided here for convenience, so that you can read this document and know about all features provided. The original documentation can be found here: .

Since Valet+ is intended to replace Valet, it still uses the same `valet` command-line name. Any changes in its interface are documented below.

### Features

[](#features)

ValetN configures your system to always run Nginx in the background when you start your system. Then, using [DnsMasq](https://en.wikipedia.org/wiki/Dnsmasq), ValetN proxies all requests on the `*.test` domain to point to sites installed on your local machine.

In other words, a blazing fast development environment. ValetN provides a great alternative if you want flexible basics or prefer extreme speed.

### Differences from Valet

[](#differences-from-valet)

Here are a few key differences compared to the original Valet:

- PHP version switch
- Xdebug (on/off mode)
- PHP extensions (mcrypt, intl, opcache)
- Optimized PHP configuration using opcache
- MySQL (with optimized configuration)
- Redis
- Elasticsearch (optional)
- Many more features outlined below...

Table of Contents
-----------------

[](#table-of-contents)

- [Introduction](#introduction)
- [Installation](#installation)
    - [Serving sites](#serving-sites)
- [Switching PHP version](#switching-php-version)
- [Xdebug](#xdebug)
    - [PhpStorm](#phpstorm)
- [Database](#database)
    - [Creating databases](#creating-databases)
    - [Importing databases](#importing-databases)
    - [Open database in Sequel Pro](#open-database-in-sequel-pro)
- [Redis](#redis)
- [Open project in browser](#open-project-in-browser)
- [Securing Sites With TLS](#securing-sites-with-tls)
- [Valet drivers](#valet-drivers)
- [Valet Documentation](#valet-documentation)
- [Credits](#credits)

Installation
------------

[](#installation)

> ⚠️ ValetN requires [Homebrew](https://brew.sh/), both for macOS and Linux. (yes, Linux is also supported by now!) Before installation, you should make sure that no other programs such as Apache or Nginx are binding to your local machine's port 80. Also make sure you don't have a local DNS server occupying the DNS port.

1. Install or update [Homebrew](https://brew.sh/) to the latest version using `brew update`.
2. Add the Homebrew PHP tap for Valet+ via `brew tap henkrehorst/php`.
3. Install PHP 7.2 using Homebrew via `brew install valet-php@7.2`.
4. Install Composer using Homebrew via `brew install composer`.
5. Install ValetN with Composer via `composer global require xama5/valet-neutral`.
6. Add `export PATH="$PATH:$HOME/.composer/vendor/bin"` to `.bash_profile` (for bash) or `.zshrc` (for zsh) depending on your shell (`echo $SHELL`)
7. Run the `valet fix` command. This will check for common issues preventing Valet+ from installing.
8. Run the `valet install` command. This will configure and install ValetN and DnsMasq, and register Valet's daemon to launch when your system starts.
9. Once ValetN is installed, try pinging any `*.test` domain on your terminal using a command such as `ping -c1 foobar.test`. If ValetN is installed correctly you should see this domain responding on `127.0.0.1`. If not you might have to restart your system. Especially when coming from the Dinghy (docker) solution.

> ℹ️ ValetN will automatically start its daemon each time your machine boots. There is no need to run `valet start` or `valet install` ever again once the initial ValetN installation is complete.

> ℹ️ To update ValetN to the latest version use the `composer global require xama5/valet-neutral` command in your terminal. After upgrading, it is good practice to run the `valet install` command so ValetN can make additional upgrades to your configuration files if necessary.

### Serving sites

[](#serving-sites)

Once ValetN is installed, you're ready to start serving sites. ValetN provides a command to help you serve your sites: `valet park`. Which will register the current working directory as projects root. Generally this directory is `~/sites`.

1. Create a `sites` directory: `mkdir ~/sites`
2. `cd ~/sites`
3. `valet park`

That's all there is to it. Now, any project you create within your "parked" directory will automatically be served using the  convention.

For example:

1. `mkdir ~/sites/example`
2. `cd ~/sites/example`
3. `echo "
