Skip to content

Setting up with CommandBox

Pete Freitag edited this page Dec 8, 2025 · 7 revisions

Setting up with CommandBox

CommandBox is a great tool for many reasons, but one of the best features is that you can easily start a ColdFusion server of (almost) any version. CommandBox will take care of downloading the server for you and starting it on a random (or specified) port number.

First you need CommandBox

Head over to the CommandBox download page and select the binary under With JRE Included that matches your operating system and bitness (you probably want 64 bit).

Copy the box.exe file (windows) or box file (mac) to a folder, for example we will assume if you are on windows that it is here: c:\Downloads\box.exe and on Mac ~/Downloads/box (where ~ is your home directory).

You may want to copy the file to another more permanent location once you see how cool it is!

Run CommandBox

On Windows

On Windows you can simply double click box.exe to bring up a new box shell.

Mac or Linux

On Mac/Linux you will need to open Terminal.app and then type the path to the box binary, eg:

~/Downloads/box

When box loads up you should see an ascii art CommandBox logo, with a prompt.

Download the source code repository

Download the zip archive of this repository and unzip it into the Downloads folder, it should extract to a folder called cfml-security-training-master. If you are familiar with git you can clone the repository locally instead of downloading the zip.

From the box shell use the cd command to navigate to your Downloads directory.

cd /Downloads/cfml-security-training-master/wwwroot

Now use box to start a ColdFusion 2025 server:

server start cfengine=adobe@2025

The box command will download CF 2025 and start it up on a random port, once it is finished it should open the browser to the website.

CommandBox does not install any packages with CF2025, so you will likely see an error about missing packages. In commandbox with the current directory still the wwwroot folder, run:

cfpm install all

The above will download and install all of the optional ColdFusion packages. If you prefer to install them one at a time as needed you can do that instead.

Finally once the necessary packages are installed restart your server in commandbox:

server restart

Code Editor

Open up your favorite CFML editor and point it to the code you just downloaded.

If you do not have a CFML editor on your laptop, a good free option is Visual Studio Code with the CFML Extension installed.

AI

Not required, a small portion of the class we will look at some AI related security issues. If you'd like to be able to test this locally, you can install Ollama: https://ollama.com/download

And then download the model: ollama pull llama3.1