Set Up Cloud.gov Access
Overview
Cloud.gov provides both web-based dashboard access and command-line interface (CLI) capabilities for managing applications and services. This guide covers initial setup for both access methods, including authentication configuration and troubleshooting common issues. Federal employees typically use agency single sign-on while contractors use Cloud.gov accounts with multi-factor authentication.
Prerequisites
- Valid Cloud.gov account (see Account Management)
- For agency SSO: PIV/CAC card and reader
- For Cloud.gov accounts: TOTP authenticator app
- System administrator privileges for CLI installation
Process / Steps
1. Access the Web Dashboard
The dashboard provides visual access to organizations, spaces, and applications:
- Navigate to https://dashboard.fr.cloud.gov
- Select your authentication method:
- Agency button for SSO-enabled agencies
- Cloud.gov for email/password accounts
- Complete authentication
- View your organizations and spaces
Dashboard capabilities:
- View application status and logs
- Manage team members and roles
- Monitor resource usage
- Access deployment history
2. Install the Command Line Interface
The Cloud Foundry CLI provides full platform capabilities:
Windows Installation
- Download the Windows installer
- Run the .exe installer as Administrator
- Verify installation:
cf --version
macOS Installation
# Intel Macs
brew install cloudfoundry/tap/cf-cli@8
# Apple Silicon Macs
# Download from https://packages.cloudfoundry.org/stable?release=macosarm
Linux Installation
# Debian/Ubuntu
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
sudo apt-get update
sudo apt-get install cf8-cli
# RedHat/CentOS
sudo wget -O /etc/yum.repos.d/cloudfoundry-cli.repo https://packages.cloudfoundry.org/fedora/cloudfoundry-cli.repo
sudo yum install cf8-cli
3. Configure CLI Authentication
Log in using single sign-on:
cf login -a api.fr.cloud.gov --sso
Process:
- CLI displays:
One Time Code ( Get one at https://login.fr.cloud.gov/passcode )
- Open the link in your browser
- Authenticate with your credentials
- Copy the temporary authentication code
- Paste into terminal (no characters display)
- Press Enter
4. Set Your Target
After login, select your working context:
# List available orgs
cf orgs
# List available spaces
cf target -o YOUR-ORG
cf spaces
# Set target
cf target -o YOUR-ORG -s YOUR-SPACE
5. Verify Setup
Confirm successful configuration:
# Check CLI version
cf --version
# Verify API endpoint
cf api
# View current target
cf target
# List apps in current space
cf apps
Common Errors & Fixes
CLI Command Not Found
- Issue:
cf: command not found
- Fix: Add CF CLI to system PATH or reinstall
SSO Authentication Fails
- Issue: Browser doesn't open or code rejected
- Fix:
- Try different browser
- Clear browser cache
- Verify network allows *.cloud.gov
Invalid One-Time Code
- Issue: "Invalid authorization code"
- Fix: Code expires in 5 minutes - get new code
No Orgs Available
- Issue:
cf orgs
returns empty - Fix: Contact Org Manager for access
Certificate Errors
- Issue: SSL/TLS verification failures
- Fix: Update system certificates; don't bypass with
--skip-ssl-validation
FAQs
Q: How long do CLI sessions last?
A: Sessions expire after 24 hours of inactivity. Run cf login
to refresh.
Q: Can I automate CLI authentication?
A: Use service accounts with CF_USERNAME
and CF_PASSWORD
environment variables for CI/CD.
Q: Why use both dashboard and CLI? A: Dashboard for visualization and quick tasks; CLI for automation and full control.
Q: How do I update the CLI?
A: Use your package manager (brew upgrade cf-cli
on macOS) or download the latest installer.
Q: Can I use multiple CF CLI versions? A: Yes, but Cloud.gov requires version 7.0+ for full feature support. Version 8 recommended.