GitHub - lelacag/SC---Server-Controller-: Simple Public Server Controller · GitHub
Skip to content

lelacag/SC---Server-Controller-

Repository files navigation

Server Controller

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.

Features

  • Start/stop Apache, MySQL, PHP-FPM via systemctl or 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

Requirements

  • Java 11+ (tested with OpenJDK 11/17)
  • systemctl available (or have appropriate permissions for pkill/pidfile methods)
  • For the headless script: Xvfb and optionally x11vnc

Installation

  1. Download or clone this repository:
    git clone https://github.com/lelacag/SC---Server-Controller-.git
    cd SC---Server-Controller
  2. Compile the Java sources (if not using precompiled classes):
    javac -d classes ServerController.java ServerControllerGUI.java
  3. Launch the GUI:
    java -cp classes ServerController gui
    or if you copied the .class files into the top-level directory:
    java -cp . ServerController gui
  4. Use the Quick Setup menu to paste your ngrok authtoken and create a systemd unit if desired.

Headless operation

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.sh

This will start an Xvfb display on :1 and run the GUI there; optionally it can start x11vnc if installed.

Configuration

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.

License

This project is released under the MIT License.

Contributing

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.

About

Simple Public Server Controller

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors