Registering an Agent
Registering an Agent
Section titled “Registering an Agent”Before an agent can execute builds, it must be registered with FlightStack. This guide walks through the registration process.
Prerequisites
Section titled “Prerequisites”Before registering, ensure you have:
- FlightStack CLI installed (Installation Guide)
- Logged in to FlightStack (
flightstack login) - Required build tools installed (Flutter, Xcode, etc.)
Registration Process
Section titled “Registration Process”-
Verify Login
Section titled “Verify Login”Ensure you’re logged in:
Terminal window flightstack login -
Run Registration
Section titled “Run Registration”Register your machine as an agent:
Terminal window flightstack agent register -
Enter Agent Name
Section titled “Enter Agent Name”You’ll be prompted for a name (defaults to your hostname):
Agent name (My-MacBook-Pro): -
System Detection
Section titled “System Detection”The CLI automatically detects your system capabilities:
System Information:Platform: macOSOS Version: macOS 14.2Xcode: 15.1Flutter: 3.16.5Dart: 3.2.3Capabilities:iOS: ✓Android: ✓Web: ✓ -
Registration Complete
Section titled “Registration Complete”Upon success:
✓ Agent registered successfully!Agent ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890Next step: flightstack agent start
Registration Options
Section titled “Registration Options”Custom Agent Name
Section titled “Custom Agent Name”flightstack agent register --name "iOS-Build-Server"Organization-Scoped Agent
Section titled “Organization-Scoped Agent”Register an agent for a specific organization (private agent):
flightstack agent register --org <organization-id>Profile Support
Section titled “Profile Support”Use profiles to manage separate agent configurations (e.g., for local development):
# Register with a profileflightstack-agent register --profile dev
You can also set the profile via environment variable:
export FLIGHTSTACK_PROFILE=devflightstack-agent registerNon-Interactive Registration
Section titled “Non-Interactive Registration”For scripted/automated setup:
flightstack-agent register \ --name "CI-Server-01" \ --org "org-id-here"What Gets Registered
Section titled “What Gets Registered”During registration, the following information is collected and stored:
| Data | Purpose |
|---|---|
| Agent name | Display name in UI |
| Platform | macOS, Linux, or Windows |
| OS version | For compatibility checks |
| Xcode version | iOS build capability |
| Flutter version | Build environment info |
| Dart version | Build environment info |
| Capabilities | What platforms can be built |
Agent Configuration File
Section titled “Agent Configuration File”After registration, configuration is stored at:
~/.flightstack/agent.json%USERPROFILE%\.flightstack\agent.jsonThe file contains:
{ "agentId": "a1b2c3d4-...", "token": "eyJhbGciOiJI...", "apiUrl": "https://api.flightstack.dev", "agentName": "My-MacBook-Pro", "platform": "macOS", "organizationId": null, "organizationName": null}Re-Registration
Section titled “Re-Registration”If you need to re-register an agent (new token, different org, etc.):
flightstack agent registerYou’ll be prompted:
This machine is already registered as an agent.Agent: My-MacBook-ProID: a1b2c3d4-...
Re-register and replace existing? (y/n)Verifying Registration
Section titled “Verifying Registration”After registration, verify the agent appears in FlightStack:
# List all agentsflightstack agent list
# Or check local statusflightstack agent statusOutput:
Build Agents (1):────────────────────────────────────────────────────────────
My-MacBook-Pro ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890 Status: 🔴 Offline Scope: 🌐 Public Platform: macOS Capabilities: iOS, Android, Web Builds: 0 total, 0 successful
────────────────────────────────────────────────────────────Troubleshooting Registration
Section titled “Troubleshooting Registration””Not logged in” Error
Section titled “”Not logged in” Error”# Log in firstflightstack login
# Then registerflightstack agent register”Agent already registered”
Section titled “”Agent already registered””If you want to keep the existing registration:
- Answer “n” when prompted to re-register
- Run
flightstack agent startto start the existing agent
To force re-registration:
- Answer “y” to replace the existing registration
- Or delete the config file:
rm ~/.flightstack/agent.json
Flutter Not Detected
Section titled “Flutter Not Detected”Ensure Flutter is in your PATH:
# Check Flutterflutter doctor
# Add to PATH if neededexport PATH="$PATH:/path/to/flutter/bin"Xcode Not Detected (macOS)
Section titled “Xcode Not Detected (macOS)”# Install Xcode from App Store, then:sudo xcode-select --switch /Applications/Xcode.app/Contents/Developersudo xcodebuild -license acceptNext Steps
Section titled “Next Steps”After registration: