ServBay Installation Guide: Rapidly Set Up a Local Web Development Environment on macOS
ServBay is a local web development environment tool designed specifically for developers, aiming to simplify the process of building and managing multiple tech stacks (such as PHP, Node.js, Python, Go, Java, Ruby, Rust, etc.) and databases (including MySQL, PostgreSQL, MongoDB, and Redis) on macOS. One of ServBay's core features is its extremely fast and straightforward installation process.
Compared to similar tools, ServBay has a compact installer (usually around 20MB) and can be installed and initialized in just a few clicks, allowing you to get started with development within minutes.
Video Tutorial
This video tutorial provides a step-by-step walkthrough of installing ServBay. You can also watch it directly on YouTube.
Important Notes & Prerequisites
ServBay currently primarily supports the macOS operating system.
Before installing and initializing ServBay, please pay attention to the following important points:
- Port Conflicts: Ports are unique resources on your system and can only be used by one process at a time. The vital services required by ServBay (such as web servers and databases) need to occupy specific ports. To ensure ServBay can start and run smoothly, make sure to stop any existing applications that might be occupying the ports required by ServBay before installation. Common ports prone to conflicts include, but are not limited to:
- Web server ports: 80 (HTTP), 443 (HTTPS) (Frequently occupied by: Apache, Nginx, Caddy, other local web servers)
- MySQL/MariaDB database port: 3306
- PostgreSQL database port: 5432
- MongoDB database port: 27017
- Redis server port: 6379
- DNS service port: 53 (Frequently occupied by: dnsmasq, other local DNS services) You can use the command
lsof -i :[port number]
(such aslsof -i :80
) in the terminal to check if a specific port is already in use.
Download the ServBay Installer
You can obtain the latest installer from the ServBay official website download page. ServBay's installer is lightweight and downloads quickly.
Visit the ServBay Download Page to download the macOS .dmg
installation file. The file is typically named in the format ServBayInstaller-vX.Y.Z.dmg
, where X.Y.Z
represents the version number.
Installing ServBay
Once the download is complete, follow these steps to install:
- Double-click the downloaded
.dmg
installer file (for example,ServBayInstaller-v1.12.0.dmg
). The system will mount the disk image and open an installation window. - In the window that appears, you will see the ServBay.app icon and a shortcut to the Applications folder. Drag the
ServBay.app
icon into theApplications
folder to complete the installation. - After installing, open your macOS
Applications
folder, locate the ServBay icon, and double-click to launch the application.
Initializing ServBay
On your first launch, ServBay will prompt you to complete an initialization setup. This process will download and configure the necessary packages based on your selections. Make sure all required ports are available before launching ServBay by double-clicking its icon.
ServBay offers a simple and intuitive initialization interface:
- Select Your Role: On the left side of the initialization window, choose a role that best fits your main development needs, such as "Web Developer," "Full Stack Developer," "PHP Developer," etc.
- Review Preset Packages: Once you select a role, the right side of the interface displays a recommended set of packages preselected by ServBay for that role. This usually includes a default web server (such as Nginx), the ServBay runtime, and specific language versions (like PHP, Python, etc.). You can review these default option settings.
- Start Installation: After confirming your role and preset packages, click the
Start Installation
button in the bottom right to begin installation. - Permission Request: Upon clicking "Start Installation," ServBay will prompt you to enter your current macOS user password to install the
ServBay Helper
tool.ServBay Helper
is essential for managing system services, handling permissions, and binding to privileged ports. Be sure to authorize the installation ofServBay Helper
, or ServBay will be unable to start and manage packages and sites correctly. - Wait for Completion: Please wait patiently as ServBay downloads, installs, and configures the selected packages. This process may take a few minutes, depending on the number of packages you've chosen and your internet speed.
- Access the Main Interface: Once initialization is successful, you will be taken to the ServBay main control panel. Here, you can see the status of your installed packages.
Congratulations! ServBay is now successfully installed and initialized.
Accessing the Demo Site & Management Tools
ServBay comes with a default demo website pre-configured, as well as integrated database management tools (such as phpMyAdmin, Adminer) and a PHP info page (phpinfo), making it easy to validate your installation and manage databases.
By default, ServBay’s website root directory is located at /Applications/ServBay/www
. The demo site and related tools are stored in this directory, and you can also add your own projects in subfolders for development.
- Open your web browser and visit the default address: https://servbay.host
- Alternatively, in the ServBay main interface, go to the
Sites
menu in the left sidebar, find theservbay.host
entry, and click the visit icon on the right.
- Alternatively, in the ServBay main interface, go to the
- On the loaded ServBay demo website page, you will find convenient links to tools like phpMyAdmin and Adminer.
At this point, you have successfully installed and initialized ServBay, and you know how to access the default demo site and management tools. Now you’re ready to start configuring your own development projects!