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

# Posit Workbench

> Build a Domino Compute Environment from the Posit Workbench base image and launch Workspace sessions in the Positron IDE.

To use Posit Workbench, including the Positron IDE, in a Domino Workspace, configure a Compute Environment built on a Posit Workbench base image. If your administrators have already configured such an Environment, set your Project to use that Environment.

## Environment setup

If a Posit Workbench Environment does not already exist in your Domino deployment, create one. Read about [Environment management](/6.3/platform-capabilities/core-concepts/compute-environments/manage-compute-environments) if you aren't already familiar.

### Choose a base image

When you create the Environment, use `quay.io/domino/field:rstudio-workbench` as the base image.

### Edit the Dockerfile

Add the following lines to the **Dockerfile Instructions**. They validate that the base image meets the [pre-requisites for automatic custom image compatibility](/6.3/platform-capabilities/core-concepts/compute-environments/use-external-images/automatic-custom-image-compatibility), prepare `/opt/domino` for Domino executions, set the password for the `domino` user, create a startup script that waits for Posit Workbench and tails its logs, and configure Posit Workbench to run sessions as the `domino` user.

```dockerfile theme={null}
# System-level dependency injection runs as root
USER root:root

# Validate base image pre-requisites
RUN /opt/domino/bin/pre-check.sh

# Configure /opt/domino to prepare for Domino executions
RUN /opt/domino/bin/init.sh

# Validate the environment
RUN /opt/domino/bin/validate.sh

# Set the password for the domino user
RUN echo 'domino:domino' | chpasswd

# Create a startup script that waits for Posit Workbench and tails its logs
COPY <<'EOF' /opt/domino/bin/posit-monitor.sh
#!/bin/bash
# /opt/domino/bin/posit-monitor.sh

# Wait for Posit Workbench to start
while ! pgrep -f "rserver|rstudio-server" > /dev/null; do
    echo "Waiting for Posit Workbench to start..."
    sleep 2
done

echo "Posit Workbench started. Tailing logs..."

# Tail the Posit Workbench logs (adjust the path as needed)
tail -f /var/log/rstudio/rstudio-server/*.log 2>/dev/null || \
tail -f /var/lib/rstudio-server/monitor/log/* 2>/dev/null || \
    # Fallback: just monitor the process
    while pgrep -f "rserver|rstudio-server" > /dev/null; do sleep 5; done
EOF
RUN chmod +x /opt/domino/bin/posit-monitor.sh

# Configure RStudio Server to run sessions as the domino user
RUN echo "server-user=domino" >> /etc/rstudio/rserver.conf

# Modify the existing launcher.conf to use domino as the admin group
RUN sed -i 's/^admin-group=.*/admin-group=domino/' /etc/rstudio/launcher.conf || \
    echo "admin-group=domino" >> /etc/rstudio/launcher.conf
```

### Add the pluggable Workspace tool

Enter the following in the **Pluggable Workspace Tools** field of the Environment definition:

```yaml theme={null}
posit_workbench:
  title: "Posit"
  iconUrl: "https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Posit_logo.svg/960px-Posit_logo.svg.png"
  start: [ "/opt/domino/bin/posit-monitor.sh" ]
  httpProxy:
    port: 8787
    requireSubdomain: false
```

## Use Positron in a Workspace

<Steps>
  <Step title="Launch a Workspace">
    [Launch a Workspace](/6.3/platform-capabilities/core-concepts/workspaces/launch-a-workspace) that uses the Environment and select **Posit** as the IDE. Log in with the username `domino` and the password `domino`. The Dockerfile instructions above set this password. Posit Workbench opens to the **Projects** view.

    <Frame>
      <img src="https://mintcdn.com/dominodatalab-e871cec4/lAWfrRR1dZlSv7oc/images/environments/posit-workbench-projects.png?fit=max&auto=format&n=lAWfrRR1dZlSv7oc&q=85&s=d75b1b2cb48bca0cd6cd2878abf8956d" alt="Posit Workbench Projects view with the New Session button." width="1914" height="671" data-path="images/environments/posit-workbench-projects.png" />
    </Frame>
  </Step>

  <Step title="Create a session">
    Select **New Session**, choose **Positron Pro**, and select **Launch**.

    <Frame>
      <img src="https://mintcdn.com/dominodatalab-e871cec4/lAWfrRR1dZlSv7oc/images/environments/posit-workbench-new-session.png?fit=max&auto=format&n=lAWfrRR1dZlSv7oc&q=85&s=f52d4b5810e04c85c6e0cee0aa2eec32" alt="New Session dialog in Posit Workbench with Positron Pro selected." width="1914" height="671" data-path="images/environments/posit-workbench-new-session.png" />
    </Frame>
  </Step>

  <Step title="Start working">
    When the session starts, the Positron IDE opens.

    <Frame>
      <img src="https://mintcdn.com/dominodatalab-e871cec4/lAWfrRR1dZlSv7oc/images/environments/positron-ide.png?fit=max&auto=format&n=lAWfrRR1dZlSv7oc&q=85&s=26199231bb0d2a07f9bbf08c2e2f31de" alt="Positron IDE running in Posit Workbench with an R console started." width="1914" height="872" data-path="images/environments/positron-ide.png" />
    </Frame>
  </Step>
</Steps>


## Related topics

- [Use external images in Domino Environments](/6.3/platform-capabilities/core-concepts/compute-environments/use-external-images/index.md)
- [Set up Posit Package Manager integration](/6.3/admin/platform-configuration/manage-compute-environments/configure-ppm-server.md)
- [Use Posit Package Manager in a workspace](/6.3/platform-capabilities/core-concepts/workspaces/use-posit-package-manager.md)
- [Get summary for workbench model versions](/6.3/api-reference/model-monitoring-models/get-summary-for-workbench-model-versions.md)
