Package and Service Management
ServBay offers developers a comprehensive and user-friendly suite of management tools for local web development environments. This article details how to manage a variety of packages and services in ServBay, including web servers (such as Nginx, Caddy, Apache), databases (such as MySQL, PostgreSQL, MongoDB), caching services (such as Redis, Memcached), and programming language runtimes (such as PHP, Node.js, Python, Go, Java, Ruby, Rust). Discover how to quickly or comprehensively control, install, update, and maintain your development environment components through ServBay's various interfaces.
Quick Service Management
ServBay provides several easy methods to quickly control the operational status of core services.
1. macOS Menu Bar
In the top right menu bar of macOS, the ServBay icon presents a quick-access panel for fast service management. By clicking the ServBay icon, users can:
- View Service Status: Instantly see the current status of all core services (such as web servers and databases).
- Start Services: Click the start button to quickly launch all activated core services.
- Stop Services: Click the stop button to instantly halt all running core services.
- Restart Services: Click the restart button for an immediate restart of all running core services.
- Clear Cache: Clear the Redis cache.
- Favorite Websites: Frequently visited websites can be starred for one-click quick access.
- Database Tools: Quickly launch various database management tools.
- Stop All Services and Exit: Stop all running ServBay services and fully exit ServBay.
2. ServBay Dashboard Homepage
On the dashboard homepage of the ServBay application, users can find grouped buttons for quick service management, making it easy to manage enabled core services. These buttons offer the following quick actions:
- View Service Status: Check the current state of all core services.
- Start Services: Click to quickly start all activated core services.
- Stop Services: Instantly stop all running core services with one click.
- Restart Services: Quickly restart all running core services at the push of a button.
- View Logs: Jump straight to viewing operation logs for each service to aid in troubleshooting.
3. Global Control at Top Right of ServBay App
In the top-right corner of the ServBay application window, global service control buttons are always accessible, no matter which page you're on. These buttons provide the following fast actions:
- Quick Actions: Options to start, stop, and restart all core services immediately.
Detailed Package and Service Management
On ServBay's Packages
page, users get full-featured package installation, update, uninstallation, as well as detailed views and control of service statuses.
Viewing the Package List
On the Packages
page, ServBay lists all available packages, spanning web servers, databases, caches, language runtimes, and more. Each package displays information including:
- Current Version: The installed version number of the package in your local ServBay environment. If not installed, it displays
-
. - Latest Version: The latest version number available in the online repository. If the current version differs from the latest, it usually means an update is available.
- Current Status: The service status associated with the package (e.g.,
Running
,Stopped
,Error
). - PID: Displays the main process ID (Process ID) if the service is running.
- Auto-Start Status: Indicates whether the associated service is set to start automatically when ServBay launches. You can enable or disable auto-start via a toggle switch.
Package Control Buttons
Each installed package features independent control buttons on the right, allowing users precise management of the services linked with that package:
- Start: Launch the service associated with this package.
- Stop: Stop the service associated with this package.
- Restart: Restart the service associated with this package.
- More Options: This button typically offers more management features such as viewing logs and editing configuration files.
Upgrading Packages
If a newer version is available, an upgrade prompt and button will appear next to the package's “Latest Version”. Clicking the upgrade button will automatically download and install the newest version of that package. Once upgraded, ServBay will usually prompt or automatically restart the related service to ensure you are using the updated version.
Installing Packages
For packages not yet installed (where the “Current Version” column displays -
), if a latest version is available online, users can click the Install
button at the far right. This will download and install the latest version of the package from the official repository.
Uninstalling Packages
For installed packages, clicking the Uninstall
button at the far right removes it and its related files from your local ServBay environment. Note that uninstalling a package typically does not delete its associated data files (such as database data), though this depends on the specific package type. Please confirm you no longer need the package before uninstalling.
Enabling/Disabling Packages
In the Auto-Start
column, users can toggle whether the service associated with the package launches automatically. When enabled, the service will automatically start with ServBay; when disabled, it must be started manually. For uninstalled packages, the auto-start toggle will be disabled.
Viewing Service Logs
For every running service, a log icon appears on the far right. Clicking it lets you view real-time or historical logs for that service—essential for diagnosing issues and monitoring service status. For more information, see the documentation on Viewing Logs.
Running Multiple PHP Versions
TIP
For more information about PHP, including installation, configuration, and usage, please refer to the Using PHP documentation.
ServBay robustly supports installing and running multiple PHP versions in parallel. This allows developers to use different PHP versions for different projects without complex version switching tools. You can set the default PHP version for the command-line interface (CLI) on the ServBay Settings
page—the selected version will be used as the default for the php
command. For detailed steps, see the Set Default CLI Version article.
You can also check the PHP Versions and Modules page to see which commonly used extensions are pre-compiled for each ServBay PHP version.
Notes on MySQL, MariaDB, and PostgreSQL
ServBay has optimized database management, especially for scenarios where multiple versions coexist:
- The same port (such as 3306) can only be used by one instance of MySQL, MariaDB, or PostgreSQL at a time. If you have installed multiple versions, assign different ports for each instance, or select
Skip Networking
to disable port listening and connect instead via socket files. - ServBay is designed so that MySQL, MariaDB, or PostgreSQL instances with the same major version number share the same database directory. For example, MariaDB 11.0.1 and 11.0.2 will use the same database folder since their major version (
11.0
) matches. However, MariaDB 10.5.22 and 11.1.2 do not share data, as their major versions (10.5
and11.1
) differ. This means data is shared and upgrade/migration is easy within minor versions of the same major version, but you need to consider data migration when switching across major versions.
TIP
For information on the locations of database files, data migration, and backups in ServBay, please refer to the Database File Management & Migration documentation.
With these features, ServBay provides a powerful, convenient package and service management tool, enabling users to efficiently manage and update the various components needed for development, thus boosting efficiency and flexibility for local development.