> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orchestrahq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Compile papers on your computer

> On Orchestra Local, a research workspace's papers compile on your own computer, inside a sandbox. What each of macOS, Linux and Windows needs, and how to fix the one thing Ubuntu 24.04 blocks.

In a research workspace on Orchestra Local, Compile runs TeX on your own
computer. In a hosted workspace, papers compile in Orchestra's cloud, and
there is nothing to set up.

Orchestra installs TeX Live 2025 for you the first time a research workspace
is on the computer: a small install first (a few hundred MB), then the rest of
TeX Live in the background. A package a paper needs that is not there yet is
added the first time a compile asks for it. Every member of a lab compiles
with the same TeX Live 2025, so a PDF made on a Mac matches one made on Linux
or Windows.

## The sandbox

A paper's `.tex` files are code your co-authors wrote, and TeX runs them on
your computer. So each compile runs inside the operating system's own
sandbox: TeX may read only its own files and the paper, may write only in the
paper's compile folder, may start only TeX and the programs TeX needs, and
has no network. Your home folder, your other files and your keys stay out of
its reach.

What that needs differs by operating system.

## macOS

Nothing. The sandbox is built into macOS.

## Linux

Compiling uses [bubblewrap](https://github.com/containers/bubblewrap). Install
it with your package manager:

```bash theme={null}
sudo apt install bubblewrap      # Debian, Ubuntu
sudo dnf install bubblewrap      # Fedora, RHEL
```

### Ubuntu 24.04 and later

Ubuntu 24.04 limits the sandboxes programs may make for themselves (its
`kernel.apparmor_restrict_unprivileged_userns` setting), so bubblewrap is
installed but cannot make one. Compile then says so, and nothing runs.

To allow bubblewrap, and nothing else, give it an AppArmor profile. This
needs an administrator once per computer:

```bash theme={null}
sudo tee /etc/apparmor.d/bwrap >/dev/null <<'EOF'
abi <abi/4.0>,
include <tunables/global>

profile bwrap /usr/bin/bwrap flags=(unconfined) {
  userns,

  include if exists <local/bwrap>
}
EOF
sudo apparmor_parser -r /etc/apparmor.d/bwrap
```

Compile again within a minute and it works. Nothing needs a restart. This is
the same kind of profile Ubuntu itself ships for programs that sandbox
themselves, such as browsers and Flatpak. It does not turn the setting off
for anything else on the computer.

## Windows

Compiling runs TeX inside WSL 2, in the same bubblewrap sandbox as Linux, with
your Windows drives hidden from it. Orchestra installs TeX Live inside WSL,
not on Windows itself.

1. Install WSL 2, if it is not there yet. In a terminal opened as
   administrator, run `wsl --install`, then restart.
2. Inside WSL, install bubblewrap: `sudo apt install bubblewrap`.

Compile says which of these is missing, if one is.

## When Compile says it cannot run

| Compile says | What to do |
| - | - |
| TeX Live 2025 is not on this computer yet | Orchestra is still installing it. Compile again in a few minutes, or install TeX Live 2025 or MacTeX 2025 yourself. |
| Compiling papers on Linux needs bubblewrap. Install the bwrap package | Install the `bubblewrap` package, as above. |
| Compiling papers on Linux needs bubblewrap to make its sandbox, and this computer does not let it | Add the AppArmor profile in [Ubuntu 24.04 and later](#ubuntu-24-04-and-later). |
| Compiling papers on Windows needs WSL | Follow step 1 of the [Windows](#windows) steps. |
| Compiling papers on Windows needs bubblewrap inside WSL | Follow step 2 of the [Windows](#windows) steps. |

Until a compile can run, you can still write, review and comment on the paper,
and download its source to compile elsewhere.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.