---
layout: commands
page_title: 'Commands: Login'
sidebar_title: 'login'
description: 'Log in to a Waypoint server'
---

# Waypoint Login

Command: `waypoint login`

Log in to a Waypoint server

@include "commands/login_desc.mdx"

## Usage

Usage: `waypoint login [server address]`

Log in to a Waypoint server.

This is usually the first command a new user runs to gain CLI access to
an existing Waypoint server.

If the server address is not specified and you have an active
context (see "waypoint context"), then this command will reauthenticate
to the currently active server.

This command can be used for token-based authentication as well as
other forms such as OIDC. You can use "-token" to specify a login or
invite token and configure the CLI to access the server.

The "-from-kubernetes" flag can be used after a fresh Waypoint installation
on Kubernetes to log in using the bootstrap token. This requires local
Kubernetes connection configuration via a KUBECONFIG environment variable
or file.

#### Global Options

- `-plain` - Plain output: no colors, no animation. The default is false.
- `-app=<string>` (`-a`) - App to target. Certain commands require a single app target for Waypoint configurations with multiple apps. If you have a single app, then this can be ignored.
- `-project=<string>` (`-p`) - Project to target.
- `-workspace=<string>` (`-w`) - Workspace to operate in.

#### Connection Options

- `-server-addr=<string>` - Address for the server.
- `-server-tls` - True if the server should be connected to via TLS. The default is true.
- `-server-tls-skip-verify` - True to skip verification of the TLS certificate advertised by the server. The default is false.

#### Command Options

- `-auth-method=<string>` - Auth method to use for login. This will default to the only available auth method if only one exists.
- `-token=<string>` - Auth with a token. This will force auth-method to 'token'. This works with both login and invite tokens.
- `-from-kubernetes` - Perform the initial authentication after Waypoint is installed to Kubernetes. This requires kubectl to be configured with access to the Kubernetes cluster. The primary use case of this is to get the first token from a Waypoint installation. After that, future users should use a configured auth method or request a token from an administrator. The default is false.
- `-from-kubernetes-service=<string>` - The name of the Kubernetes service to get the server address from when using the -from-kubernetes flag. The default is waypoint-ui.
- `-from-kubernetes-secret=<string>` - The name of the Kubernetes secret that has the Waypoint token when using the -from-kubernetes flag. The default is waypoint-server-token.
- `-from-kubernetes-namespace=<string>` - The name of the Kubernetes namespace that has the Waypoint token when using the -from-kubernetes flag.

@include "commands/login_more.mdx"
