Prerequisites
Before installing the Frontier CLI, ensure you have:- Operating System: Linux, macOS, or Windows
- Architecture: AMD64 (x86_64) or ARM64
- Network access to download the binary (or access to your organization’s artifact repository)
Installation Methods
Using Pre-built Binaries
Linux and macOS
Download the latest release for your platform:Windows
- Download the Windows executable from the releases page
- Rename the downloaded file to
frontier.exe - Add the directory containing
frontier.exeto your system PATH
Using Go Install
If you have Go installed (version 1.21 or later):Make sure
$GOPATH/bin or $HOME/go/bin is in your system PATH.Building from Source
For development or custom builds:Verify Installation
Confirm the installation by checking the version:Initial Configuration
Server Configuration
If you’re setting up a Frontier server, initialize the configuration:config.yaml. Edit this file to configure:
- Database connection (PostgreSQL)
- SpiceDB connection for authorization
- Authentication settings
- API server port and host
- And more
Client Configuration
For CLI client operations, initialize the client config:- Linux/macOS:
$HOME/.config/raystack/frontier/config.yaml - Windows:
%APPDATA%\raystack\frontier\config.yaml
Configuration File Locations
Frontier looks for configuration files in the following locations:Server Config
Specified explicitly with the-c or --config flag:
Client Config
Default locations (in order of precedence):$RAYSTACK_CONFIG_DIR/frontier/config.yaml$XDG_CONFIG_HOME/raystack/frontier/config.yaml$HOME/.config/raystack/frontier/config.yaml
Environment Variables
Configure the CLI using environment variables:Override the default config directoryExample:
/etc/raystackDisable colored outputExample:
1Disable ANSI colors when set to
0Example: 0Database Setup
Frontier requires PostgreSQL and SpiceDB. Before running migrations:PostgreSQL
config.yaml with the database URL:
SpiceDB
Frontier uses SpiceDB for authorization. Install and run SpiceDB:config.yaml:
Running Database Migrations
After configuring the database, run migrations:- Create all necessary database tables
- Set up default metadata schemas
- Prepare the database for use
Testing the Installation
Start the Server
Seed Sample Data
Populate the database with sample data for testing:- Sample users
- Sample organizations
- Sample projects
- Sample roles and permissions
- Sample policies
Verify API Access
Check that the API is accessible:Updating Frontier
To update to the latest version:Binary Installation
Download and replace the binary:Go Install
Check for Updates
Theversion command automatically checks for new releases:
Troubleshooting
Command Not Found
If you get a “command not found” error:-
Verify the binary is in your PATH:
-
Add the directory to your PATH:
Permission Denied
If you get permission errors:Database Connection Issues
-
Verify PostgreSQL is running:
- Check database URL in config.yaml
- Verify network connectivity
SpiceDB Connection Issues
-
Verify SpiceDB is running:
- Check SpiceDB configuration in config.yaml
Next Steps
CLI Overview
Learn about CLI capabilities
Commands Reference
Explore all available commands
Shell Autocomplete
Set up command autocompletion