Skip to main content
A sitectl context points to a site running either on your local machine or on a remote server over SSH. You can have many contexts and switch between them with use-context. See the context concept page for a full explanation.

config

A sitectl config can have multiple contexts. A sitectl context is a docker compose site running somewhere. “Somewhere” meaning:
  • on your laptop (--type local)
  • on a remote server (--type remote).
Remote contexts require SSH access to the remote server from where sitectl is being ran from. When creating a context the remote server DNS name, SSH port, SSH username, and the path to your SSH private key will need to be set in the context configuration. You can have a default context which will be used when running sitectl commands, unless the context is overridden with the --context flag.

current-context

Display the current site context

get-contexts

List all site contexts

get-environments

List environments grouped by site

get-sites

List configured sites and their environments

set-context

Set or update properties of a context. Creates a new context if it does not exist.

use-context

Switch to the specified context

delete-context

Delete a site context

validate

Validate sitectl context configuration and access

view

Print your sitectl config