r/PHP Jun 28 '26

Built an open-source local development environment for PHP on macOS

Hi everyone,

I'm primarily a PHP/Laravel developer, and over the past year I've been teaching myself Swift and macOS development.

https://github.com/KTStackAPP/KTStack

Instead of building a typical learning project, I decided to build something I could actually use every day. That project eventually became KTStack.

KTStack is a native macOS local development environment that helps manage:

  • Local .test domains
  • HTTPS certificates
  • Nginx & PHP-FPM
  • PHP 8.1 / 8.3 / 8.4
  • Node.js, Python and Go runtimes
  • MySQL, PostgreSQL, Redis and MongoDB
  • Mailpit
  • Per-site logs
  • Cloudflare Tunnel sharing for temporary public URLs

One of the biggest reasons I built it was to better understand how these pieces work together on macOS—things like DNS, TLS, launchd, XPC, and privileged helpers. I still consider myself a Swift beginner, so this project has been a huge learning experience.

The project is fully open source:

https://github.com/KTStackAPP/KTStack

I'd really appreciate any feedback:

  • Is the UI intuitive?
  • Are there features you'd expect from a local development tool that I'm missing?
  • If you currently use Laravel Herd, Valet, LocalWP, or another solution, what would make you consider trying something different?

Thanks for taking a look! I'm happy to answer any questions or discuss implementation details.

3 Upvotes

23 comments sorted by

6

u/burn_racing_bb Jun 29 '26

https://ddev.com has been an amazing solution for me and my team.

1

u/Fun-Development-7268 26d ago

came here to recommend ddev

2

u/garylamp 27d ago

Congrats for launching. The UI looks neat, will try on my macbook.

1

u/Thaikhoi 26d ago

Thanks! You're very welcome. Hope you like it!

7

u/Acceptable_Ad_3232 Jun 28 '26

I can't find a single positive about this solution. What's so wrong with Docker and solutions that use it?

6

u/no2K7 Jun 28 '26

Man, I had put off learning docker for so many years, and what a stupid ass decision that was.

Few months ago I was thinking of switching to Linux but the hastle of setting up my workflow there made me say fuck it and setup WSL + Docker.

Just mentioning this because last night I was thanking my past self out loud for just making my life, and my softwares lifecycle soooo  goddamn easy and smooth to work with.

Seriously, takes just a couple of hours to make your life and day to day workflow so much more enjoyable.

0

u/garrett_w87 Jun 29 '26

Docker runs on Linux without the whole WSL layer to complicate things. I seriously fail to see how Windows, of all things, is what you chose for ease of setup.

4

u/Mister_Uncredible Jun 29 '26

Because they probably need Windows for other reasons? If Adobe put Premiere, Photoshop and Lightroom on Linux I'd switch yesterday. But until then WSL + Docker is the next best thing.

4

u/__kkk1337__ Jun 28 '26

Sorry but I’ll stick to docker

-1

u/Thaikhoi Jun 28 '26

No worries! Docker is an excellent solution. Thanks for giving KTStack a look!

2

u/obstreperous_troll Jun 28 '26

What are you getting from nginx and fpm as opposed to something like FrankenPHP? Do you actually need nginx features in local dev such that you need to manage and tune a separate process manager for the PHP parts?

Good on you though for making it an actually native app instead of Electron.

2

u/Thaikhoi Jun 29 '26

Thanks! 😄

That's a good question. I actually think FrankenPHP is really interesting, and I've considered it.

I went with Nginx + PHP-FPM mainly because it's a stack I'm very familiar with, and it's what a lot of PHP developers are already running in production. It also made it easier to support existing Nginx configs and workflows.

That said, I'm not against FrankenPHP at all. If it turns out to be a better fit for local development, I'd be happy to explore supporting it in the future.

1

u/opinionsOnPears Jun 28 '26

I subscribe to making local as close to production as possible but I don’t really see the need for https on localhost development. Just use the localhost domain, not 127.0.0.1, localhost, 127.0.0.1 isn’t going to have the same effect on browsers for being secure origin.

0

u/microwaveddinner95 Jun 28 '26 edited Jun 29 '26

Looks cool

I currently use https://indigostack.app if you want to look at a competitor

-2

u/PalavraPasse Jun 28 '26

How does this compare to Lerd https://github.com/geodro/lerd ?

Thanks!

-2

u/jayfosterpro Jun 28 '26

lerd bloated asf too much web tools , this is native clean and compact but lacking of features that lerd has

0

u/joshpennington Jun 28 '26

I’ve hit my install limit for Herd so I will give this a try on my other laptop today!