Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dinni's avatar
Level 1

how to run php artisan serve in background

i want the server to be running even wen i ligged out from the session. When i was using ubuntu server "sudo nohup php artisan serve --host xx.xx.xx --port=8080 &" was doing it for me. But in windows how can i do it? is there any commands?

0 likes
7 replies
Mandrizzy's avatar

if you want to keep the server running just open up a command line for windows type in php artisan serve and leave the command line open for linux it would be the same just use sudo before the command also make sure before running the command you navigate to your project root folder.

dinni's avatar
Level 1

i want to run it in the server. when i logged out it will be terminated. i dont want it to be terminated. i should run if i logged out also

Mandrizzy's avatar

when you log out of your application the server is terminated ?

dinni's avatar
Level 1

when i log out from my server.

dinni's avatar
Level 1

if i close the terminal . php artisan serve wont be running. But when i was using ubuntu server 'sudo nohup php artisan serve --host xx.xx.xx --port=8080 &' command will run the php artisen serve even if i close the terminal

zymawy's avatar

I'm Windows User Too :), I'm Using Valet Windows It's Cool Try And It Well Runs Automatically

https://github.com/cretueusebiu/valet-windows

A Lot's Of Cool Thing

cmtz's avatar
cmtz
Best Answer
Level 1

try install apache and configure for server laravel

Please or to participate in this conversation.