Metadata-Version: 2.4
Name: serverdb-linux
Version: 0.1.0
Summary: A lightweight Linux control panel for local Apache and MySQL/MariaDB services
Author: RetakJunior
License-Expression: MIT
Project-URL: Homepage, https://github.com/RetakJunior/ServerDB
Project-URL: Repository, https://github.com/RetakJunior/ServerDB
Project-URL: Issues, https://github.com/RetakJunior/ServerDB/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PySide6<7,>=6.6
Dynamic: license-file

<p align="center">
  <img src="assets/serverdb.svg" width="128" alt="ServerDB icon">
</p>

<h1 align="center">ServerDB</h1>

<p align="center">A clean, lightweight Linux control panel for local Apache and MySQL / MariaDB services.</p>

ServerDB is a small XAMPP alternative for Linux. It provides one place to start, stop, restart, and monitor your local web stack, open phpMyAdmin, edit configuration files, and inspect service logs.

## Features

- Start, stop, and restart Apache and MySQL / MariaDB services
- Live service state with clear green/red indicators
- Port-conflict checks for Apache (`80`) and MySQL/MariaDB (`3306`)
- One-click launch of phpMyAdmin at `http://localhost/phpmyadmin`
- Quick access to configuration files and live system logs
- Simple local MySQL user/password create or update panel
- Polkit (`pkexec`) authentication for privileged service actions

## Run the AppImage

The AppImage is standalone: it already includes ServerDB, Python, PySide6, and the Qt interface. A person using the AppImage does **not** need to install Python, pip, PySide6, or other application-level Python packages.

After downloading `ServerDB-x86_64.AppImage`:

```bash
chmod +x ServerDB-x86_64.AppImage
./ServerDB-x86_64.AppImage
```

Depending on the Linux distribution, AppImage support (normally FUSE) may be required. The AppImage opens without Apache or MariaDB installed, but it cannot control services that do not exist on the system.

## System requirements

ServerDB manages system services; it does not install a web stack automatically. Install the following through your Linux distribution before using its service controls:

- Apache (`apache2` or `httpd`)
- MySQL or MariaDB server (`mysql`, `mariadb`, or `mysqld`)
- Polkit / `pkexec`
- phpMyAdmin, if you want the phpMyAdmin button to open a local installation

For Debian, Ubuntu, and Linux Mint, the typical packages are:

```bash
sudo apt update
sudo apt install apache2 mariadb-server phpmyadmin policykit-1
```

For Fedora, Arch, and other distributions, install the equivalent packages using the distribution package manager.

> **Note:** `http://localhost:3306` is not a web page. Port 3306 uses the MySQL network protocol, so manage it through ServerDB, a database client, or phpMyAdmin instead.

## phpMyAdmin login

The **phpMyAdmin login** card creates or updates a local MySQL account using administrator authentication. It changes the selected database user's password; it does not change phpMyAdmin's own configuration. New users are deliberately created without database privileges, while existing-user privileges are preserved.

## Run from source

Requirements: Python 3.10 or later and pip.

```bash
git clone https://github.com/RetakJunior/ServerDB.git
cd ServerDB
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python3 main.py
```

## Install with pip

On Linux, install the Python package with:

```bash
python3 -m pip install --user serverdb-linux
serverdb
```

This installs ServerDB and its Qt/Python dependencies. Apache, MySQL/MariaDB, Polkit, and phpMyAdmin remain system-level requirements; see [System requirements](#system-requirements).

## Build an AppImage

Install `appimagetool`, then run:

```bash
chmod +x build_appimage.sh
./build_appimage.sh
```

The build script creates an isolated `.build-venv` environment, packages the application with PyInstaller, and writes the result to:

```text
dist/ServerDB-x86_64.AppImage
```

## License

This project is released under the [MIT License](LICENSE).
