Skip to content

Sign in and use profiles

This page covers signing in on a machine, checking which account, project and deployment the CLI is using, signing out, and keeping more than one login with profiles.

  1. Sign in.

    Terminal window
    droneship login
    Signing in to https://api.highflame.ai (profile: default)
    Opening your browser to sign in.
    If it doesn't open, visit:
    https://...
    Signed in as you@example.com (profile: default)
    scopes: <scopes>
    account: <account-id>
    project: <project-id>
    control plane: https://api.highflame.ai

    On a machine with no browser, such as a dev box over SSH, sign in with a code instead:

    Terminal window
    droneship login --headless
    To sign in, visit:
    https://...
    and enter the code: <code>

    Approve the code from any device. The default flow needs your browser’s redirect to reach this machine, which over SSH only works with port forwarding.

  2. Check who you are.

    Terminal window
    droneship whoami
    profile default
    identity you@example.com
    account <account-id>
    project <project-id>
    control plane https://api.highflame.ai
    auth origin https://auth.highflame.ai
    scopes <scopes>
    access token valid
    refresh token present

    Use it to check that the CLI is pointed at the project and deployment you expect.

  3. Sign out when you’re done with a machine.

    Terminal window
    droneship logout
    Signed out of profile 'default'

    This discards the stored credentials for this profile only.

Your account and project are fixed when you sign in. To work in another project, sign in again and name it:

Terminal window
droneship login --project payments-api

--project takes the project’s name, slug or id. It doesn’t work with --headless, which always signs you into your current project:

--project is not supported with --headless. The device flow signs you into your current project.
Sign in without --headless to choose a project, then re-run with --project.

A profile is a named login: its own tokens and its own endpoints. Use one when you want to keep two projects or two deployments signed in at once. --profile goes before the command:

Terminal window
droneship --profile work login --project payments-api
droneship --profile work whoami
droneship --profile work run claude

Or set it for the whole shell:

Terminal window
export DRONESHIP_PROFILE=work

With neither, the CLI uses the profile named default. Each command tells you how to sign in to the profile it’s using, for example droneship --profile work login.

Credentials are stored in ~/.droneship/credentials.json, readable only by you, with one entry per profile.

The CLI talks to the hosted service at https://api.highflame.ai and signs you in through https://auth.highflame.ai. If your team runs another deployment, point a profile at it when you sign in:

Terminal window
droneship --profile staging login --api-url https://<api-host> --auth-url https://<auth-host>

--api-url and --auth-url exist on login only. The profile remembers both, so later commands with that profile go to the same deployment without the flags. DRONESHIP_API_URL and DRONESHIP_AUTH_URL do the same at sign-in time.

A profile saved by an older CLI may name https://studio.highflame.ai as its sign-in address. The CLI changes it to https://auth.highflame.ai for you, so you don’t need to sign in again. A profile for your team’s own deployment keeps its old address: sign in again with --auth-url set to that deployment’s sign-in server.

login prints the deployment and profile before the browser opens, and droneship run prints one line with the endpoint it uses:

endpoint: https://api.highflame.ai (profile: default)

login does not move a signed-in profile to another deployment. If the profile already points somewhere else, login stops and changes nothing:

Profile 'default' is signed in to https://api.highflame.ai (sign-in https://auth.highflame.ai).
This login would move it to https://<api-host> (sign-in https://<auth-host>).
Use another profile for the new deployment: droneship --profile <name> login --api-url https://<api-host> --auth-url https://<auth-host>
Or pass --force to replace this profile's login.

Use another profile for the new deployment, so both logins stay:

Terminal window
droneship --profile staging login --api-url https://<api-host> --auth-url https://<auth-host>

To replace the profile’s login with the new deployment, pass --force. Pass both addresses, so the profile doesn’t keep the old sign-in address:

Terminal window
droneship login --api-url https://<api-host> --auth-url https://<auth-host> --force

Addresses that differ only in the letter case of the scheme or host, a default port or a trailing slash are the same deployment, so login doesn’t stop for them.

The CLI only sends a token to the deployment that issued it. If an environment variable later points a profile at a different endpoint, the CLI stops before making any request:

You previously authenticated with https://api.highflame.ai, but the API endpoint is now https://<api-host>. Unset the override to keep using https://api.highflame.ai, or sign in to the new endpoint under another profile: `droneship --profile <name> login`.

droneship whoami warns you about the same mismatch. Unset the variable, or sign in where it points under another profile. Endpoints must use https:// unless they’re on your own machine.

More: droneship login, droneship whoami, Environment variables, Work as a team.