Guides

Redeploy and roll back

Apply new code and settings to an app, or return to an earlier commit.

A redeploy fetches the source of one app, builds it and rolls out the new deployment. Use it to apply new code, changed variables and changed ports. To roll back, redeploy an earlier commit. Deployments explains what a deployment is.

Before you start

  • A deployed app. The examples use copperfox.
  • New code is pushed to GitHub. LILY builds from GitHub.

Choose the right command

You want toUseRebuilds
Apply new code or changed variables to one appredeployOne app
Deploy all apps of the repository againdeployAll apps of the source
Start the same build again without changesrestartNothing

Steps

Redeploy the latest commit

Open the app and select Redeploy in the action bar, next to Start, Stop and Restart.

lly redeploy copperfox

lly follows the build and prints the same summary as lly deploy.

Roll back to an earlier commit

Redeploy a tag or commit that worked.

Redeploy in the console always builds the latest commit of the branch. To build an earlier commit or tag, use the CLI.

lly redeploy copperfox --ref v1.4.2
lly redeploy copperfox --ref a1b2c3d

The next redeploy without --ref builds the latest commit of the branch again.

Check that it worked

lly app copperfox deployments
Deployment  State       Cap     Placed
dep_9       live        cap_3   2026-10-06 14:02
dep_8       superseded  cap_3   2026-10-05 09:40

The new deployment is live and the previous one is superseded. Cap is the machine the deployment runs on.

If it does not work

What you seeCauseFix
Exit code 5Another command or build is running on the appWait until it finishes. See The project is busy.
Exit code 7The build or rollout failedlly attach --build copperfox shows the build log. See The build failed.
The build is reported as unchangedNothing changed since the last deployPush your commit first
The app cannot be redeployedIt comes from a private repository added by URL with a token, and the token is not storedConnect GitHub and deploy the repository through the connection

More messages and their fixes: Troubleshooting.

Use an agent

Roll my LILY app "copperfox" back to the tag v1.4.2.
Run `lly redeploy copperfox --ref v1.4.2`, wait for the build,
then show me the output of `lly app copperfox deployments`.

Next steps

On this page