TurboPanel Docs
Development

Contribute Without Access

You do not need to be a maintainer to change TurboPanel. This page takes you from nothing to an open pull request using only a GitHub account. Maintainers use the same loop; the only difference is where origin points (see What maintainers do differently).

Folder Layout

The setup script (started with scripts/start.sh, then ./dev/scripts/setup.sh with doctor and status) has merged. In both modes the repos sit in a folder named turbopanel on the machine you work in, for example ~/turbopanel/<repo> (in the Vagrant guest, /home/vagrant/turbopanel/<repo>). Every step also has a manual form, shown as By Hand.

Before You Start

You need:

You do not need an SSH key for the clones in this guide. Clones go over HTTPS through gh by default. The Direct VM bootstrap's --clone option clones over SSH, so on a Direct machine without a GitHub SSH key use the setup script or clone by hand with gh as shown below, and skip --clone. If you already use SSH for GitHub, gh follows your git_protocol setting (gh config set git_protocol ssh), or your own url.insteadOf rewrite, and nothing else changes.

Ask First for Anything Bigger Than a Small Fix

Open an issue or start a thread in Discord before you write code for anything beyond a small fix. A small fix is a typo or wording change, a documentation correction, or a bug fix of about 50 changed lines or fewer in one repository that adds no feature, no database migration and no change to the messages between the control plane and the daemon. Anything else is cheaper to shape before it is written than after. Link the issue in your pull request.

One-Command Setup

All six repositories live inside one folder named turbopanel: dev, turbopanel (the control plane), turbopaneld (the daemon), ui, website and .github.

From your home folder, run one command:

Terminal
curl -fsSL https://raw.githubusercontent.com/TurboPanel/dev/trunk/scripts/start.sh | sh

Options go after sh -s --, for example ... | sh -s -- --dry-run. Reading a script before you run it is wise, so you can download it, read it and then run it instead:

Terminal
curl -fsSL -o start.sh https://raw.githubusercontent.com/TurboPanel/dev/trunk/scripts/start.sh
less start.sh
sh start.sh

The address tracks trunk; there is no pinned release yet. The start script installs nothing and uses no sudo. It creates ~/turbopanel, clones dev into it over HTTPS (or reuses an existing checkout), and hands over to setup.sh, which prints its plan and asks before it changes anything. setup.sh asks whether to use Vagrant or this machine directly (Direct is Debian 13 only; macOS offers Vagrant only), clones the other repos, and writes the choice to .turbopanel-dev-mode inside the turbopanel folder (for example turbopanel/.turbopanel-dev-mode).

Your role decides how repos are cloned. Maintainers (push access) clone straight from TurboPanel and push branches there. Outside contributors get read-only clones of TurboPanel's repos. When you are ready to push, fork just that repo:

Terminal
~/turbopanel/dev/scripts/setup.sh fork website

That forks the repo, rewires origin to your fork, makes TurboPanel upstream and sets the GitHub CLI default repository. .github is never forked for you, because a fork of it would become your account-wide community health repository; fork it by hand only if you change it. Useful flags:

FlagMeaning
--dir PATHUse PATH as the folder that holds the repos (an absolute path to a folder named turbopanel; default ~/turbopanel)
--mode direct|vagrantSkip the question and pick the environment
--as-contributorA maintainer tries the contributor path: read-only clones, forks later (--fork is the old name and prints a warning)
--fork-allFork every repo you cannot push to at setup, instead of on first push
--yesAccept the plan without asking
--dry-runPrint the plan and change nothing

Not Yet Proven

A full run on a fresh machine, the Vagrant mounts at ~/turbopanel/<repo>, and the real fork and default-repository steps against GitHub have not been proven end to end. Report anything that breaks.

Run the commands below from ~/turbopanel (or use the full path ~/turbopanel/dev/scripts/setup.sh). The manual alternative, cloning dev yourself, is under By Hand.

Two commands help later:

Terminal
~/turbopanel/dev/scripts/setup.sh doctor   # read-only checks: tools, login, remotes, hooks, mode
~/turbopanel/dev/scripts/setup.sh status   # one row per repo: branch, ahead/behind upstream, changes

Running the script again is safe, and it turns on the local secret scan (core.hooksPath) where it is unset (by hand: git config core.hooksPath .githooks). It skips repos that exist, fast-forwards a clean trunk, and never resets or stashes your work.

By Hand

Clone dev yourself and run the setup script:

Terminal
mkdir -p ~/turbopanel && cd ~/turbopanel
git clone https://github.com/TurboPanel/dev.git
./dev/scripts/setup.sh

Or do everything with the GitHub CLI, forking each repo yourself:

Terminal
mkdir -p ~/turbopanel && cd ~/turbopanel
gh auth login
for repo in dev turbopanel turbopaneld ui website; do
  gh repo fork "TurboPanel/$repo" --clone
done

Run the loop inside the turbopanel folder (any folder named turbopanel works), because the tools expect ~/turbopanel/<repo>. Run git config core.hooksPath .githooks in each clone to enable the local secret scan.

With the fork loop, each clone has origin (your fork) and upstream (TurboPanel). Only dev, turbopanel, turbopaneld, ui and website are required to boot the environment; .github is optional, and you do not need to fork it unless you change it (gh repo clone TurboPanel/.github is enough to read it). Then continue with vagrant up or turbopanel/dev/console as described in Local Development.

Make a Change and Open a Pull Request

Work on a topic branch cut from the project's current trunk. Never commit to your fork's trunk. The commands below assume the repo is already forked (~/turbopanel/dev/scripts/setup.sh fork <repo>, or the manual fork under By Hand), so upstream exists. With a read-only clone, origin is TurboPanel and there is no upstream: fork before the push step. Maintainers who push to TurboPanel directly use origin where these commands say upstream.

Terminal
cd turbopanel/ui                 # the repo you are changing
git fetch upstream
git switch -c fix-label-casing upstream/trunk
# edit src/lib/labels.ts, then format it (see below for where)
git add src/lib/labels.ts
git commit -m "fix(labels): use title case for the server tab"
git push -u origin fix-label-casing
gh pr create --repo TurboPanel/ui --base trunk --fill

Rules that apply to every pull request:

  • The title is type(scope): summary, for example fix(auth): refuse expired invites. The types are feat, fix, chore, ci, docs, refactor, test, perf, build, revert and style.
  • Format every source file you change before you commit, where the tools are: inside the guest under Vagrant, or in the repo on the Debian machine under Direct (after dev/console has installed the runtimes). A fresh vagrant ssh shell does not have the vendored Node and Deno on its PATH, so add them first (example for a file in ui):
Terminal
vagrant ssh
export PATH="/opt/turbopanel/vendor/node/current/bin:/opt/turbopanel/vendor/deno/current:$PATH"
cd ~/turbopanel/ui
pnpm exec prettier --write src/lib/labels.ts
pnpm exec prettier --check src/lib/labels.ts

The control plane, ui, website and dev use Prettier; the daemon uses deno fmt and deno lint. The host usually has no Node or Deno, so do not format there. CI rejects an unformatted changed source file, so a miss costs a re-push. Documentation pages (.md and .mdx) are not checked by the formatter.

  • Read the agreement linked from the pull request template (see Signing and the CLA) and leave Allow edits from maintainers on.
  • Do not change version numbers, and never commit secrets or .env files.
  • A change that needs both the control plane and the daemon is two pull requests: read Twin Pull Requests.

To catch up with the project later, run gh repo sync in your fork or git fetch upstream, then rebase your topic branch on upstream/trunk.

What to Expect

A maintainer must approve your checks. For pull requests from forks, GitHub holds every workflow run until a maintainer clicks Approve workflows to run. This applies to each new push, including from people who have had pull requests merged. Your checks show Waiting for approval until then. There is no promised time, and the wait is usually the longest part of a small change. If a day or two passes, leave a short comment on the pull request or ask in Discord. A run that waits more than 30 days is marked failed; push again or ask for a new run.

The hosted code scanner does not run on pull requests from forks. It needs a secret token that GitHub withholds from fork runs. Its steps are skipped on purpose, and a skipped step is not a failure: the other checks, including the aggregate ci-ok check, can still go green. A visible note explaining this may be added to the run summary; either way, seeing those steps skipped is expected. When a scanner result is needed, a maintainer can push your branch into the project and run it there.

Review. Opening a pull request proposes a change; it does not oblige anyone to merge it as written. A maintainer may ask for changes, suggest edits inline, ask for a restructure, or push commits to your branch when you allowed edits. Conversations must be resolved before merge. Merges are squash merges, so your branch history does not need to be tidy.

Checks that must pass: ci-ok in every code repository, and a hosted secret-scan check in the four product repositories (turbopanel, turbopaneld, ui, website). The pr-title check is advisory but easy to keep green.

What Maintainers Do Differently

Maintainers with push access work from the project repositories on feature branches by default, which gives same-named branches across repositories for twin pull requests. Add --as-contributor to the setup script to try the contributor path: you get read-only clones, as an outside contributor does, and fork a repo with setup.sh fork <repo> when you are ready to push.

Edit on GitHub

Last updated on

On this page