Skip to main content

General

Log in to Latitude.sh
Opens your browser for browser-assisted authentication. To authenticate with an API key instead, pass it as an argument:
Update the CLI to latest version
Generate a shell completion script

Api Keys

Create an API Key
Delete an API Key
List API Keys
Update an API Key

Auth

Show the current authentication context
Shows the active profile’s email, team and API key, plus every other stored profile. Pass --check to validate each stored token against the API. Log out
Removes the stored profile and, for browser logins, revokes the API key. Pass --profile <NAME> to log out a specific profile, or --all to log out every stored profile.

Elastic IPs

List Elastic IPs
Lists all Elastic IPs in the team. ls is available as an alias. Filter with --project, --server, and --status, where status is one of configuring, active, moving, releasing, or error. Retrieve an Elastic IP
Create an Elastic IP
Both --project and --server are required: the API allocates the IP in the target server’s region and assigns it there. Allocation is asynchronous, so the new IP starts in the configuring status until provisioning completes. Move an Elastic IP to another server
Reassigns the Elastic IP to another server in the same project. Delete an Elastic IP
Releases the Elastic IP. rm is available as an alias.

Events

List team audit events
Lists the team’s audit events, newest first, with automatic pagination. Filter the results with --author (ID or email), --project (ID or slug), --target-type (repeatable, e.g. servers, projects, virtual_networks), --target-id, and --action (e.g. servers.create). Use --since and --until to scope the time range. Both accept either a relative duration looking back from now (24h, 7d, 2w) or an ISO date (2026-06-01):
Pass --follow (or -f) to stream new events in real time instead of printing a one-time list. The command keeps polling and prints each new event as it happens until you stop it with Ctrl+C. Combine it with the usual filters to watch a single resource:
--follow streams plain text only: -o json, -o yaml, and -o csv are ignored with a warning, and --until is ignored because the stream has no end. Following starts from the current moment unless you pass --since to replay recent history before streaming.

Firewalls

List firewalls
Lists all firewalls in the team. ls is available as an alias. Filter by project with --project <PROJECT_ID_OR_SLUG>. In the interactive table, press Enter on a row to expand that firewall’s rules. Retrieve a firewall
Create a firewall
--name and --project are both required. Add rules with --rules, passing either an inline JSON array or a file with @path/to/rules.json:
Each rule accepts from, to, protocol (TCP or UDP), port (a single port or a range), and an optional description. Update a firewall
Pass --name, --rules, or both — at least one is required. Passing --rules replaces the firewall’s entire rule set; pass [] to clear all rules. Delete a firewall
rm is available as an alias.

Firewall assignments

An assignment attaches a firewall to a server so the firewall’s rules apply to that server’s traffic. Assign a server to a firewall
List firewall assignments
With --firewall, lists the assignments of a single firewall. Omit it to list every firewall assignment in the team, optionally filtered by --server <SERVER_ID>. Remove a firewall assignment
rm is available as an alias.

IPs

List IP addresses of a project
Pass --all-projects to list IPs across every project you have access to. Filter with --server, --family, --type and --location. Retrieve an IP address

Kubernetes

Manage Kubernetes clusters, list available versions, and fetch a cluster’s kubeconfig. k8s is available as an alias: lsh k8s clusters list. List clusters
Lists the Kubernetes clusters in a project. This endpoint accepts the project ID (proj_xxx) only — it does not resolve slugs. ls is available as an alias. Retrieve a cluster
Create a cluster
--project, --region (site code, e.g. SAO2), and --plan (the control-plane node plan) are required. Optional flags: --worker-plan (defaults to the control-plane plan), --worker-count (defaults to 1), --control-plane-count (defaults to 1), --kubernetes-version (defaults to the latest supported), --ssh-keys (SSH key IDs, repeatable), --os, and --name (auto-generated if omitted). By default the command returns as soon as the request is accepted. Pass --wait to block until the cluster is provisioned instead. The wait fails fast if the cluster enters a failed phase, and --timeout (default 10m) caps how long it waits.
Delete a cluster
rm is available as an alias: lsh kubernetes clusters rm <CLUSTER_ID>. List available Kubernetes versions
Fetch a cluster’s kubeconfig
Prints the cluster’s kubeconfig as raw YAML to stdout. Redirect it to a file to use with kubectl:

Operating Systems

List operating systems available for deployment
os is available as an alias: lsh os list.

Plans

Retrieve information of a plan
List available plans
List bandwidth package plans
Show per-location plan availability and stock level

Profiles

The CLI stores one profile per team you are logged into. The active profile defines the team your commands run against. List stored profiles
Switch the active profile
You can also set the profile for a single command with the global --profile flag or the LSH_PROFILE environment variable.

Projects

Create a project
Delete a project
Retrieve a project
List projects
Update a project

Regions

List available regions

Servers

Deploy a bare metal server
Delete a server
Get information on a server
List servers
Reinstall a server
Wait for a server to finish provisioning By default, servers create and servers reinstall return as soon as the request is accepted. Pass --wait to block until the server settles into a stable state (on or off) instead, which is useful in scripts and CI pipelines where the next step depends on the server being ready.
The wait fails fast if the server enters a failed deployment state, and --timeout (default 10m) caps how long it waits — on timeout the command exits with a non-zero status. Progress is written to stderr while the final server state goes to stdout, so -o json, -o yaml, and -o csv are still honored.
Power on, off, or reboot a server
Each power action is its own subcommand. Pass --wait to block until the server reaches the target power state — on for power-on and reboot, off for power-off — instead of returning as soon as the request is accepted. power-on and power-off return immediately when the server is already in the target state, while reboot waits to observe the power cycle. As with provisioning, --timeout (default 10m) caps the wait, progress is written to stderr, and the wait fails fast if the server enters a failed deployment state.
Boot a server into rescue mode
rescue-mode reboots the server into a lightweight recovery environment, and exit-rescue-mode reboots it back into its installed operating system. Both accept --wait: rescue-mode waits for the server to reach the rescue_mode state, and exit-rescue-mode waits for it to settle back to on or off. The API doesn’t return the rescue login credentials — find them on the server’s page in the dashboard. See Rescue mode for the full recovery workflow. Lock or unlock a server
Locking a server prevents destructive actions such as deletion, reinstall, and power changes. Unlock it to allow those actions again. Schedule deletion
Unschedule deletion
Update a server

SSH Keys

The lsh ssh-keys commands manage your team’s SSH keys at the account level. To manage the keys inside a specific project, use lsh projects ssh-keys instead. The legacy ssh_keys name still works as a hidden alias. List SSH keys
Filter by tag with --tags <TAG_ID>. Lists paginate automatically; use --page-size, --max-items, or --no-paginate to control paging. ls is available as an alias. Retrieve an SSH key
Create an SSH key
Both --name and --public-key are required. Update an SSH key
Only the flags you pass are changed. Pass --name to rename the key and --tags <TAG_ID> (repeatable) to associate tags. Delete an SSH key
rm is available as an alias. Manage a project’s SSH keys
The projects ssh-keys commands (list, get, create, and delete) manage SSH keys scoped to a project. create adds a new key to the project and delete removes it entirely, rather than detaching a team key. Commands default to the active project, so --project is optional once one is set.

Storage Filesystems

Manage file storage volumes in a project. Filesystems are created from the dashboard; the CLI lists, resizes, and deletes them. List filesystems
ls is available as an alias. Pass --project to filter to a single project. Resize a filesystem
Size is the only field you can update. --size is required and must be a positive number of GB; otherwise the command fails before making any request. Delete a filesystem
rm is available as an alias.

Storage Objects

Manage S3-compatible object storage buckets in a project. List buckets
ls is available as an alias. Pass --project to filter to a single project. Retrieve a bucket
Create a bucket
--project, --name, and --region are required. --region takes a site slug (for example, DAL). Optionally pass --storage-class (standard or high_performance), --versioning to enable object versioning, and --locking to enable object lock (WORM). Object lock requires versioning, so --locking enables it automatically.
Delete a bucket
rm is available as an alias.

Tags

Create a Tag
Delete Tag
List all Tags
Update Tag
The lsh tags commands manage the tags themselves. To attach a tag to a resource, pass --tags to that resource’s own update command:

Traffic

Show traffic consumption
Shows bandwidth consumption per region for a project, mirroring the dashboard: inbound and outbound totals, the quota, and how much of it has been used. Units follow the project’s billing method — TB for volume billing, Mbps for 95th-percentile billing. A project is required; in an interactive terminal you’re prompted to pick one when --project is omitted. The range defaults to the last 7 days. Override it with --since and --until, which accept a duration (24h, 7d, 2w) or an ISO date (2026-06-01). The range applies to consumption only — the quota column always reflects the current limit. Pass --daily for the day-by-day breakdown behind the dashboard chart.
Show traffic quota
Shows the traffic quota of each project, per region. Pass --project to filter to a single project.

Teams

Team and member operations are interactive: when you omit an argument or required flag, the CLI prompts you for it in the terminal.
List your teams
Create a team
Update a team
List members of the current team
Invite a user to the current team
Roles: owner, administrator, collaborator or billing. Remove a user from the current team

User Data

The lsh user-data commands manage your team’s user data scripts at the account level. To manage the user data inside a specific project, use lsh projects user-data instead. The API stores user data content base64-encoded. To keep things simple, --content takes plain text and encodes it for you, while --content-base64 passes an already-encoded value through unchanged. The two flags are mutually exclusive. List user data
ls is available as an alias. Lists show a compact table without the base64 content, and paginate automatically; use --page-size, --max-items, or --no-paginate to control paging. Retrieve a user data entry
The details view decodes and shows the cloud-init content, and is scrollable for longer scripts. Create a user data entry
--description is required. Pass the script with either --content (plain text) or --content-base64 (already encoded). Update a user data entry
Only the flags you pass are changed. Provide at least one of --description or --content/--content-base64. Delete a user data entry
rm is available as an alias. Manage a project’s user data
The projects user-data commands manage user data scoped to a project, with the same --content and --content-base64 handling as the account-level commands. Commands default to the active project, so --project is optional once one is set. Unlike the other list commands, projects user-data list returns a single page; the pagination flags are accepted but have no effect.

Virtual Machines

vm and vms are available as aliases: lsh vm list, lsh vms get <VM_ID>. List virtual machines
Lists every virtual machine in the team. Filter with --project <PROJECT_ID_OR_SLUG> and --tags <TAG_ID> (repeatable or comma-separated). Retrieve a virtual machine
Create a virtual machine
--plan and --project are required. Pass the plan ID (plan_xxx) — virtual machine plans have no slug. Optional flags: --name (hostname), --region (site slug, e.g. DAL; defaults to DAL), --os (operating system slug), --ssh-keys (SSH key IDs, repeatable), --user-data (a user data record reference such as ud_xxx, applied as cloud-init), and --tags (tag IDs, repeatable). By default the command returns as soon as the request is accepted. Pass --wait to block until the VM reaches the Running state instead. --timeout (default 10m) caps the wait; on timeout the command exits with a non-zero status. Progress is written to stderr and the final state to stdout, so -o json, -o yaml, and -o csv are honored.
Update a virtual machine
Updates the virtual machine’s name or tags. Pass --name and/or --tags (tag IDs; replaces all existing tags) — at least one is required. Run a power action
--action is required and must be one of power_on, power_off, or reboot. Delete a virtual machine
rm is available as an alias: lsh virtual-machines rm <VM_ID>.

Virtual Networks

Creates a virtual network
Delete a virtual network
Retrieve a virtual network
List virtual networks
Update a virtual network

Virtual Networks Assignments

Assign a server to a virtual network
Unassign a server from a virtual network
List assignments

Help

  • Use lsh -h to get a list of all available commands
  • To see how to use a command, use lsh <resource> -h
The CLI also ships built-in help topics with longer guides:
See Output formats & automation for the full guide to machine-readable output, --query filtering, and pagination.