Install using Homebrew
This page explains how to install FusionAuth using the macOS Homebrew package manager. You can find the Fusionauth Homebrew formula on GitHub at FusionAuth/homebrew-fusionauth.
To install the prerequisites with Homebrew, see Prerequisites With Homebrew.
Install#
-
Install the Tap:
brew tap fusionauth/homebrew-fusionauth -
Install the FusionAuth services. Make sure you have
postgresqlup and running, optionally you can skip theelasticsearch/opensearchservice if you would like to use the database as the User search engine, or if you already have a compatible Elasticsearch service running. See the System Requirements and Configuration Reference.brew install fusionauth-app -
Start FusionAuth with Homebrew services:
brew services start fusionauth-app
Open http://localhost:9011 to access the Admin UI.
If you want to run FusionAuth in silent mode, you can follow the instructions in the Configure For Silent Configuration section.
The shared configuration file will be located here: /usr/local/etc/fusionauth/fusionauth.properties and the logs are here : /usr/local/var/log/fusionauth/.
Upgrade#
If you initially installed FusionAuth using Homebrew, you can also use Homebrew to upgrade to the latest version of FusionAuth.
To upgrade FusionAuth using brew, follow the steps below:
-
Stop fusionauth using Homebrew services:
brew services stop fusionauth-app -
Upgrade
fusionauth-app:brew upgrade fusionauth-app -
Start fusionauth with Homebrew services:
brew services start fusionauth-app
Install Prerequisites With Homebrew#
FusionAuth requires a database and a search engine. The recommended database is PostgreSQL, and the recommended search engine is OpenSearch.
PostgreSQL#
If you don't have PostgreSQL installed, you can install it using Homebrew:
-
Install PostgreSQL:
brew install postgresql@16 -
Start PostgreSQL with Homebrew services:
brew services start postgresql@16
Then, configure PostgreSQL for use with FusionAuth:
-
Add the following line to your
~/.zshrcor~/.bashrcfile to add PostgreSQL binaries to yourPATH:export PATH="$PATH:$(brew --prefix postgresql@16)/bin" -
Create the FusionAuth user,
fusionauth, with passwordfusionauth:psql --command="CREATE USER fusionauth PASSWORD 'fusionauth'" --command="\du" postgres -
Create a database named
fusionauthowned by thefusionauthuser:createdb --owner=fusionauth fusionauth
OpenSearch#
If you don't have OpenSearch installed, you can install it using Homebrew:
-
Install OpenSearch:
brew install opensearch -
Start OpenSearch with Homebrew services:
brew services start opensearch
Silent Configuration#
After installing FusionAuth, you can configure it before starting the service to run a silent configuration. The configuration file is located at $(brew --prefix)/etc/fusionauth/fusionauth.properties.
# Add linebreak to the end of the fusionauth.properties file
echo "" >> $(brew --prefix)/etc/fusionauth/fusionauth.properties
# Add your kickstart file path
echo "fusionauth-app.kickstart.file=/path/to/your/kickstart/kickstart.json" >> $(brew --prefix)/etc/fusionauth/fusionauth.properties
# Add the silent mode property
echo "fusionauth-app.silent-mode=true" >> $(brew --prefix)/etc/fusionauth/fusionauth.properties
# Change the search.type=database to search.type=elasticsearch
sed -i '' 's/search.type=database/search.type=elasticsearch/g' $(brew --prefix)/etc/fusionauth/fusionauth.properties
# Add the open search URL
echo "search.servers=http://localhost:9200" >> $(brew --prefix)/etc/fusionauth/fusionauth.properties
# Check the full configuration
cat $(brew --prefix)/etc/fusionauth/fusionauth.properties