kamal-ui is a local-first web dashboard for operating Rails applications that are deployed with Kamal. It lets an operator load a local Kamal project, inspect prerequisites, run common Kamal commands, review command output, check containers, view logs, sample server health, and prepare rollbacks from a browser.
This project is maintained at KernelTheory/kamal-ui.
This is early open-source software. Expect the interface and internal APIs to change while the core workflows settle.
The app is intentionally unauthenticated because it is designed to run on a trusted local machine. Do not expose it directly to the public internet. If you deploy it anywhere reachable by other people, put it behind a private network, VPN, reverse proxy authentication, or another access-control layer.
- Ruby
3.4.2 - Bundler
- SQLite 3
- Docker, when building or deploying the app container
- A target application that already uses Kamal
- Kamal
2.12.0or newer in the target application - A target app
config/deploy.ymlordeploy.yml - A target app
.kamal/secretsfile before running deploy-related commands
Clone the repository:
git clone https://github.com/KernelTheory/kamal-ui.git
cd kamal-uiInstall dependencies, prepare the database, clear old logs/temp files, and start the app:
bin/setupIf you only want to prepare the app without starting the server:
bin/setup --skip-serverStart the development server later with:
bin/devThen open http://localhost:3000.
- Start
kamal-uiwithbin/dev. - Open
http://localhost:3000. - Choose a local application directory that contains Kamal configuration.
- Confirm the prerequisite checks for Kamal, Docker, Git metadata, and
.kamal/secrets. - Use the dashboard to run supported commands such as deploy, redeploy, setup, rollback, logs, container status, and server health checks.
Commands run from the selected target app directory, not from the kamal-ui repository. That target app must have its own dependencies, Kamal config, credentials, and deployment access ready.
Install or update dependencies:
bundle installPrepare the database:
bin/rails db:prepareRun the Rails test suite:
bin/rails testRun the full local CI workflow:
bin/ciRun individual quality checks:
bin/rubocop
bin/bundler-audit
bin/importmap audit
bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-errorOpen a Rails console:
bin/rails consoleReset local development data:
bin/setup --reset --skip-serverkamal-ui is a Rails 8 application using:
- SQLite for local persistence
- Solid Queue, Solid Cache, and Solid Cable
- Turbo and Stimulus through import maps
- Propshaft for assets
- Kamal command wrappers under
app/services/kamal - Controller and service tests under
test
Key directories:
app/controllers: HTTP endpoints for dashboard, projects, commands, logs, containers, server health, and rollbacksapp/services/kamal: command building, command execution, log parsing, health sampling, rollback discovery, and container inspectionapp/jobs: background jobs for command execution and samplingapp/views: Rails templates for the UIapp/assets/stylesheets/application.css: application stylinglib/docs: planning notes, design documentation, and implementation recordstest: Minitest coverage for models, services, jobs, controllers, and stylesheets
Most users should run kamal-ui locally. Deployment is optional and should be treated as an operator-facing internal tool deployment.
Before deploying:
- Run
bin/cilocally and make sure it passes. - Decide how access will be restricted. The app does not provide built-in authentication.
- Set up the production Rails secret, normally through
RAILS_MASTER_KEYor equivalent secret management. - Configure persistent storage for SQLite databases and command logs. Do not rely on ephemeral container storage for production-like use.
- Confirm the host can reach any target app repositories, Docker registries, and servers that operators need to manage.
- Confirm Docker and Kamal are available where commands need to execute.
- Review backup and restore expectations for SQLite data and generated logs.
- Review
Dockerfileandbin/docker-entrypointfor the current container boot behavior.
Build and run the production container manually:
docker build -t kamal_ui .
docker run -d -p 80:80 -e RAILS_MASTER_KEY=<value> --name kamal_ui kamal_uiWhen deploying with Kamal, create deployment configuration for this repository in the usual Kamal format and keep secrets out of Git. Protect the deployed app with network or proxy-level access control.
Contributions are welcome through pull requests.
Before starting:
- Open or find an issue that describes the problem, unless the change is small and obvious.
- Keep changes focused. Separate refactors from behavior changes.
- For UI work, read
lib/docs/design.mdbefore changing templates or CSS. - For behavior changes, add or update tests first.
Development process:
- Create a branch from
main. - Run
bin/setup --skip-server. - Add one small behavior at a time.
- Run the smallest relevant test while developing.
- Run
bin/cibefore opening a PR. - Update documentation when behavior, setup, commands, or operator expectations change.
Pull request checklist:
- Describe the user-facing change and why it is needed.
- Link the related issue or discussion when one exists.
- Include screenshots for UI changes.
- Include test output, preferably
bin/ci. - Call out any deployment, security, data migration, or compatibility risks.
- Keep generated files, local logs, temporary scripts, and machine-specific files out of the PR.
Bot agents are welcome to contribute, but they should behave like careful maintainers:
- Read this README and
AGENTS.mdbefore changing files. - Inspect the existing code and tests before proposing edits.
- Prefer small, reviewable changes with clear test coverage.
- Follow the local Rails and Minitest patterns already in the repository.
- Do not introduce new frameworks, package managers, services, or build tools without a strong reason and maintainer approval.
- For UI changes, follow
lib/docs/design.mdand verify rendered states with screenshots. - Do not weaken, delete, or skip tests to make a change pass.
- Do not expose secrets, credentials, local paths, command logs with sensitive output, or
.kamal/secrets. - Leave unrelated user or maintainer changes untouched.
- Report commands run and any tests that could not be run.
This project shells out to Kamal commands for selected local projects. Treat it as an operator tool with access to deployment credentials and production infrastructure.
Do not expose a running instance publicly without an external access-control layer. Do not commit .kamal/secrets, Rails master keys, registry credentials, SSH keys, command logs containing secrets, or production database files.
This project is released under the terms in LICENSE.