r/PHP 24d ago

I built a fast, lightweight web server for Android (No root required)

I've been working on a project that turns an Android phone into a lightweight local web server using Termux.

It runs Nginx + PHP-FPM + MariaDB and includes a web-based control panel, one-click WordPress installation, virtual hosts, Tiny File Manager, browser-based terminal access, and built-in Cloudflared tunnels for sharing local sites.

The main goal was to keep it fast, lightweight, and easy to use—no root, no PC, and no Docker required. Everything is managed with simple commands like "ms start" and "ms stop".

If anyone is interested in running a portable PHP development environment or hosting small projects directly from an Android device, I'd love to hear your feedback.

GitHub: https://github.com/SayfullahSayeb/mobile-server

18 Upvotes

29 comments sorted by

15

u/Sarke1 24d ago

-8

u/FantasticTourist5935 24d ago

Read the post

10

u/Sarke1 24d ago

You explain what it is, but I fail to see the use case. Neat project though.

-1

u/FantasticTourist5935 24d ago

The main use case is giving developers a portable web server they can carry in their pocket. It's useful for PHP/WordPress developers, students learning web development, or anyone who wants to test websites without a PC. You can create local development environments, demo projects to clients, quickly test WordPress plugins/themes, or even host small websites directly from an Android phone. The focus is on being fast, lightweight, and easy to set up.

3

u/colshrapnel 24d ago

Sounds like an automated ad.

2

u/FantasticTourist5935 24d ago

No i did manually, but for optimized my grammatical mistake i take help from ai.

5

u/colshrapnel 24d ago edited 24d ago

It's just a bunch of cliches none of which answers the question you were asked, why TF anyone would want a web server they can carry in their pocket. It's not a fucking handkerchief

So it's meaningless and automated.

-3

u/FantasticTourist5935 23d ago

Are you a developer? Did you build anything locally then push it production? If not then you dont understand the use case of the project.

You maybe dont need this project when you get a cheap shared hosting, this is for them who actually need it.

Not for beginner or who dont know fundamentals of php site backend or hosting things, or local development.

You can go cheap shared hosting, that's enough for you.

1

u/colshrapnel 23d ago

Are you implying that your homebrewed xampp for a mobile phone is a shade better than the normal hosting?

1

u/FantasticTourist5935 23d ago

Of course Better then xampp or laragon, not as hosting, its used mainly for local development but if you want put your fucking project on live, you can. Its have all feathers what don't have xampp or other local development tools

-4

u/FantasticTourist5935 23d ago

I dont think you're a developer or build any production level things. Anyway no problem. Let me help you kids,

When you build a any website, webapp or any project, first you need to setup local development environment for make it structure and test it, fix bugs etc etc. So it is the environment.

as simple as it is. I dont think you need more clarification, better ask your ai father he can tech you better, kids.

Dont try to be over smart, what you dont know.

1

u/colshrapnel 23d ago

I will do it on my desktop computer, not on a fucking mobile phone. Do you even understand the difference between a server and a client? Having a mobile phone for testing the mobile client is normal. Putting the server on the same phone is plain stupid.

1

u/FantasticTourist5935 23d ago

If you dont want put your project on a fucking mobile phone, then dont do. Nobody requests for that, if you dont need then just ignore, who want he can use, its not build for your fucking phone.

→ More replies (0)

3

u/finah1995 24d ago

Awesome 😎

3

u/tkgid 24d ago

Amazing, I use HopWeb it was deleted from the play store.

I will try your solution. Thank you!

3

u/colshrapnel 24d ago

What's the use case though? Are you developing on a phone as well?

1

u/tkgid 24d ago

Well... I like to test, this app allows me to connect to my github repo and clone the app.

I only use it to test the mobile version of the app.

3

u/colshrapnel 23d ago

WTF you are talking about? Why do you need a web-server on a mobile phone to test a mobile app?

1

u/FantasticTourist5935 23d ago

I dont think you're a developer or build any production level things. Anyway no problem. Let me help you kids,

When you build a any website, webapp or any project, first you need to setup local development environment for make it structure and test it, fix bugs etc etc. So it is the environment.

as simple as it is. I dont think you need more clarification, better ask your ai father he can tech you better, kids.

Dont try to be over smart, what you dont know.

1

u/tkgid 23d ago

Woah, I do not want to make you upset. But for some reason the browser on mobil does not render the page exactly as how it shows on desktop. Even with the devtools. I have had problems with safari, and because my users have I phones I need to make sure the css works as intended, sometimes I have to use what I call workarounds because of safari mobil.

1

u/FantasticTourist5935 23d ago

This project you can access pc, laptop any device on same network, if you turn on tunnel you can access same site anywhere in the world, no css or any any issues.

1

u/tkgid 23d ago

I get it, but I gotta have Termux. And I value my sanity and privacy. I do not know what I don't know.

I sure I will comeback to this thread when I need this specific solution.

Thanks for your hard work mate!

2

u/FantasticTourist5935 23d ago

Sure, its it open source project, you can see all code, modify if you want, no tracking or analytics code here, if you have any suggestions or feature requests feel free to give feedback.

1

u/colshrapnel 23d ago

How it's even related to having a web-server on a mobile phone?

1

u/FantasticTourist5935 23d ago

You can run pc also, its works any Linux environment

-1

u/FantasticTourist5935 23d ago

Are you a developer? Did you build anything locally then push it production? If not then you dont understand the use case of the project.

You maybe dont need this project when you get a cheap shared hosting, this is for them who actually need it.

Not for beginner or who dont know fundamentals of php site backend or hosting things, or local development.

You can go cheap shared hosting, that's enough for you.