Beginning with base OS Image of Ubuntu Server 22.04 Install with the following:

sudo apt update && sudo apt upgrade
sudo snap install upx
git clone <https://github.com/mitre/caldera.git> --recursive --branch 4.2.0
cd caldera
sudo apt install python3-pip golang-go
sudo pip3 install -r requirements.txt
python3 server.py

Once the server starts for the first time it will display the generated credentials you’ll want to grab those (looks something like this):

Log into Caldera with the following admin credentials:
    Red:
        USERNAME: red
        PASSWORD: wYzA8uFX9JlOZIw0Ysotm_MlPSIwIQSKcC01j2Ww4Jc
        API_TOKEN: AjalYVofZVPHbGJTpQGSb6NetvunUUIO53QYdf13zIM
    Blue:
        USERNAME: blue
        PASSWORD: psu3CJRAV3w1BRiQdvnyaw843dHzRpUI-2TlFUAYeHs
        API_TOKEN: 24kbGJMJtgiXX7MdYKIatdr32YH3ZrjLwUqixRveMoA

You can ctrl+c to close out of the running server so we can create a systemd service for it. You can create the systemd service like this:

sudo vim /etc/systemd/system/caldera.service

You can copy and paste the following (changing the user and paths as needed):

[Unit]
Description=Caldera Server
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/python3 /opt/caldera/server.py
ExecStop=/bin/kill -s SIGINT -$MAINPID
WorkingDirectory=/opt/caldera
User=root
Group=root
Restart=on-failure
[Install]
WantedBy=multi-user.target

Run the following commands to reload systemd, enable, and start the service:

sudo systemctl daemon-reload
sudo systemctl start caldera.service
sudo systemctl enable caldera.service
sudo systemctl status caldera.service

You should now be able to access Caldera’s UI on http://<server_ip>:8888 and sign in with the creds you saved from the server’s first run output.