How to manage Homebrew services on macOS

Updated · by Nico Wickersheim

Many formulae, such as PostgreSQL, MySQL, Redis or nginx, are meant to run in the background. brew services starts and stops them for you and can launch them automatically when you log in, using macOS's own launchd under the hood.

List all services

brew services list

You'll see every installed formula that provides a service, with its status: started, stopped, none (never started) or error.

Start a service

brew services start postgresql@17

start runs the service now and registers it to start automatically at login. If you only need it for the current session, use run instead:

brew services run redis

Stop or restart a service

brew services stop postgresql@17brew services restart nginx

stop also removes the service from login items, so it stays off after a reboot. restart is what you want after changing a configuration file.

Get details about a service

brew services info redis

When a service shows "error"

The service started but exited. Check its log file: many formulae write logs to $(brew --prefix)/var/log. A common cause is a port that's already in use, for example by a second database version that's still running.

Should you use sudo?

Usually not. Without sudo, services run as your user and start when you log in. With sudo brew services start, they run as root and start at boot, which you only need for things like binding to ports below 1024.

Prefer clicking over typing?

WailBrew is a free, open-source Homebrew GUI for macOS. It runs the same brew commands for you, behind a fast native interface.

Download WailBrew

or brew install --cask wailbrew

More Homebrew guides