# Stacks

> For the complete documentation index, see [llms.txt](https://docs.ringleader.dev/llms.txt).


> A stack is a ready-made workstation for one kind of work, with the tools a developer expects and your coding agent already installed.


A stack is a ready-made workstation for one kind of work, with the tools a developer
expects and your coding agent already installed. Each stack has one file for each agent in
our public
[examples repository](https://github.com/ringleader-dev/ringleader-examples/tree/main/stacks).
You apply a file straight from its URL, and it runs on your own computer with no account
needed.

## Stack files

A stack file is an ordinary workstation file, applied as
[workstation basics](https://docs.ringleader.dev/workstations/basics/) describes. The files in one
stack differ only in the agent they install, the workstation's name and its `agent` label.
Some stacks also have a separate file that attaches to every workstation with a given label,
so several stacks can share one set of additions.

## Change a stack

To change a stack, fork the
[examples repository](https://github.com/ringleader-dev/ringleader-examples), or copy one
file, and edit it. These pages show the lines to add:

- To add a curated tool, such as `docker` or `python`, follow
  [Install a devtool](https://docs.ringleader.dev/workstations/packages-tools-settings/devtools-tool-configuration/#install-a-devtool).
- To add an operating system package or an npm package, follow
  [Add a package](https://docs.ringleader.dev/workstations/packages-tools-settings/package-installation/#add-a-package).
- To have each new workstation clone your project, follow
  [Clone a repository onto a workstation](https://docs.ringleader.dev/workstations/packages-tools-settings/code-dotfiles-trusted-folders/#clone-a-repository-onto-a-workstation).
  `rl code` then opens that folder without `--path`.

A source clones once. A private HTTPS source needs
`credentialRef: {name: github-pat, key: token}`, and an SSH URL uses the forwarded key.

Then apply your copy from its own raw URL, and give that URL to your team so everyone gets
the same workstation. A second way to add things is a separate file that attaches to every workstation with a
label. Several stacks can then share one set of additions.

## Run a stack in a cloud

These files run on your own computer, with no cloud account needed. To run the same stack in
a cloud, change three things in your copy:

1. Add the label your organization uses to choose its cloud account, such as `cloud: gcp`.
2. Add `requirements: ["provider:gcp"]` to the `Workstation`, or `aws` or `azure`.
3. Replace `providerConfig` with the cloud's own sizing.

<div class="callout callout-warning">
  <p class="callout-title">A running cloud workstation costs money</p>
  <div class="callout-body">
    Add an idle policy, as
<a href="https://docs.ringleader.dev/workstations/lifecycle/starts-stops-restarts/#stop-a-workstation-when-its-idle">Stop a workstation when it&rsquo;s idle</a>
shows, so the workstation stops when nobody is using it.
  </div>
</div>


The
[dltHub GCP example](https://github.com/ringleader-dev/ringleader-examples/blob/main/with/dlthub/dlt-box-gcp.yaml)
makes these changes, and [Cloud accounts](https://docs.ringleader.dev/cloud-accounts/) covers
connecting your cloud account, once per organization.

If you add an `egress` block, a `host` destination needs an Edge on any cloud. So does a `host`
deny entry, and on AWS so does any deny entry. `rl apply` rejects a `strict` or `open` workstation
if your namespace declares none.
[Enforcement by provider](https://docs.ringleader.dev/security/outbound/enforcement/#enforcement-by-provider)
says which provider needs what.

## Next steps

- [Create a front-end workstation](https://docs.ringleader.dev/guides/create-front-end-workstation/) applies the front-end stack.
- [Package installation](https://docs.ringleader.dev/workstations/packages-tools-settings/package-installation/) and
  [devtools and tool configuration](https://docs.ringleader.dev/workstations/packages-tools-settings/devtools-tool-configuration/)
  cover the lines you add to change a stack.

