CodeRed Cloud CLI Quickstart#

Before running this guide, make sure you have cr installed.

Get an API Token#

To use cr, first log in to your CodeRed Cloud dashboard and create an API token for your Client here: Note that a token will have access to all websites belonging to that Client. If you need more fine-grained permissions, contact support to create separate Clients.

API tokens are secret and should be stored either in the CR_TOKEN environment variable, or in your personal config file at ~/.cr.ini as so:

token = a1b2c3...


Never commit or expose your tokens to public version control! If you do accidentally expose a token, it can be cycled through the CodeRed Cloud dashboard.

The webapp handle is your website’s CodeRed Cloud subdomain. For example: would be demo.

Finally, run cr --help to see usage, or cr {command} --help to see usage about a particular command.


Once you have installed cr, have a webapp handle, and have an API token, you are ready to do your first deployment. To start, open a terminal and cd to your project folder.

For Django and Wagtail projects, this is the folder containing a and requirements.txt file. For WordPress projects, this should contain a wp-config.php file. For Static HTML sites, this is the folder with the published/built HTML (for example, Sphinx usually outputs to a _build/html/ folder)

$ cd ~/myproject
$ cr deploy webapp

If the cr tool detects that you are in the wrong folder, it will prompt you to confirm.

To configure automatic deployments on git push, see: Automated Deployments.


Configuration files can be created using the name .cr.ini. The following locations are searched:

  • Home Directory (i.e. ~/.cr.ini)

  • The working directory (this generally should be your project root, unless you have specified --path to some commands).

A config file in the working directory will override values in a config file from home directory.

The default section in the config file is [cr]. Other sections named after your webapp handles can override these values. For example:

# API token for my client.
token = abc...

# These settings are for ````
token = xyz...

The API token can also be specified in an environment variable named CR_TOKEN. This is useful for CI/CD pipelines.

Read the full configuration reference.