Standalone¶
Standalone mode runs the whole Gradient stack on one machine. This setup suits personal projects and evaluation. Server, web UI, PostgreSQL and worker all live in a single container or VM.
Requirements:
1. Start Gradient¶
docker run -dt --name gradient \
--privileged --cgroupns=host \
-p 127.0.0.1:8080:80 \
-v gradient:/var/lib \
ghcr.io/wavelens/gradient-standalone
Run the container with --privileged. Systemd and the Nix build sandbox both run inside it and need that flag. The boot output does not appear in docker logs. Step 2 shows the password in its tabs. The port binds to 127.0.0.1 only. The gradient volume stores projects, the cache and every build across a restart.
This runs a QEMU VM in the terminal with a root login. Projects, the cache and every build persist in the disk image gradient.qcow2 in the current directory across a restart. Press Ctrl-a x to stop the VM. The run script can rebuild the image of the VM's Nix store before every boot. A startup can take longer than a plain VM.
Image Provenance
Release images come with a signed build provenance and an SBOM. The GitHub CLI can verify the provenance against the repository.
The first boot can take a minute. PostgreSQL has to initialize, and Gradient generates its secrets.
2. Log In¶
The boot steps in Gradient create a random password for the admin account at first boot. They write that password once on the next line.
Later starts show a file name instead of the password. Run one of the commands below to read the current password directly from disk.
Then open http://localhost:8080 and sign in as admin. New users cannot register themselves.
3. Build a Repository¶
Set up a cache, a project and a task by following First Project from step 2 onward. The standalone instance's worker joins each new project automatically.
Private Repositories
On the Git host, register the project's public SSH key from Settings -> SSH Key as a deploy key.
Git Hosts on Private Addresses
Gradient can connect only to Git hosts on public addresses. Environment variables in the /var/lib/gradient-standalone/server-environment file on the volume define server settings, one NAME=value per line. Gradient can read that file at each server start. Add the line below to allow Git hosts on the Docker bridge network 172.17.0.0/16.
Verify Deployment¶
- The login page loads at
http://localhost:8080. - The evaluation page lists the builds as completed once the first evaluation has run.
Upgrade¶
Warning
The standalone instance uses plain HTTP, a single worker and no backups. To run it for a team, deploy with the NixOS module from the Quick Start.
Next Steps¶
- First Project: set up a project, add a cache, and run the first successful build
- Quick Start: deploy on NixOS with TLS enabled
- Remote Worker: add extra build capacity
- Share a Cache: make build outputs available on other machines