Skip to content

Login Command

The fastapi login command authenticates you with FastAPI Cloud. 🚀

This allows you to deploy applications and manage your FastAPI Cloud resources from the CLI.

Terminal window
fastapi login

The command will automatically open your browser to complete the authentication.

When you run fastapi login, the CLI will:

  • Start a device authorization flow
  • Open your browser to the FastAPI Cloud login page
  • Wait for you to authorize the device
  • Store your authentication credentials locally

Your authentication credentials are stored locally on your system in a configuration file.

These credentials are system-wide for the current user, not project-specific. Once logged in, you can deploy any FastAPI application without logging in again.

It’s important to understand the difference:

  • fastapi login - System-wide authentication (run once)
  • .fastapicloud directory - Project-specific configuration (created by fastapi deploy)

You need to be logged in to deploy, but each project has its own deployment configuration.

You only need to log in once. The credentials persist across terminal sessions until you explicitly log out.

If you don’t complete the authorization in time, the process will timeout. Simply run fastapi login again.

  • fastapi cloud logout - Log out from FastAPI Cloud
  • fastapi cloud whoami - Check your current authentication status
  • fastapi deploy - Deploy an application (requires login)