macOS Homebrew tap for FusionAuth
Easy installation of FusionAuth via Homebrew.
Simply install and start the services. Then navigate to http://localhost:9011 and follow the setup prompts.
The following examples assume you will be installing fusionauth-app. And postgresql as well as opensearch as prerequisites.
FusionAuth requires a database and a search engine. The recommended database is PostgreSQL, and the recommended search engine is OpenSearch.
Important
fusinauth-search was announced end of life in FusionAuth Version 1.48.0 and is no longer available for homebrew. It is recommended to use OpenSearch instead.
If you don't have PostgreSQL installed, you can install it using Homebrew:
# Install PostgreSQL 16
brew install postgresql@16
# Check the service status
brew services info postgresql@16
# Start PostgreSQL 16 service
brew services start postgresql@16To run the FusionAuth installation in silent mode, you need to create a PostgreSQL user and database for FusionAuth. You can do this with the following commands:
# Ensure the PostgreSQL binaries are in your PATH
export PATH="$PATH:$(brew --prefix postgresql@16)/bin"
# Create the fusionauth user fusionauth with password fusionauth
psql --command="CREATE USER fusionauth PASSWORD 'fusionauth'" --command="\du" postgres
# Create the fusionauth database owned by the fusionauth user
createdb --owner=fusionauth fusionauthIf you don't have OpenSearch installed, you can install it using Homebrew:
brew install opensearch
brew services info opensearch
brew services start opensearchTo install FusionAuth using Homebrew, you can use the following commands:
brew tap fusionauth/fusionauth
brew install fusionauth-appAfter 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.propertiesAfter installing and configuring FusionAuth, you can manage the service using Homebrew.
After configuring FusionAuth, you can start the service using Homebrew:
brew services start fusionauth-appYou can check the status of the FusionAuth service using:
brew services info fusionauth-appAnd check the logs using:
cat $(brew --prefix)/var/log/fusionauth/fusionauth-app.logTo upgrade FusionAuth, you can use the following command:
brew upgrade fusionauth-appTo stop the FusionAuth service, you can use:
brew services stop fusionauth-appTo uninstall FusionAuth, you can use the following command:
# Stop the FusionAuth service if it is running
brew services stop fusionauth-app
# Uninstall FusionAuth
brew uninstall fusionauth-appIf you want to remove the configuration and log files as well, you can search for the files and folders in $(brew --prefix) and remove them manually.
brew untap fusionauth/fusionauth