Top Related Projects
A more enjoyable local development experience for Mac.
Blazing fast macOS PHP development environment
Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
Docker files for running a basic Laravel application.
Quick Overview
Valet Linux is an open-source development environment for Linux, inspired by Laravel Valet. It provides a seamless and lightweight local development experience, allowing developers to quickly set up and manage PHP sites without complex configuration.
Pros
- Easy setup and configuration for PHP development environments
- Automatic Nginx configuration and SSL certificate generation
- Supports multiple PHP versions and popular frameworks
- Minimal resource usage compared to virtual machines or Docker
Cons
- Limited to PHP development (not suitable for other languages)
- May require some Linux knowledge for troubleshooting
- Less isolation compared to containerized solutions
- Not as feature-rich as some alternatives like Laravel Homestead
Getting Started
- Install Valet Linux dependencies:
sudo apt-get install network-manager libnss3-tools jq xsel
- Install PHP and Composer:
sudo apt-get install php-cli php-curl php-mbstring php-mcrypt php-xml php-zip
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
- Install Valet Linux:
composer global require cpriego/valet-linux
- Add Composer's global bin directory to your PATH:
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
source ~/.bashrc
- Install and configure Valet:
valet install
- Park a directory for Valet to serve:
mkdir ~/Sites
cd ~/Sites
valet park
Now you can create PHP projects in the ~/Sites directory, and they will be automatically served at http://projectname.test.
Competitor Comparisons
A more enjoyable local development experience for Mac.
Pros of Valet
- Official Laravel project with direct support from the Laravel team
- More frequent updates and maintenance
- Broader ecosystem integration with other Laravel tools
Cons of Valet
- macOS only, limiting its use to Apple hardware
- Less flexibility for customization compared to community forks
- May have a steeper learning curve for non-Laravel developers
Code Comparison
Valet (Laravel):
$app = new Application(
realpath(__DIR__.'/../')
);
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
Valet Linux:
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
);
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
The code structures are very similar, with Valet Linux using the full namespace for the Application class. This reflects the close relationship between the two projects, with Valet Linux being a community-driven port of the original Valet for Linux systems.
While both repositories aim to provide a seamless local development environment, Valet focuses on macOS integration and official Laravel support. Valet Linux extends this functionality to Linux systems, offering a similar experience for developers on different operating systems. The choice between the two largely depends on the user's preferred development platform and specific project requirements.
Blazing fast macOS PHP development environment
Pros of Valet Plus
- Offers additional features like Elasticsearch and RabbitMQ support
- Includes a wider range of PHP versions (5.6 to 8.1)
- Provides a more comprehensive development environment out-of-the-box
Cons of Valet Plus
- Less frequently updated compared to Valet Linux
- May have more complex setup due to additional features
- Potentially higher resource usage due to extra services
Code Comparison
Valet Linux:
valet install
valet park
valet link
Valet Plus:
valet install
valet park
valet link
valet elasticsearch on
valet rabbitmq on
The code comparison shows that Valet Plus offers additional commands for managing services like Elasticsearch and RabbitMQ, which are not available in Valet Linux. This demonstrates the expanded functionality of Valet Plus, but also highlights the potential complexity increase in its usage.
Both projects aim to provide a seamless local development environment for Laravel on Linux systems. While Valet Linux focuses on simplicity and core functionality, Valet Plus offers a more feature-rich experience at the cost of potentially increased complexity and resource usage. The choice between the two depends on the specific needs of the developer and the project requirements.
Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
Pros of Takeout
- More lightweight and focused on Docker-based development environments
- Easier to set up and configure for specific project needs
- Better cross-platform compatibility due to Docker containerization
Cons of Takeout
- Less comprehensive feature set compared to Valet Linux
- May require more manual configuration for complex setups
- Limited to Docker-based environments, which might not suit all developers
Code Comparison
Takeout configuration example:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
Valet Linux configuration example:
valet park
valet secure my-site
valet link custom-site /path/to/custom/directory
While Valet Linux focuses on native system configuration, Takeout relies on Docker containers for service management. Valet Linux provides a more integrated experience with the host system, while Takeout offers greater isolation and portability through containerization.
Both tools aim to simplify local development environments, but they take different approaches. Valet Linux is more suitable for developers who prefer native setups and need extensive customization options. Takeout is ideal for those who want a quick, containerized solution with easier project-specific configurations.
Docker files for running a basic Laravel application.
Pros of Sail
- Docker-based, providing consistent environments across different systems
- Includes pre-configured services like MySQL, Redis, and Mailhog
- Easier integration with CI/CD pipelines due to containerization
Cons of Sail
- Requires Docker installation and knowledge
- Can be resource-intensive, especially on older hardware
- May have a steeper learning curve for developers new to containerization
Code Comparison
Sail (Docker-based setup):
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.2
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.2/app
ports:
- '${APP_PORT:-80}:80'
Valet Linux (Local environment setup):
valet install
cd ~/Sites
valet park
Sail uses Docker Compose for configuration, while Valet Linux relies on simple CLI commands for setup. Sail offers more granular control over the development environment, but Valet Linux provides a simpler, lightweight approach for local development.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Introduction
Valet Linux is a Laravel development environment for Linux minimalists. No Vagrant, no /etc/hosts
file. You can even share your sites publicly using local tunnels. Yeah, we like it too.
Valet Linux configures your system to always run Nginx in the background when your machine starts. Then, using DnsMasq, Valet proxies all requests on the *.test
domain to point to sites installed on your local machine.
In other words, a blazing fast Laravel development environment that uses roughly 7MB of RAM. Valet Linux isn't a complete replacement for Vagrant or Homestead, but provides a great alternative if you want flexible basics, prefer extreme speed, or are working on a machine with a limited amount of RAM.
Official Documentation
Documentation for Valet can be found on the Valet Linux website.
License
Laravel Valet is an open-sourced software licensed under the MIT license
Top Related Projects
A more enjoyable local development experience for Mac.
Blazing fast macOS PHP development environment
Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
Docker files for running a basic Laravel application.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot