PHPackages                             ajaydhakal/laravel-host - 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. [CLI &amp; Console](/categories/cli)
4. /
5. ajaydhakal/laravel-host

ActiveLibrary[CLI &amp; Console](/categories/cli)

ajaydhakal/laravel-host
=======================

Serve Laravel apps on the local network using php artisan host.

v1.0.0(1mo ago)17MITPHPPHP ^8.2

Since Jun 19Pushed 1mo agoCompare

[ Source](https://github.com/ajaydhakal1/laravel-host)[ Packagist](https://packagist.org/packages/ajaydhakal/laravel-host)[ RSS](/packages/ajaydhakal-laravel-host/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Laravel Host
============

[](#laravel-host)

Serve your current Laravel application on your local network/LAN by default, making it easily accessible from other devices (like smartphones, tablets, or other development machines) on the same Wi-Fi.

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

[](#installation)

You can install the package via Composer:

```
composer require ajaydhakal/laravel-host
```

The package will automatically register its service provider using Laravel's package auto-discovery.

Usage
-----

[](#usage)

To start serving your application on your local network:

```
php artisan host
```

This will run the built-in development server and output details similar to:

```
Laravel Host is running

Local:
  http://127.0.0.1:8000

Network:
  http://192.168.1.12:8000

Press Ctrl+C to stop the server.

Make sure your firewall allows incoming connections on port 8000.
The terminal must remain open while serving.

```

### Custom Port

[](#custom-port)

You can specify a custom port with the `--port` option:

```
php artisan host --port=8080
```

### Custom Host

[](#custom-host)

You can customize the host bind address with the `--host` option (defaults to `0.0.0.0`):

```
php artisan host --host=0.0.0.0 --port=8080
```

### Production Warning

[](#production-warning)

By default, the command prevents running in a production environment (`APP_ENV=production`) to safeguard against accidental exposure. If you explicitly want to run it in production, pass the `--force` option:

```
php artisan host --force
```

Configuration
-------------

[](#configuration)

If you want to customize default settings, you can publish the configuration file:

```
php artisan vendor:publish --tag=laravel-host-config
```

This will create a `config/host.php` file:

```
return [
    'host' => env('LARAVEL_HOST_ADDRESS', '0.0.0.0'),
    'port' => env('LARAVEL_HOST_PORT', 8000),
    'allow_production' => env('LARAVEL_HOST_ALLOW_PRODUCTION', false),
];
```

You can define these settings directly in your `.env` file:

```
LARAVEL_HOST_ADDRESS=0.0.0.0
LARAVEL_HOST_PORT=8000
LARAVEL_HOST_ALLOW_PRODUCTION=false
```

Troubleshooting &amp; Important Notes
-------------------------------------

[](#troubleshooting--important-notes)

- **Local Development Only**: This package uses PHP's built-in web server. It is meant **only** for local development and testing. Do **not** use it in place of production web servers like Nginx, Apache, or PHP-FPM.
- **Same Wi-Fi/LAN**: To access the application on other devices using the Network URL, all devices must be connected to the exact same Wi-Fi network or Local Area Network (LAN).
- **Firewall Restrictions**: If other devices are unable to connect to the Network URL, verify your machine's firewall settings. Ensure that incoming connections on the selected port (e.g., `8000`) are allowed.
- **IP Bind (0.0.0.0 vs 127.0.0.1)**: To listen on all network interfaces, the host must be set to `0.0.0.0`. If set to `127.0.0.1`, the server will only accept requests from the local machine.
- **Busy Ports**: If the selected port is already in use by another service, the command will automatically detect it and suggest trying another port (e.g., `8081`).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance90

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/375e4fe320bda82f873fbad3ffb77f2faea3121689307b364792d9cad89d2ad0?d=identicon)[mr-ajay](/maintainers/mr-ajay)

---

Top Contributors

[![ajaydhakal1](https://avatars.githubusercontent.com/u/131642635?v=4)](https://github.com/ajaydhakal1 "ajaydhakal1 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ajaydhakal-laravel-host/health.svg)

```
[![Health](https://phpackages.com/badges/ajaydhakal-laravel-host/health.svg)](https://phpackages.com/packages/ajaydhakal-laravel-host)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k99.8M340](/packages/laravel-horizon)[illuminate/console

The Illuminate Console package.

13046.6M7.1k](/packages/illuminate-console)[illuminate/queue

The Illuminate Queue package.

20433.0M1.7k](/packages/illuminate-queue)[spatie/laravel-health

Monitor the health of a Laravel application

88212.7M180](/packages/spatie-laravel-health)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[illuminate/process

The Illuminate Process package.

44926.6k117](/packages/illuminate-process)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
