This utility provides a simple GUI and helper scripts for managing a local development server stack (Apache, MySQL, PHP) and optional ngrok tunneling. Originally part of a larger web project, it's been extracted here as a standalone tool under the MIT license.
- Start/stop Apache, MySQL, PHP-FPM via
systemctlor PID file fallback - Launch/terminate ngrok with automatic version detection and installer
- Quick Setup wizard for ngrok authtoken and systemd unit creation
- Upload a custom ngrok binary
- Visual status indicators and scrolling log area in Swing GUI
- Headless script (
start_gui_headless.sh) for running GUI in xvfb
- Java 11+ (tested with OpenJDK 11/17)
systemctlavailable (or have appropriate permissions forpkill/pidfilemethods)- For the headless script:
Xvfband optionallyx11vnc
- Download or clone this repository:
git clone https://github.com/lelacag/SC---Server-Controller-.git cd SC---Server-Controller - Compile the Java sources (if not using precompiled classes):
javac -d classes ServerController.java ServerControllerGUI.java
- Launch the GUI:
or if you copied the
java -cp classes ServerController gui
.classfiles into the top-level directory:java -cp . ServerController gui - Use the Quick Setup menu to paste your ngrok authtoken and create a systemd unit if desired.
To run the GUI in a headless environment (e.g. container or server) you can use the provided script:
chmod +x start_gui_headless.sh
./start_gui_headless.shThis will start an Xvfb display on :1 and run the GUI there; optionally it can start x11vnc if installed.
A configuration file is stored at ~/.servercontroller/config.properties containing:
ngrok.authtoken=...
ngrok.path=/path/to/ngrok
The GUI writes to this file when you install or upload a token.
This project is released under the MIT License.
Feel free to fork and submit pull requests. The code is simple Swing/command‑line Java, so setting up your own development environment is straightforward.
