Download the PHP package texxasrulez/server-dashboard without Composer

On this page you can find all versions of the php package texxasrulez/server-dashboard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package server-dashboard

Server Dashboard

Downloads Packagist Downloads Packagist Version Github License GitHub Stars GitHub Issues GitHub Contributors GitHub Forks Donate Paypal

Server Dashboard is a lightweight PHP admin console for operators who want one place to watch server health, services, probes, alerts, logs, cron health, and related maintenance tasks without introducing a framework-heavy stack.

It is aimed at small VPS, homelab, agency, and single-host production environments where a pragmatic dashboard is more useful than a large observability platform. The project already has broad surface area; the current focus is making that surface safer to operate and easier to maintain.

What It Includes

Production-Readiness Baseline

Recent foundation work adds:

Project Layout

Install / Update

  1. Place the project under your web root or subdirectory.
  2. Create the first admin from CLI: php bin/bootstrap-admin.php
  3. Sign in and immediately rotate the temporary password in users.php.
  4. Verify the PHP user can write to:
    • data/
    • state/
    • config/ when using config backups/UI saves
  5. Generate script environment helpers if you plan to run bundled cron/systemd helpers: php bin/install-scripts.php

For updates, replace the code, keep your writable data/, state/, and config/local.json, then rerun the validation steps in the Testing section below.

Configuration Model

The project keeps the current compatibility model intact:

Important configuration paths:

Admin configuration is done primarily through bin/config-cli.php.

Cron / Headless Usage

The cron helper flow no longer adds tokens to generated cron jobs. Use plain curl lines for the built-in cron endpoints:

Some other automation endpoints may still support header-based auth for compatibility, but the cron jobs generated from cron.php no longer require cron tokens.

If you use the bundled scripts:

NVMe Collector

Install smartmontools on the host so smartctl is available, then run:

The collector reads /dev/nvme0n1 and /dev/nvme1n1, writes the latest snapshot to data/nvme_history.jsonl.

The admin UI now includes a top-level docs/pages/drive-health.md for page behavior and data sources.

Attack Monitor Collector

Run the local collector from cron:

The collector reads only allowlisted local security sources, writes sanitized cache to api/watch_data.php. The live event stream is paginated in the browser with a persisted rows-per-page control.

CrowdSec decisions are read through cscli decisions list -o json. If CrowdSec uses a non-default Local API endpoint or port, set attack_monitor.crowdsec_config_path in the Config page's Attack Monitor section to the CrowdSec config file that contains that endpoint, such as /etc/crowdsec/config.yaml.

Set attack_monitor.excluded_ips in the Config page's Attack Monitor section to omit exact IPv4 or IPv6 addresses from attack counts, top lists, indicators, and event tables.

Optional OPNsense edge-firewall collection uses the read-only HTTPS API endpoint GET /api/diagnostics/firewall/log from the same cron collector; the browser never contacts the firewall directly. Shared OPNsense URL, API credentials, TLS, CA, timeout, refresh, and stale settings now live in Config -> OPNsense under opnsense.*. Attack Monitor keeps only firewall-log collection toggles, GeoIP rule identifiers/labels, interfaces, poll limit, and lookback under attack_monitor.opnsense.*. Legacy Attack Monitor credential keys are mapped at runtime when central settings are absent.

The Edge Firewall section derives timeline buckets, blocks/hour, prior-window comparison, Edge Containment, unique-country counts, GeoIP-policy country markers, and data-coverage warnings from retained normalized history. These are observational metrics; OPNsense blocks and local server attack events measure different stages and are not guaranteed to represent the same individual connection attempts.

OPNsense Firewall Collector

The admin-only opnsense.php page is backed by a dedicated read-only collector and cache:

It writes state/opnsense/opnsense_latest.json, state/opnsense/opnsense_history.jsonl, and state/opnsense/opnsense_capabilities.json. See docs/config-tabs/opnsense.md.

See docs/config-tabs/attack-monitor.md for page behavior and settings.

Other Devices

The state/other_servers_latest.json, and admins can refresh checks from the page or run php scripts/other_servers_collect.php from cron.

Example config:

Supported checks are ping, tcp, http, and https. TCP, HTTP, and HTTPS require port. Ping can report DOWN when ICMP is blocked, so TCP or HTTP checks are often more reliable. The optional link field turns the device name on the Other Devices page into an HTTP/HTTPS link.

Optional SSH details can be enabled per device in Config -> Other Devices. When detail_method is ssh, the dashboard uses the configured password or key login to run a fixed read-only command set for hostname, OS release, kernel, uptime, and load. Key auth supports auto, openssh, and libssh2 backends; auto tries libssh2 first, then falls back to OpenSSH. Use auto or libssh2 when the dashboard should unlock an encrypted key with key_passphrase; use openssh when the same key works with ssh -i or an agent but libssh2 rejects it. For key auth, the public key path is the matching .pub file, the private key path is the identity file without .pub, and the remote user must already have the public key in ~/.ssh/authorized_keys. SSH passwords, key paths, and optional key passphrases are stored in config/local.json.

If OpenSSH reports No ED25519 host key is known ... Host key verification failed, authentication has not started yet. Add the host key to the known_hosts file shown in the Other Devices details, or use auto/libssh2 for stored key passphrases.

Internet Exposure

The optional Internet Exposure card on the main dashboard lists configured public-facing services and classifies them as Protected, Warning, Danger, Closed, or Unknown. It uses short PHP socket checks from the dashboard host, does not run nmap, does not require root, and does not scan arbitrary remote hosts unless a service entry explicitly sets scan_remote.

Example config:

Backend services use local listener binding from ss -ltnH or netstat -ltn; localhost-only backends are treated as protected, while wildcard or LAN/public binds are flagged. This is a lightweight visibility tool, not a replacement for a real external scan. Validate the public attack surface occasionally from another network. A read-only helper can write the latest status to state/internet_exposure_status.json:

Visitors Collector

Run the local visitor collector from cron:

The collector reads configured logical sources only, writes latest status to docs/visitors.md for GeoIP setup, privacy notes, and troubleshooting.

Navigation Order

Top-level admin navigation order is defined by the feature registry in config.php by dragging items in the Navigation Order block and saving.

If you prefer to edit it manually, the saved override is stored under ui.nav_feature_order in config/local.json.

Logs: Copied And Live Privileged

The existing Logs page still keeps the copied-log mirror under state/logs_mirror. That workflow is unchanged and remains the default view.

The same page now also includes an in-page switcher for Copied Logs and Live Privileged Logs. No new header tab was added. The live mode is for admin users only and reads selected protected logs on demand without making /var/log world-readable and without running PHP or the web server as root.

For the copied-log workflow, the separate log-watcher mirror should run as root and then write mirrored files back with the configured destination owner. That preserves the quick copied-log view for current root-owned service and vhost logs without changing permissions on the source files.

Security Model

Allowed Sources

The default allowlist currently includes:

Each entry defines its label, internal key, source, whether literal search is allowed, and default/max line counts in config/privileged_logs.json.

Sudoers Setup

The live privileged-log mode only works after an admin explicitly allows the web user to run the exact bridge script through sudo.

Do not place the helper script itself in /etc/sudoers.d/. The helper only prints the sudoers rule. The file in /etc/sudoers.d/ must contain sudoers syntax, not shell code.

  1. Confirm the actual PHP/web user on the host. On Hestia-style single-user installs this may be your hosting account name, for example user:user. On more typical setups it may be www-data, apache, or similar.

  2. Generate an example drop-in for that exact web user:

  3. Copy the printed rule into /etc/sudoers.d/server-dashboard-log-bridge.

Example content:

  1. Set the correct permissions and validate it before enabling it:

  2. Test the bridge directly from shell before trying the UI:

  3. Open the existing Logs page, switch to Live Privileged Logs, pick an allowlisted source, and refresh.

The expected rule should allow only the exact bridge script path. It should not allow arbitrary shell commands, arbitrary arguments, or a directory wildcard. Example:

For a Hestia-style install where the PHP user is a hosting account such as user, the practical commands still follow the same pattern:

If the direct sudo -n ...log_bridge.sh ... command fails, fix that first. The web UI depends on the same exact bridge invocation.

Extending The Allowlist

To add another protected log:

  1. Add a new entry to config/privileged_logs.json.
  2. Use a new logical key; do not expose raw file paths in the browser.
  3. Set source.type to file with an absolute path, or journal with a fixed unit name.
  4. Keep max_lines conservative and only enable allow_search when it is operationally useful.

Troubleshooting

Security Notes

Incident And Service Drill-Down

The dashboard now correlates related alert floods into incidents instead of forcing operators to interpret each alert in isolation.

This is an in-place operational drill-down. No new top-level nav item was added.

Audit Logging

The structured admin audit stream now lives in:

It complements the existing security and diagnostics logs and records:

The admin-facing view remains tools/admin_audit.php.

Restore Verification And Support Bundles

The existing Backups page now contains a compact Restore Verification & Support section.

Current verification is intentionally conservative: it reports integrity-verified, not a destructive restore test.

Documentation

The Config page includes a Documents tab before About for browsing local files in docs/.

Current documentation starts at docs/README.md and is organized into:

Diagnostics And Reporting

The uptime report uses stored probe history and currently focuses on:

The History page also includes lightweight System Hardware history. The normal history cron/probe path records CPU/load, memory, and disk samples into data/hardware_history.jsonl.

The diagnostics page groups checks into PASS, WARN, and FAIL so environment problems are actionable instead of just raw dumps. Admin shortcuts open the health endpoint and audit tools in modals.

Top-level feature pages are controlled from Config -> Features. Unchecking a feature removes its header tab and returns a disabled response for direct page requests until it is re-enabled.

Testing

Recommended local verification sequence:

Add browser smoke after JS or page-behavior changes:

Current browser smoke covers:

PHP lint:

Install test dependencies:

Run PHPUnit:

Run the lightweight admin smoke probe:

Expected result:

Run the browser smoke checks for the key admin pages:

Expected result:

Expected skip result in restricted environments:

Those skip cases are environment limitations, not app failures.

Format check:

The PHPUnit baseline is intentionally small. It covers:

The browser smoke script loads the real pages through a local php -S server and verifies:

There is also an admin-facing audit viewer at tools/admin_audit.php for recent security and diagnostic actions already written to:

Security log entries are created by token-management actions such as reveal authorization and token rotation. Diagnostic log entries are created by server-test actions and related manual diagnostics.

There is still a legacy full-repo formatting backlog. CI enforces a maintained-file formatting baseline introduced in this hardening pass instead of gating on untouched historical files.

CI

The repository now includes .github/workflows/ci.yml with:

This is a floor, not a full release pipeline.

Screenshots

Existing screenshots live under:

Roadmap Summary

Near-term work that still makes sense:


All versions of server-dashboard with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
maxmind-db/reader Version ^1.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package texxasrulez/server-dashboard contains the following files

Loading the files please wait ...