← Back to list

How to setup Homebrew Services

We have always tried to use docker or a local installation for dev tools which are necessary for development like postgres, mongo, kafka…

1ok1 · 2025-12-14 14:16 · 0 claps · 1.6 min read
#homebrew #homebrew-services #postgresql #brew-services #brew
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

How to setup Homebrew Services

We have always tried to use docker or a local installation for dev tools which are necessary for development like postgres, mongo, kafka, redis, etc.

In order to make the setup simpler, consume lesser memory so that the system memory can be used for other relevant tasks, homebrew provides an option to run the tools instead to be run as a service, which can be started or stopped.

We will take an example and go through the process of setting up Homebrew, install a tool and how to run the tool as a service.

Setting up Homebrew

Use the command to install homebrew from the official site

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

When you try to install homebrew, you actually download a version of homebrew-core to your local homebrew path /usr/local/Homebrew

Installing a Package or tool

Let’s take an example and try to install postgres and set it up as a service.

brew install postgresql <- To install a package or tool
brew install postgresql@18 <- To install a version of the tool

Homebrew will install the postgres in your machine and maintain the version installed in your system.

How to run the tool as a service

To start the tool as a service run the below command,

brew services start postgresql@18 <- To start a service
brew services stop postgresql@18 <- To stop a service

After the service is started you can try connecting to the postgres db with your preferred gui or in cli, it should work.

brew services list <- To check the list of services running in brew

To start or stop all the services at the end of the day,

brew services stop --all <- To stop all running services

Once you start a service in brew, you can restart the specific service with the same command you used to start or start all the pre-run services

brew services start --all <- To start all services that were stopped earlier

Don’t forget to update and upgrade brew installation’s to the latest stable version frequently.

brew update updates the above downloaded git repository with the latest code from GitHub.

brew upgrade updates the actual packages to match the versions in the updated local git repository.

Hope, this helps everyone to save some memory in their machine who is running a docker container or the pain of setting a local version in their system. Brew handles the installation, upgrade and service with a few commands.


메타데이터
post_id
201aefffdb48
slug
how-to-setup-homebrew-services-201aefffdb48
url
https://medium.com/@1ok1/how-to-setup-homebrew-services-201aefffdb48
canonical_url
https://medium.com/@1ok1/how-to-setup-homebrew-services-201aefffdb48
author_url
https://medium.com/@1ok1
status
ok
fetched_at
2026-06-09 15:37:30