A modern, lightning-fast, self-contained alternative to XAMPP, WampServer, and MAMP for Windows, macOS, Linux, and Android (Termux).
npm install -g localxwebβ¨ Features β’ π Quick Start β’ π₯οΈ Control Center β’ π οΈ CLI Commands β’ π€ MCP AI Integration β’ π Report Bug β’ π¬ Feedback β’ π License
Traditional local web servers like XAMPP and WampServer were built decades ago. They suffer from messy system file pollution, port conflicts, confusing configuration files, lack of modern database credential persistence, and zero integration with modern AI coding workflows.
LocalXWeb changes the game:
- Zero Pollution: 100% self-contained inside
~/.localxweb/β no Windows registry mess or system path contamination. - AI-Native Stack: World-first local stack with a native Model Context Protocol (MCP) server featuring 27 tools, 14 human-like prompts, and 6 live resources for Claude Desktop, Cursor, Google Antigravity, and Windsurf.
- Zero-SQL Resilience: Local databases, credentials, virtual hosts, and configs are stored in JSON registries (
databases.json,credentials.json,config.json). It never crashes if MySQL is offline or not installed! - Instant Project Server (
localxweb run): Serve any folder or current working directory on demand with auto-assigned ports and live monitoring. - Apple-Inspired Control Center: A sleek, dark-mode web dashboard on Port 98 featuring real-time CPU/RAM/uptime gauges, one-click stack control, and instant credential reveals.
- Apache 2.4: High-performance HTTP server with virtual hosts and rewrite engine enabled by default.
- MariaDB 10.11 / MySQL: Lightweight, fast database server pre-configured with
utf8mb4_unicode_ci. - PHP 8.x: Fast CGI / CLI engine with popular extensions (
pdo_mysql,mbstring,curl,openssl,fileinfo,gd,zip,opcache). - phpMyAdmin: Web database manager pre-configured on port 9999 with automatic MySQL authentication.
- Dual Transports: Connect AI agents over network SSE (Port 9900) or standard I/O (Stdio via CLI).
- 27 Automated Tools: Control stack services, run queries, scaffold sites, export/import SQL dumps, enable PHP extensions, and launch local web apps.
- 14 Conversational AI Prompts: Pre-engineered workflows like
run-php-app,setup-database,create-crud-api,fix-php-error, andwordpress-setup. - 6 Live Streaming Resources: Live CPU/RAM metrics, service status, registered databases, and running apps streamed to your AI assistant.
- Enterprise-Grade Security: MCP API Key token authentication (
Authorization: Bearer <key>or?apiKey=...), auto-persisted and toggleable in the dashboard. - One-Click AI Client Configurator: Instantly installs MCP configurations into Claude Desktop, Cursor, Antigravity, and Windsurf with real API keys.
- Persistent JSON Registry: Every database created is recorded in
~/.localxweb/databases.jsonand credentials incredentials.json. - Offline Mode: If MySQL is stopped or not installed, database operations succeed without crashing. LocalXWeb remembers credentials and automatically syncs to MySQL when started (
CREATE DATABASE IF NOT EXISTS). - Dedicated Database Users: Generates isolated MySQL users per database with strong passwords and full privileges.
- Instant Connection Snippets: One-click copy for Laravel
.env(DB_CONNECTION=mysql,DB_PORT=3306, etc.) and native PHP PDO snippets.
localxweb run [dir]: Run your current directory (.) or any project folder on a dedicated port instantly without editing Apache configs.- Site Scaffolding: One-command project creation with built-in templates (
html,php,laravel). - DocumentRoot Management: Map individual sites to custom directories with automated directory browsing.
- Intelligent Port Conflict Resolver: Scans ports 80, 3306, 9999, 98, and 9900. If a port is occupied by another app (e.g., IIS, Skype, or Node.js), it automatically forwards to the next safe port.
- System Doctor (
localxweb doctor): Verifies installed binaries, tests database connectivity, checks permissions, and audits PHP extensions. - System Cleaner (
localxweb clean all): Deep cleans cache files, truncates log files, and flushes orphaned PID locks.
flowchart TD
subgraph UI_CLI["User Interfaces & AI Clients"]
Dashboard["π₯οΈ Control Center (Port 98)"]
CLI["π» LocalXWeb CLI Runner"]
AIAgents["π€ AI IDEs (Claude, Cursor, Antigravity, Windsurf)"]
end
subgraph MCP_Layer["MCP Integration Layer"]
MCPEngine["βοΈ LocalXWeb MCP Server"]
MCPTransports["Transports: SSE (Port 9900) & Stdio"]
MCPEngine --- MCPTransports
end
subgraph Core_Services["Self-Contained Stack (~/.localxweb/services)"]
Apache["π Apache 2.4 (Port 80)"]
MySQL["ποΈ MariaDB / MySQL (Port 3306)"]
PHP["π PHP 8.x Engine"]
PMA["π phpMyAdmin (Port 9999)"]
end
subgraph Data_Registry["Zero-SQL JSON Registry (~/.localxweb/)"]
ConfigJSON["config.json (Ports, MCP API Key)"]
DatabasesJSON["databases.json (DB Registry)"]
CredsJSON["credentials.json (Passwords & Snippets)"]
SitesJSON["sites.json (Virtual Hosts)"]
end
Dashboard --> Core_Services
CLI --> Core_Services
AIAgents --> MCPTransports
MCPTransports --> Core_Services
Core_Services --> Data_Registry
Install LocalXWeb globally with a single command:
npm install -g localxwebβ‘ Global Access: Once installed, both
localxweband the short aliaslxware instantly accessible across your entire system in any terminal, Command Prompt, PowerShell, or shell.
π οΈ Alternative: Install from Source (Git Clone)
git clone https://github.com/devlopersujoy/localxweb.git
cd localxweb
npm install
npm linkStart all services (Apache, MySQL, phpMyAdmin, and Dashboard) in one command:
localxweb startOr run the interactive CLI menu:
localxwebAccess your local development environment via browser:
| Component | Default URL | Description |
|---|---|---|
| Control Center Dashboard | http://localhost:98/Control-Center | Modern GUI control center & gauges |
| Apache Web Server | http://localhost:80 | DocumentRoot (~/.localxweb/htdocs) |
| phpMyAdmin Client | http://localhost:9999 | MySQL web database interface |
| MCP AI Server (SSE) | http://localhost:9900/sse | AI Agent Model Context Protocol endpoint |
The LocalXWeb Control Center is designed with an Apple-inspired glassmorphism dark aesthetic:
- Hardware Telemetry Gauges: Live CPU utilization %, real-time RAM usage, and server uptime.
- Service Jewel Indicators: Real-time status pills (running, stopped, missing) with individual Start / Stop / Restart / Uninstall controls.
- Quick Launch Dock: One-click buttons to launch DocumentRoot, phpMyAdmin, System Doctor, and logs.
- Interactive Database Manager:
- Create databases with dedicated users and passwords.
- Reveal passwords anytime and copy Laravel
.env/ PHP PDO snippets with one click. - View database tables, rows, engines, and size.
- Export and import
.sqlfiles directly from the browser.
- Project Site Manager: Create and open virtual hosts with templates (
PHP,Laravel,HTML5). - System Cleaner Modal: One-click purge of temporary caches, PHP OPcache buffers, and logs.
- Live Console Logs: Real-time streaming log viewer with component filtering (Apache, MySQL, PHP, MCP).
LocalXWeb includes an extensive CLI suite powered by commander and chalk:
Usage: localxweb [command] [options]
Or: lxw [command] [options]
| Command | Description | Example |
|---|---|---|
localxweb start |
Start all stack services (Apache, MySQL, PMA) | localxweb start |
localxweb stop |
Stop all running services cleanly | localxweb stop |
localxweb restart |
Restart all stack services | localxweb restart |
localxweb status |
Display formatted status table of all services | localxweb status |
| Command | Description | Example |
|---|---|---|
localxweb run |
Serve CURRENT directory on default port 8080 | localxweb run |
localxweb run <dir> |
Serve specific folder on custom port | localxweb run ./my-app -p 5000 |
localxweb run -b |
Serve project and automatically open browser | localxweb run . -b |
| Command | Description | Example |
|---|---|---|
localxweb db list |
List all databases (shows tables, size, and offline status) | localxweb db list |
localxweb db create <name> |
Create database with optional dedicated user & password | localxweb db create blog_db -u blogger -p secret123 |
localxweb db creds <name> |
Show saved credentials, password, and .env snippets |
localxweb db creds blog_db |
localxweb db export <name> <file> |
Export database to .sql file (mysqldump / Node fallback) |
localxweb db export blog_db backup.sql |
localxweb db import <name> <file> |
Import .sql file into database |
localxweb db import blog_db schema.sql |
localxweb db query <sql> |
Execute SQL query directly from CLI | localxweb db query "SHOW TABLES" -d blog_db |
localxweb db delete <name> |
Delete database from MySQL and local JSON registry | localxweb db delete blog_db |
| Command | Description | Example |
|---|---|---|
localxweb site list |
List all registered sites and virtual hosts | localxweb site list |
localxweb site create <name> |
Scaffold a new site (--template php|laravel|html) |
localxweb site create mysite -t php |
localxweb site open <name> |
Open site URL in your default browser | localxweb site open mysite |
localxweb site delete <name> |
Remove site configuration | localxweb site delete mysite |
| Command | Description | Example |
|---|---|---|
localxweb doctor |
Run full diagnostic suite with recommendations | localxweb doctor |
localxweb ports |
Scan standard stack ports (80, 3306, 9999, 98, 9900) | localxweb ports |
localxweb check |
Verify integrity of installed binaries & packages | localxweb check |
localxweb php-info |
Display active PHP version, binary path, and extensions | localxweb php-info |
localxweb clean all |
Deep clean temporary cache, logs, and PID locks | localxweb clean all |
localxweb clean logs |
Truncate service log files | localxweb clean logs |
localxweb clean cache |
Remove cached downloads and temporary archives | localxweb clean cache |
localxweb explore htdocs |
Open DocumentRoot directory in File Explorer / Finder | localxweb explore htdocs |
localxweb uninstall <service> |
Uninstall a service (--purge to remove data) |
localxweb uninstall mysql --purge |
LocalXWeb is the first local development server stack in the world to implement the official Model Context Protocol (MCP).
Any AI programming assistant (Claude Desktop, Cursor, Google Antigravity, Windsurf) can connect directly to LocalXWeb to inspect services, create databases, run queries, fix errors, and launch apps autonomously.
- Network SSE Transport (Recommended for all IDEs):
- URL:
http://localhost:9900/sse - Messages:
http://localhost:9900/messages - Real-time bi-directional events over HTTP.
- URL:
- Stdio Transport:
- Command:
node path/to/localxweb/bin/localxweb.js mcp - Traditional standard input/output pipe for local CLI environments.
- Command:
LocalXWeb protects your local development environment from unauthorized network access with configurable API Key authentication:
- Saved in JSON: Stored in
~/.localxweb/config.jsonundermcpApiKey. - Instant GUI Toggle: Enable or disable anytime from the Settings or MCP dashboard tabs. Toggling auto-saves instantly without needing a full page reload.
- Authentication Headers: Pass your key via HTTP Bearer token or URL parameter:
Or via query parameter:
Authorization: Bearer lxw_3bd8ce31ba7c26e20681acf08bed9892http://localhost:9900/sse?apiKey=lxw_3bd8ce31ba7c26e20681acf08bed9892
You can click "Auto-Install All Configs" in the Control Center (/mcp tab) or manually configure your favorite IDE:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"localxweb": {
"url": "http://localhost:9900/sse?apiKey=YOUR_MCP_API_KEY",
"transport": "sse"
}
}
}- Add to
.cursor/mcp.jsonor your Cursor Global MCP settings:
{
"mcpServers": {
"localxweb": {
"url": "http://localhost:9900/sse?apiKey=YOUR_MCP_API_KEY"
}
}
}{
"mcpServers": {
"localxweb": {
"url": "http://localhost:9900/sse?apiKey=YOUR_MCP_API_KEY",
"transport": "sse"
}
}
}{
"mcpServers": {
"localxweb": {
"serverUrl": "http://localhost:9900/sse?apiKey=YOUR_MCP_API_KEY"
}
}
}| Tool Name | Parameters | Description |
|---|---|---|
localxweb_run_app |
directory, port, router, env |
Launch current folder or target path as local PHP/web server |
localxweb_stop_app |
port |
Stop running project server on specific port |
localxweb_list_running_apps |
none | List all active project servers with ports, PIDs, and runtimes |
localxweb_status |
none | Real-time status of Apache, MySQL, PHP, PMA, and ports |
localxweb_start_service |
service (apache|mysql|phpmyadmin|all) |
Start one or all stack services |
localxweb_stop_service |
service (apache|mysql|phpmyadmin|all) |
Stop one or all stack services |
localxweb_restart_service |
service (apache|mysql|phpmyadmin|all) |
Restart one or all stack services |
localxweb_db_list |
none | List all databases from JSON registry and live MySQL |
localxweb_db_create |
name, username, password, collation |
Create database with dedicated user & password (offline safe) |
localxweb_db_query |
query, database |
Execute SQL query against MySQL database |
localxweb_db_creds |
name |
Get database credentials, password, and .env snippets |
localxweb_db_tables |
database |
List tables, engine, row counts, and size for a database |
localxweb_db_import |
name, sourceFile, sqlContent |
Import .sql file or raw SQL string into database |
localxweb_db_export |
name, destinationFile |
Export database schema and data to .sql file |
localxweb_db_drop |
name |
Drop database from MySQL and local JSON registry |
localxweb_site_list |
none | List all virtual host sites and DocumentRoots |
localxweb_site_create |
name, template (php|laravel|html) |
Scaffold a new site with standard directory structure |
localxweb_doctor |
none | Run system diagnostic audit with automated recommendations |
localxweb_autofix |
issueType |
Automatically fix port conflicts, permissions, and service issues |
localxweb_scan_ports |
ports |
Scan availability of ports and identify blocking processes |
localxweb_clean |
target (all|cache|logs|pids) |
Purge cache, clear logs, and reset PID files |
localxweb_php_info |
none | Get loaded PHP version, ini path, and enabled extensions |
localxweb_enable_extension |
extension |
Enable PHP extension in php.ini (e.g., pdo_mysql, curl) |
localxweb_get_config |
none | Read complete config.json configuration |
localxweb_update_config |
updates |
Update server ports, root password, and preferences |
localxweb_get_logs |
service, lines |
Read tail of service log files (apache, mysql, php, mcp) |
localxweb_test_endpoint |
url, method, headers, body |
Send HTTP test request to local endpoint and return response |
LocalXWeb provides ready-to-use structured prompts that any AI agent can execute:
run-php-app: Run the PHP app or web project in the CURRENT FOLDER (.) on a local server, exactly like CLIlocalxweb run(with auto MySQL database creation, credentials, and SQL push).fullstack-php-workflow: End-to-end PHP web application setup with database, tables, credentials, and live testing.fix-php-error: Diagnose and resolve PHP fatal errors, warnings, syntax mistakes, or missing extensions.enable-php-extension: Guide AI to enable extensions likepdo_mysql,curl,mbstring, orzip.clone-and-run-repo: Clone a GitHub repository into DocumentRoot and start serving it immediately.test-api-endpoint: Automated local HTTP API test runner with status codes, headers, and payload verification.create-crud-api: Scaffold complete RESTful CRUD API endpoints in PHP with prepared statements.quick-php-snippet: Run a temporary PHP code snippet locally and inspect output.wordpress-setup: Complete WordPress installation workflow with automated database configuration.scaffold-web-app: Scaffold HTML5, PHP, or Laravel boilerplate projects in seconds.setup-database: Create a database with secure credentials and return.envconfiguration.sql-query-assistant: Write, optimize, and debug SQL queries for MySQL/MariaDB.migrate-database: Export schema and data, or import.sqldump into target database.diagnose-server: Troubleshoot Apache, MySQL, port binding, and permission errors.
AI agents can subscribe to real-time resources to monitor your stack dynamically:
| Resource URI | Description |
|---|---|
localxweb://stack/status |
Live status, port assignments, and health of all services |
localxweb://system/metrics |
Hardware telemetry (CPU load %, memory usage MB/%, uptime) |
localxweb://databases |
Complete registry of databases, table counts, sizes, and credentials |
localxweb://sites |
Registered virtual host projects, paths, and URLs |
localxweb://apps/running |
Actively running project server instances (started via runner) |
localxweb://config |
Global configuration settings (config.json) |
Most developer stacks crash or show confusing errors if MySQL isn't running. LocalXWeb is architected with Zero-SQL Local Persistence:
- Every database is registered with metadata:
{ "ecommerce_app": { "name": "ecommerce_app", "user": "ecommerce_user", "password": "StrongSecretPassword123!", "collation": "utf8mb4_unicode_ci", "tables": 14, "sizeMB": 1.25, "createdAt": "2026-09-04T10:00:00.000Z", "updatedAt": "2026-09-04T11:00:00.000Z" } } - Credentials are also mirrored in
credentials.jsonfor rapid CLI retrieval (localxweb db creds <name>).
- If you're building a static site, testing SQLite, or working on battery saver mode without starting MySQL:
localxweb db create <name>saves todatabases.jsonand returns your connection snippets immediately with{ mysqlSynced: false }.localxweb db listlists all registered databases with a friendly[JSON registry - MySQL offline]indicator.- The Web Dashboard displays
JSON Registry (MySQL Offline)badges without throwing errors.
- When MySQL is started (
localxweb startor via Dashboard), LocalXWeb iterates overdatabases.jsonand automatically runsCREATE DATABASE IF NOT EXISTSand recreates users with full privileges.
Want to test a standalone PHP file or web project without moving files to htdocs or configuring Apache?
# Navigate to your project folder
cd ~/my-php-project
# Run directly:
localxweb runOutput:
β LocalXWeb Project Server started!
Local URL: http://localhost:8080
Directory: C:\Users\...\my-php-project
Port: 8080
PID: 14292
Stop Server: Press Ctrl+C or run: localxweb stop-app --port 8080
- Automatically finds the next available port if
8080is busy. - Can be launched and monitored via MCP (
localxweb_run_app/localxweb_stop_app). - Add
-bto automatically open the project in your default web browser.
All configuration, service binaries, logs, and databases reside cleanly inside your user directory:
~/.localxweb/
βββ config.json # Global configuration & MCP API Key
βββ databases.json # Local database registry & metadata
βββ credentials.json # Database credentials & connection snippets
βββ sites.json # Virtual host site configurations
βββ pids.json # Active process PID tracking
βββ htdocs/ # Default Apache DocumentRoot
β βββ index.php # Default welcome portal
βββ config/ # Component configuration files
β βββ httpd.conf # Apache configuration
β βββ my.ini # MySQL/MariaDB configuration
β βββ php.ini # PHP runtime configuration
βββ logs/ # Centralized log directory
β βββ apache_error.log # Apache error logs
β βββ apache_access.log # Apache HTTP access logs
β βββ mysql_error.log # MySQL/MariaDB error logs
β βββ php_error.log # PHP runtime error logs
βββ mysql-data/ # MySQL database binary storage
βββ services/ # Portable service binaries (Apache, MariaDB, PHP, PMA)
You can edit ~/.localxweb/config.json directly or use localxweb config:
| Setting | Type | Default | Description |
|---|---|---|---|
dashboardPort |
number |
98 |
Port for the Web Control Center dashboard |
apache.port |
number |
80 |
Main HTTP listener port |
apache.sslPort |
number |
443 |
HTTPS SSL listener port |
mysql.port |
number |
3306 |
MySQL/MariaDB TCP listener port |
mysql.rootPassword |
string |
"" |
MySQL root user password |
phpmyadminPort |
number |
9999 |
phpMyAdmin web client port |
mcpPort |
number |
9900 |
Model Context Protocol SSE port |
mcpAuthEnabled |
boolean |
false |
Require API Key authentication for MCP |
mcpApiKey |
string |
Auto-generated | Active 32-character MCP API Key (lxw_...) |
autoStart |
array |
["apache", "mysql"] |
Services to start on localxweb start |
| Platform | Architecture | Installation Method |
|---|---|---|
| Windows 10 / 11 | x64 | Portable zip auto-installer, native Windows paths |
| macOS (Sonoma, Ventura, etc.) | Apple Silicon (M1/M2/M3/M4) & Intel | Homebrew automated detection & service wrapper |
| Linux (Ubuntu, Debian, Fedora, Arch, Alpine) | x64, ARM64 | Package manager integration (apt, dnf, pacman, apk, zypper) |
| GitHub Codespaces & Gitpod | x64, ARM64 | Headless auto-setup (apt non-interactive), auto port forward, non-root safe ports |
| Docker & Dev Containers | x64, ARM64 | Container-aware auto-configuration, headless daemon management |
| Android (Termux) | ARM64, ARM | Non-root port 8080 auto-switch, Termux pkg integration |
Q: Does LocalXWeb work inside GitHub Codespaces and Docker containers?
Yes! 100% plug-and-play. LocalXWeb automatically detects GitHub Codespaces ($CODESPACES) and container environments. It switches to non-interactive package installation (DEBIAN_FRONTEND=noninteractive), auto-assigns non-privileged ports (8080 for Web Server, 9898 for Dashboard, 9999 for phpMyAdmin), binds to 0.0.0.0 for instant VS Code port forwarding, and starts all background daemons without hanging.
Q: How does automatic PHP Extension setup work?
When you runlocalxweb install extensions, LocalXWeb checks for missing extensions (mysqli, pdo_mysql, mbstring, curl, xml, zip, gd, intl, fileinfo) and auto-installs them using your system's package manager (apt + phpenmod on Ubuntu/Debian/Codespaces, apk on Alpine, pkg on Termux, brew on macOS, or uncomments them in php.ini on Windows and Arch Linux).
Q: How is LocalXWeb different from XAMPP?
LocalXWeb is completely modular and self-contained in~/.localxweb. It includes a modern web-based Control Center with hardware gauges, an instant project runner (localxweb run), automatic port collision resolution, persistent database credentials, and a native Model Context Protocol (MCP) server for AI coding agents.
Q: What happens if Port 80 or 3306 is already in use?
LocalXWeb's built-in AutoFixer scans for occupied ports. If Port 80 is blocked by IIS or Skype, it will offer to auto-forward Apache to Port 8080 or the next free port without failing to launch.Q: Can I use LocalXWeb without starting MySQL?
Yes! All database definitions and credentials are kept in a local JSON registry (databases.json). You can create, list, and reveal database credentials offline. When you start MySQL, LocalXWeb automatically syncs the databases into MySQL.
Q: How do I connect Cursor or Claude Desktop to LocalXWeb?
Open the Control Center at http://localhost:98, navigate to the MCP tab, and click "Install All Configs". LocalXWeb will automatically write the correct SSE configuration and real API key into Claude Desktop, Cursor, Antigravity, and Windsurf config files.We are dedicated to making LocalXWeb the most powerful and seamless local development environment. Your feedback, ideas, feature requests, and bug reports directly drive our development!
π FeedBack
Share your thoughts, feature requests, or report issues directly to the DevCrush Studio team.
LocalXWeb is proprietary software owned and developed by DevCrush Studio.
Product: LocalXWeb
Owner / Copyright Holder: DevCrush Studio
License Type: Proprietary Software License / EULA
Copyright: Β© 2026 DevCrush Studio. All rights reserved.
This software is governed by the DevCrush Studio Proprietary Software License and End User License Agreement (EULA). Unauthorized copying, reverse engineering, redistribution, or sublicensing of this software, in source or binary forms, is strictly prohibited without express prior written permission from DevCrush Studio.
See the full LICENSE file for complete terms and conditions.
LocalXWeb β’ Built with β€οΈ by DevCrush Studio
Copyright Β© 2026 DevCrush Studio. All rights reserved.