### Verify Posit Workbench Installation Command Source: https://docs.posit.co/ide/server-pro/2023.06.2/getting_started/accessing_the_server This command-line snippet shows how to run a diagnostic tool to verify the installation of Posit Workbench. It tests the server's ability to start, run, and connect to an RStudio Pro session, ensuring basic functionality. ```Shell sudo rstudio-server verify-installation ``` -------------------------------- ### Verifying Posit Workbench Installation Source: https://docs.posit.co/ide/server-pro/2023.06.1/getting_started/accessing_the_server This command is used to diagnose issues with a Posit Workbench installation. It starts the server, runs, and connects to an RStudio Pro session to test the correct installation and connectivity to a local R version. Note that it does not test networking or authentication problems. ```Shell $ sudo rstudio-server verify-installation ``` -------------------------------- ### Install, Activate, and Start Posit Workbench License Server on Linux Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/license_management/floating_licensing These commands are used to install the Posit Workbench License Server from a Debian package, activate it with a provided product key, and then start the license server service on a Linux system. The `dpkg` command handles package installation, `rsp-license-server activate` registers the license, and `rsp-license-server start` initiates the server. ```bash sudo dpkg -i rsp-license-server-1.1.2-x86_64.deb sudo rsp-license-server activate sudo rsp-license-server start ``` -------------------------------- ### Example Output of Successful Posit Workbench Verification Source: https://docs.posit.co/ide/server-pro/2024.04.0/job_launcher/troubleshooting/verify-installation This snippet shows the expected output from a successful `verify-installation` command. It details the checks performed on Job Launcher configuration, cluster usage, and the lifecycle of launched R session and ad-hoc jobs, confirming proper setup and functionality. ```text Checking Job Launcher configuration... Ensuring server-user is a Job Launcher admin... Getting list of Job Launcher clusters... Job launcher configured with the following clusters: Kubernetes, Local launcher-adhoc-clusters is empty - all clusters may be used to launch adhoc jobs launcher-sessions-clusters is empty - all clusters may be used to launch session jobs 02 May 2020 05:29:35 [rserver] WARNING Project sharing is currently not supported when running launcher sessions. It has automatically been disabled for session 4d4356ec67e7babe88f4a; LOGGED FROM: void rstudio::server::job_launcher::setProfile(const string&, const string&, const string&, const string&, bool, rstudio::core::r_util::SessionLaunchProfile*) /var/lib/jenkins/workspace/IDE/pro-pipeline/v1.2-patch/src/cpp/server/ServerJobLauncher.cpp:107 Launched R session job for cluster Kubernetes and image rstudio/r-session-complete:jammy- Waiting for job to run... Job transitioned to status Pending Job transitioned to status Pending with status message: Created pod: session-4d4356ec67e7babe88f4a-rstudio---session-test-job-xkbfw2 Job transitioned to status Pending with status message: Successfully assigned rstudio/session-4d4356ec67e7babe88f4a-rstudio---session-test-job-xkbfw2 to ip-172-31-30-139.us-east-2.compute.internal Job transitioned to status Pending with status message: containers with unready status: [50506d5573575359475966796a636c2b3342333574413d3d] Job transitioned to status Pending with status message: Container image "rstudio/r-session-complete:jammy-" already present on machine Job transitioned to status Pending with status message: Created container 50506d5573575359475966796a636c2b3342333574413d3d Job transitioned to status Pending with status message: Started container 50506d55735753594759667966796a636c2b3342333574413d3d Job is running Waiting for job to finish... Job has finished running Job exited successfully 02 May 2020 05:29:40 [rserver] WARNING Project sharing is currently not supported when running launcher sessions. It has automatically been disabled for session 4d4356ec67e7b2e24a23f; LOGGED FROM: void rstudio::server::job_launcher::setProfile(const string&, const string&, const string&, const string&, bool, rstudio::core::r_util::SessionLaunchProfile*) /var/lib/jenkins/workspace/IDE/pro-pipeline/v1.2-patch/src/cpp/server/ServerJobLauncher.cpp:1070 Launched R session job for cluster Local Waiting for job to run... Job transitioned to status Pending Job is running Waiting for job to finish... Job has finished running Job exited successfully Launched adhoc job for cluster Kubernetes and image rstudio/r-session-complete:jammy- Waiting for job to run... Job transitioned to status Pending Job transitioned to status Pending with status message: Created pod: adhoc-test-job-lz77v-s85b6 Job transitioned to status Pending Job transitioned to status Pending with status message: Successfully assigned rstudio/adhoc-test-job-lz77v-s85b6 to ip-172-31-30-139.us-east-2.compute.internal Job transitioned to status Pending with status message: containers with unready status: [4d74786b6474446a546d51476a6b657843335a444b513d3d] Job transitioned to status Pending with status message: Container image "rstudio/r-session-complete:jammy-" already present on machine Job transitioned to status Pending with status message: Created container 4d74786b6474446a546d51476a6b657843335a444b513d3d Job transitioned to status Pending with status message: Started container 4d74786b6474446a546d51476a6b657843335a444b513d3d Job has finished running Job exited successfully Launched adhoc job for cluster Local Waiting for job to run... ``` -------------------------------- ### Configure Resource Profiles for Posit Workbench Source: https://docs.posit.co/ide/server-pro/2023.09.1/getting_started/installation/kubernetes_installation This example demonstrates how to set up named resource profiles (e.g., 'small', 'medium', 'large') with predefined CPU and memory allocations in Posit Workbench. These profiles, specified under `config.server.launcher.kubernetes.resources.conf` in `values.yaml`, simplify resource assignment by allowing users to select from a list of pre-configured options. ```yaml config: server: launcher.kubernetes.resources.conf: "small": cpus: "1.0" mem-mb: "512" "medium": cpus: "2.0" mem-mb: "4096" "large": cpus: "3.0" mem-mb: "8192" ``` -------------------------------- ### Install Posit Workbench on Ubuntu/Debian Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/getting_started/installation/installation Commands to install `gdebi-core`, download the Posit Workbench DEB package, and install it on Ubuntu or Debian systems using `gdebi`. ```bash sudo apt-get install gdebi-core curl -O https://download2.rstudio.org/server/jammy/amd64/rstudio-workbench-2025.05.1-amd64.deb sudo gdebi rstudio-workbench-2025.05.1-amd64.deb ``` ```bash sudo apt-get install gdebi-core curl -O https://download2.rstudio.org/server/focal/amd64/rstudio-workbench-2025.05.1-amd64.deb sudo gdebi rstudio-workbench-2025.05.1-amd64.deb ``` -------------------------------- ### Examples of Automatically Detected R Installation Paths Source: https://docs.posit.co/ide/server-pro/2024.09.0/r/installing_r These examples illustrate how specific R version installations within the scanned /opt subdirectories are automatically detected by Posit Workbench. ```Text /opt/R/4.2.2 /opt/R/4.3.0 /opt/local/R/4.2.2 /opt/local/R/4.3.0 ``` -------------------------------- ### Download and Install Posit Workbench on RHEL/SUSE Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/getting_started/installation/installation Commands to download the Posit Workbench RPM package and install it on RHEL 9, RHEL 8, or SUSE/openSUSE systems using `yum` or `zypper`. ```bash curl -O https://download2.rstudio.org/server/rhel9/x86_64/rstudio-workbench-rhel-2025.05.1-x86_64.rpm sudo yum install rstudio-workbench-rhel-2025.05.1-x86_64.rpm ``` ```bash curl -O https://download2.rstudio.org/server/rhel8/x86_64/rstudio-workbench-rhel-2025.05.1-x86_64.rpm sudo yum install rstudio-workbench-rhel-2025.05.1-x86_64.rpm ``` ```bash curl -O https://download2.rstudio.org/server/opensuse15/x86_64/rstudio-workbench-2025.05.1-x86_64.rpm sudo zypper install rstudio-workbench-2025.05.1-x86_64.rpm ``` -------------------------------- ### Examples of Automatically Detected R Versions by Posit Workbench Source: https://docs.posit.co/ide/server-pro/2023.09.1/r/installing_r These examples illustrate how specific R versions, when installed within the recommended base directories (e.g., `/opt/R`), are automatically detected by Posit Workbench. This simplifies the management of multiple R environments. ```Text /opt/R/4.2.2 /opt/R/4.3.0 /opt/local/R/4.2.2 /opt/local/R/4.3.0 ``` -------------------------------- ### Recommended R Installation Directories for Posit Workbench Source: https://docs.posit.co/ide/server-pro/2024.09.1/r/installing_r Posit Workbench automatically scans for R installations in a set of predefined directories and their subdirectories. This snippet lists the primary locations and examples of how R versions within these paths are detected. ```Configuration /usr/lib/R /usr/lib64/R /usr/local/lib/R /usr/local/lib64/R /opt/local/lib/R /opt/local/lib64/R /opt/R /opt/local/R /opt/R/4.2.2 /opt/R/4.3.0 /opt/local/R/4.2.2 /opt/local/R/4.3.0 ``` -------------------------------- ### Download and Install Posit Workbench 2023.09.1 Source: https://docs.posit.co/ide/server-pro/2023.09.1/getting_started/installation/installation Commands to download the Posit Workbench 2023.09.1 RPM or DEB package and install it using the appropriate package manager for various Linux distributions. This process requires root privileges. ```shell $ curl -O https://download2.rstudio.org/server/rhel9/x86_64/rstudio-workbench-rhel-2023.09.1-x86_64.rpm $ sudo yum install rstudio-workbench-rhel-2023.09.1-x86_64.rpm ``` ```shell $ curl -O https://download2.rstudio.org/server/rhel8/x86_64/rstudio-workbench-rhel-2023.09.1-x86_64.rpm $ sudo yum install rstudio-workbench-rhel-2023.09.1-x86_64.rpm ``` ```shell $ curl -O https://download2.rstudio.org/server/centos7/x86_64/rstudio-workbench-rhel-2023.09.1-x86_64.rpm $ sudo yum install rstudio-workbench-rhel-2023.09.1-x86_64.rpm ``` ```shell $ sudo apt-get install gdebi-core $ curl -O https://download2.rstudio.org/server/jammy/amd64/rstudio-workbench-2023.09.1-amd64.deb $ sudo gdebi rstudio-workbench-2023.09.1-amd64.deb ``` ```shell $ sudo apt-get install gdebi-core $ curl -O https://download2.rstudio.org/server/focal/amd64/rstudio-workbench-2023.09.1-amd64.deb $ sudo gdebi rstudio-workbench-2023.09.1-amd64.deb ``` ```shell $ curl -O https://download2.rstudio.org/server/opensuse15/x86_64/rstudio-workbench-2023.09.1-x86_64.rpm $ sudo zypper install rstudio-workbench-2023.09.1-x86_64.rpm ``` -------------------------------- ### Serve Tutorial API Example Page with Python Source: https://docs.posit.co/ide/server-pro/2023.09.1/tutorial_api/configuration To run the Tutorial API example page, you need a web server to serve the content from the '/usr/lib/rstudio-server/extras/tutorial' directory. These commands demonstrate how to quickly set up a simple HTTP server using Python 2 or Python 3, making the demo.htm file accessible via a web browser. ```python python2 -m SimpleHTTPServer 8080 ``` ```python python3 -m http.server 8080 ``` -------------------------------- ### Serve Example Web Page with Python Source: https://docs.posit.co/ide/server-pro/2024.09.0/tutorial_api/configuration Demonstrates how to serve the example tutorial page located at `/usr/lib/rstudio-server/extras/tutorial` using Python's built-in HTTP server modules. This allows access to the `demo.htm` file via a web browser. ```python python2 -m SimpleHTTPServer 8080 ``` ```python python3 -m http.server 8080 ``` -------------------------------- ### Serve the Tutorial API Example Page Source: https://docs.posit.co/ide/server-pro/admin/tutorial_api/configuration Commands to serve the Tutorial API example page using Python's built-in HTTP server modules. This allows local testing and interaction with the configured Workbench instance. ```Python python2 -m SimpleHTTPServer 8080 ``` ```Python python3 -m http.server 8080 ``` -------------------------------- ### Install ggplot2 R Package Source: https://docs.posit.co/ide/user/2025.05.1/ide/get-started/index This R command installs the 'ggplot2' package from the Comprehensive R Archive Network (CRAN). It downloads and installs the package and its dependencies, making it available for use in R. This command typically only needs to be run once per R installation. ```R install.packages("ggplot2") ``` -------------------------------- ### Install R Package: ggplot2 Source: https://docs.posit.co/ide/user/ide/get-started/index This R command installs the `ggplot2` package from CRAN. Package installation is typically a one-time process per R environment, making the package available for use in future sessions. ```R install.packages("ggplot2") ``` -------------------------------- ### Serve Example Page with Python SimpleHTTPServer Source: https://docs.posit.co/ide/server-pro/2023.03.1/tutorial_api/configuration Instructions to serve the example tutorial page using Python's built-in HTTP server modules. This allows loading the demo.htm page in a web browser for testing the Tutorial API. ```Python python2 -m SimpleHTTPServer 8080 ``` ```Python python3 -m http.server 8080 ``` -------------------------------- ### Serve Example Page using Python Simple HTTP Server Source: https://docs.posit.co/ide/server-pro/2024.09.1/tutorial_api/configuration This command demonstrates how to serve the `/usr/lib/rstudio-server/extras/tutorial` folder using Python's built-in HTTP server modules. It provides examples for both Python 2 and Python 3 to quickly host static content on port 8080 for local testing. ```Shell python2 -m SimpleHTTPServer 8080 ``` ```Shell python3 -m http.server 8080 ``` -------------------------------- ### Install, Activate, and Start Posit Workbench License Server on Linux Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/license_management/license_management Provides the sequence of commands to install the Posit Workbench License Server from a Debian package, activate it using a provided product key, and then start the license server service on a Linux system. This setup enables floating license distribution. ```bash sudo dpkg -i rsp-license-server-1.1.2-x86_64.deb sudo rsp-license-server activate sudo rsp-license-server start ``` -------------------------------- ### Serve Example Page with Python SimpleHTTPServer Source: https://docs.posit.co/ide/server-pro/2023.06.2/tutorial_api/configuration These commands demonstrate how to serve the Posit Workbench Tutorial API example page using Python's built-in HTTP server modules. This allows local access to the `demo.htm` file for testing and development purposes. ```python python2 -m SimpleHTTPServer 8080 ``` ```python python3 -m http.server 8080 ``` -------------------------------- ### Install VS Code Extension from Open VSX Marketplace Source: https://docs.posit.co/ide/server-pro/2023.06.1/vscode_sessions/installation This snippet illustrates how to install a VS Code extension directly from the Open VSX marketplace using its publisher and extension name. It provides both a generic command structure and a specific example for installing the Python extension, demonstrating the use of the `--extensions-dir` argument for global installations. ```bash code-server --extensions-dir --install-extension . ``` ```bash /usr/lib/rstudio-server/bin/code-server/bin/code-server --extensions-dir=/opt/code-server/extensions --install-extension ms-python.python ``` -------------------------------- ### Example Positron Pro Configuration File Source: https://docs.posit.co/ide/server-pro/admin/positron_sessions/configuration An example of a `positron.conf` file demonstrating how to enable Positron Pro sessions, specify the executable path, and set a default session cluster. ```Configuration # /etc/rstudio/positron.conf exe=/usr/lib/rstudio-server/bin/positron-server/bin/positron-server enabled=1 default-session-cluster=Kubernetes ``` -------------------------------- ### Install RStudio Addin Examples Package Source: https://docs.posit.co/ide/user/2025.05.1/ide/guide/productivity/add-ins This R code snippet demonstrates how to install the 'addinexamples' package from GitHub, which provides example RStudio addins. It uses the 'devtools' package for installation, ensuring that the addins become available within RStudio. ```R # if necessary: install.packages("devtools") devtools::install_github("rstudio/addinexamples", type = "source") ``` -------------------------------- ### Serve Tutorial Example Page Locally Source: https://docs.posit.co/ide/server-pro/2023.06.1/tutorial_api/configuration These commands demonstrate how to serve the Posit Workbench Tutorial API example page using Python's built-in HTTP server. This is useful for local development and testing of the integration. ```bash python2 -m SimpleHTTPServer 8080 ``` ```bash python3 -m http.server 8080 ``` -------------------------------- ### Serve Example Tutorial Page with Python HTTP Server Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/tutorial_api/configuration This snippet demonstrates how to serve the example tutorial page located at `/usr/lib/rstudio-server/extras/tutorial` using Python's built-in simple HTTP server. It provides commands for both Python 2 and Python 3 to host the content on port 8080, allowing access via a web browser. ```Python python2 -m SimpleHTTPServer 8080 ``` ```Python python3 -m http.server 8080 ``` -------------------------------- ### Install RStudio Addin Examples Package Source: https://docs.posit.co/ide/user/ide/guide/productivity/add-ins Instructions for installing the `addinexamples` package from GitHub, which provides example RStudio addins. This package demonstrates basic addin functionalities and requires the `devtools` package for installation from GitHub. ```R # if necessary: install.packages("devtools") devtools::install_github("rstudio/addinexamples", type = "source") ``` -------------------------------- ### Example Positron Pro Configuration File Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/positron_sessions/configuration This snippet provides an example of a `positron.conf` file, demonstrating how to set the executable path, enable Positron Pro sessions, and specify a default session cluster. ```Configuration File # /etc/rstudio/positron.conf exe=/usr/lib/rstudio-server/bin/positron-server/bin/positron-server enabled=1 default-session-cluster=Kubernetes ``` -------------------------------- ### Enable Tutorial API Calls from Host Page Source: https://docs.posit.co/ide/server-pro/2024.09.0/tutorial_api/configuration This setting enables the Tutorial APIs to be called directly from the hosting page. It is a necessary step to allow the example page or any other host application to interact with the Workbench's Tutorial API functionality. ```Configuration /etc/rstudio/rsession.conf tutorial-api-enabled=1 ``` -------------------------------- ### Verify Workbench Cluster Nodes Source: https://docs.posit.co/ide/server-pro/2023.09.1/getting_started/installation/multi_server_installation This command is used to verify that Posit Workbench is aware of all the nodes configured in the cluster. It helps confirm that the load-balancing setup has correctly registered all participating Workbench instances. ```bash sudo rstudio-server list-nodes ``` -------------------------------- ### Serve Posit Workbench Tutorial API Example Page with Python Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/tutorial_api/configuration These commands demonstrate how to quickly serve the Posit Workbench Tutorial API example page using Python's built-in HTTP server modules. This allows you to access the demo page in a web browser for testing and experimentation. ```Python python2 -m SimpleHTTPServer 8080 ``` ```Python python3 -m http.server 8080 ``` -------------------------------- ### Posit Workbench VS Code Configuration and Extension Management Commands Source: https://docs.posit.co/ide/server-pro/2023.06.1/vscode_sessions/installation This section details the primary commands for managing VS Code integration with Posit Workbench. It covers regenerating the configuration file, setting a global extensions directory, and installing the Posit Workbench VS Code extension. These commands are crucial for initial setup, upgrades, and centralized extension management. ```APIDOC rstudio-server configure-vs-code [options] - Description: Regenerates or configures the `/etc/rstudio/vscode.conf` file for VS Code session support. - Parameters: - --extensions-dir=: (Optional) Specifies a global directory for VS Code extensions. If provided, the Posit Workbench VS Code extension will be automatically installed here. - Usage: - `sudo rstudio-server configure-vs-code`: Regenerates the config to use bundled components. - `sudo rstudio-server configure-vs-code --extensions-dir=/opt/code-server/extensions`: Sets a global extensions directory. - Notes: Requires root privileges. Modifies `vscode.conf` to include arguments in the `args` entry for `code-server`. install-vs-code-ext - Description: Installs the latest version of the Posit Workbench VS Code extension. - Usage: Typically run automatically during Posit Workbench upgrades if a global extensions directory is configured. - Notes: May fail with a warning if version requirements are not met. If using a proxy, `HTTPS_PROXY` must be set. ``` -------------------------------- ### Example Posit Workbench rserver.conf Configuration Source: https://docs.posit.co/ide/server-pro/admin/job_launcher/troubleshooting/configuration-files A sample configuration for the `rserver.conf` file, demonstrating how to set the server port, launcher address, port, and various session-related parameters for integration with a Kubernetes environment. ```INI # Server Configuration File www-port=80 # Launcher Config launcher-address=127.0.0.1 launcher-port=5559 launcher-sessions-enabled=1 launcher-default-cluster=Kubernetes launcher-sessions-callback-address=http://rstudio-server-pro:yourcompany.com:80 launcher-sessions-container-run-as-root=0 launcher-sessions-create-container-user=1 launcher-sessions-auto-update=1 ``` -------------------------------- ### Load ggplot2 R Package into Session Source: https://docs.posit.co/ide/user/2025.05.1/ide/get-started/index This R command loads the 'ggplot2' package into the current R session, making all its functions and datasets accessible. It must be executed at the beginning of every new R session where 'ggplot2' functionality is required, after the package has been installed. ```R library(ggplot2) ``` -------------------------------- ### Install JupyterLab Extension Globally via pip Source: https://docs.posit.co/ide/server-pro/2024.04.0/jupyter_sessions/configuration Administrators can install JupyterLab extensions globally for all users using the 'pip install' command. This example demonstrates installing the 'jupyterlab-kernelspy' extension. ```bash pip install jupyterlab-kernelspy ``` -------------------------------- ### Example Posit Job Launcher Configuration File Source: https://docs.posit.co/ide/server-pro/2023.06.2/job_launcher/configuration Provides a complete example of the `launcher.conf` file, demonstrating the `[server]` section for general server settings and a `[cluster]` section for defining a local cluster. It illustrates how to set parameters like address, port, user, and allowed groups for a functional Job Launcher setup. ```Configuration [server] address=127.0.0.1 port=5559 server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 thread-pool-size=4 enable-debug-logging=1 [cluster] name=Local type=Local exe=/usr/lib/rstudio-server/bin/rstudio-local-launcher allowed-groups=devs,admins ``` -------------------------------- ### Verify DNS Resolution and Port Connectivity with Netcat Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/getting_started/installation/kubernetes_installation This `netcat` command is used to verify that the DNS record for `workbench.posit.co` resolves correctly to the Ingress Controller's IP and that port 443 (HTTPS) is reachable. A successful connection confirms that the Ingress setup is functional and accessible. ```bash nc -vz workbench.posit.co 443 ``` -------------------------------- ### Example Posit Workbench launcher.conf Configuration Source: https://docs.posit.co/ide/server-pro/admin/job_launcher/troubleshooting/configuration-files A sample configuration for the `launcher.conf` file, defining server parameters like address, port, user, and administrative group, along with cluster definitions for both local and Kubernetes environments. ```INI [server] address=127.0.0.1 port=5559 server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 thread-pool-size=4 enable-debug-logging=1 [cluster] name=Local type=Local [cluster] name=Kubernetes type=Kubernetes ``` -------------------------------- ### Kubernetes Namespace Setup for Posit Workbench Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/getting_started/installation/kubernetes_installation These commands create a dedicated Kubernetes namespace for Posit Workbench and then switch the current `kubectl` context to use this new namespace. This isolates Workbench resources within the cluster and ensures all subsequent commands operate within the correct scope. ```bash kubectl create namespace posit-workbench kubectl config set-context --current --namespace=posit-workbench ``` -------------------------------- ### Sample Posit Job Launcher Configuration File Source: https://docs.posit.co/ide/server-pro/2024.09.1/job_launcher/configuration An example of a `/etc/rstudio/launcher.conf` file, demonstrating the `[server]` section for general server settings and a `[cluster]` section for defining a local cluster. This configuration includes network settings, user accounts, authorization, and thread pool size. ```Configuration [server] address=127.0.0.1 port=5559 server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 thread-pool-size=4 enable-debug-logging=1 [cluster] name=Local type=Local exe=/usr/lib/rstudio-server/bin/rstudio-local-launcher allowed-groups=devs,admins ``` -------------------------------- ### Example: Install Code Spell Checker Extension via Positron Server Source: https://docs.posit.co/ide/server-pro/admin/positron_sessions/extension_configuration An example demonstrating the installation of the 'Code Spell Checker' extension from Open VSX using `positron-server`. It specifies a global extensions directory at `/opt/positron-server/extensions` and the full extension identifier. ```shell /usr/lib/rstudio-server/bin/positron-server/bin/positron-server --extensions-dir=/opt/positron-server/extensions --install-extension streetsidesoftware.code-spell-checker ``` -------------------------------- ### Example Kubernetes Launcher Profiles Configuration File Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/job_launcher/kubernetes_plugin Illustrates the structure of the `/etc/rstudio/launcher.kubernetes.profiles.conf` file, showing global, group-specific, and user-specific profile settings for resource limits and container image access. This example demonstrates how to set default and maximum CPU/memory, allowed container images, and GPU limits. ```Configuration [*] placement-constraints=node,region:us,region:eu default-cpus=1 default-mem-mb=512 max-cpus=2 max-mem-mb=1024 container-images=r-session:3.4.2,r-session:3.5.0 allow-unknown-images=0 [@rstudio-power-users] default-cpus=4 default-mem-mb=4096 default-nvidia-gpus=0 default-amd-gpus=0 max-nvidia-gpus=2 max-amd-gpus=3 max-cpus=20 max-mem-mb=20480 container-images=r-session:3.4.2,r-session:3.5.0,r-session:preview allow-unknown-images=1 [jsmith] max-cpus=3 ``` -------------------------------- ### Install JupyterLab Extension via pip Source: https://docs.posit.co/ide/server-pro/admin/jupyter_sessions/configuration This command demonstrates how administrators can globally install a JupyterLab extension using the Python package installer, pip. Installing extensions this way makes them available for all users and active sessions after a browser refresh. The example installs the 'jupyterlab-kernelspy' extension. ```python pip install jupyterlab-kernelspy ``` -------------------------------- ### Example RStudio Server Configuration (rserver.conf) Source: https://docs.posit.co/ide/server-pro/2024.09.0/job_launcher/configuration An example configuration file for `rserver.conf` demonstrating how to set up RStudio Server with a Job Launcher, including callback addresses, SSL, and container settings for Kubernetes integration. ```Text launcher-address=localhost launcher-port=5559 launcher-sessions-enabled=1 launcher-default-cluster=Kubernetes # the callback address that launcher sessions will reconnect to rserver on # since our Kubernetes jobs run on a different network segment, this needs # to be the routable IP address of the web server servicing RStudio traffic # (routable from the point of view of any Kubernetes nodes) launcher-sessions-callback-address=http://10.15.44.30:8787 launcher-use-ssl=1 launcher-sessions-container-image=rstudio:R-4.2 launcher-sessions-container-run-as-root=0 launcher-sessions-create-container-user=1 ``` -------------------------------- ### Install Posit Workbench on RHEL 9 Source: https://docs.posit.co/ide/server-pro/2024.04.0/getting_started/installation/installation Commands to download the Posit Workbench RPM package for RHEL 9 and install it using the `yum` package manager. This ensures the correct version of Workbench is installed on RHEL 9 systems. ```bash curl -O https://download2.rstudio.org/server/rhel9/x86_64/rstudio-workbench-rhel-2024.04.0-x86_64.rpm sudo yum install rstudio-workbench-rhel-2024.04.0-x86_64.rpm ``` -------------------------------- ### Example /etc/rstudio/launcher-mounts Configuration Source: https://docs.posit.co/ide/server-pro/2023.03.1/job_launcher/configuration An example configuration for the `/etc/rstudio/launcher-mounts` file, demonstrating how to define multiple mount entries. This example includes a required NFS mount for user home directories and another NFS mount for shared code, specifying different mount types, hosts, paths, and other properties. ```yaml # User home mount - This is REQUIRED for the session to run MountType: NFS Host: nfs01 Path: /home/{USER} MountPath: /home/{USER} ReadOnly: false # Shared code mount Cluster: Kubernetes MountType: NFS Host: nfs01 Path: /dev64 MountPath: /code ReadOnly: false ``` -------------------------------- ### Example /etc/rstudio/launcher-mounts Configuration Source: https://docs.posit.co/ide/server-pro/2023.06.2/job_launcher/configuration An example configuration file for `/etc/rstudio/launcher-mounts` demonstrating how to set up a required NFS home directory mount for users and an additional shared NFS code mount for a Kubernetes cluster. Entries are separated by a blank line. ```YAML # User home mount - This is REQUIRED for the session to run MountType: NFS Host: nfs01 Path: /home/{USER} MountPath: /home/{USER} ReadOnly: false # Shared code mount Cluster: Kubernetes MountType: NFS Host: nfs01 Path: /dev64 MountPath: /code ReadOnly: false ``` -------------------------------- ### Get Traefik Ingress Controller Service External IP Source: https://docs.posit.co/ide/server-pro/2025.05.1/admin/getting_started/installation/kubernetes_installation This `kubectl` command retrieves the details of the Traefik Ingress Controller Service, specifically to obtain its external IP address. This IP is crucial for configuring DNS records to correctly point to the Ingress, allowing external access to the Posit Workbench. ```bash kubectl get svc traefik ``` -------------------------------- ### Test VS Code Extension Installation with code-server Source: https://docs.posit.co/ide/server-pro/2023.09.1/vscode_sessions/installation Command-line example to test the installation of a VS Code extension using the `code-server` executable. This command allows specifying an extension directory and the extension to install, useful for validating `vscode.extensions.conf` entries. ```Shell code-server --extension-dir=/opt/code-server/extensions --install-extension ``` -------------------------------- ### Sample Posit Job Launcher Configuration File Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/job_launcher/configuration Provides an example of the `/etc/rstudio/launcher.conf` file, demonstrating the `[server]` and `[cluster]` sections with essential parameters for a local cluster setup, including network settings, user accounts, and group permissions. ```INI [server] address=127.0.0.1 port=5559 server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 thread-pool-size=4 enable-debug-logging=1 [cluster] name=Local type=Local exe=/usr/lib/rstudio-server/bin/rstudio-local-launcher allowed-groups=devs,admins ``` -------------------------------- ### Install Posit Workbench on Ubuntu 20 / Debian 11 Source: https://docs.posit.co/ide/server-pro/2024.04.0/getting_started/installation/installation Commands to install `gdebi-core`, download the Posit Workbench DEB package for Ubuntu 20 (Focal) or Debian 11, and then install it using `gdebi`. This targets older Debian-based systems. ```bash sudo apt-get install gdebi-core curl -O https://download2.rstudio.org/server/focal/amd64/rstudio-workbench-2024.04.0-amd64.deb sudo gdebi rstudio-workbench-2024.04.0-amd64.deb ``` -------------------------------- ### Examples of Automatically Detected R Versions in Subdirectories Source: https://docs.posit.co/ide/server-pro/admin/r/installing_r These examples illustrate how specific R versions installed within the /opt/R or /opt/local/R parent directories are automatically detected by Posit Workbench. This simplifies the management of multiple R versions for different projects or user requirements. ```Text /opt/R/4.2.2 /opt/R/4.3.0 /opt/local/R/4.2.2 /opt/local/R/4.3.0 ``` -------------------------------- ### Describe Kubernetes Pod Status for Posit Workbench Source: https://docs.posit.co/ide/server-pro/2023.09.1/getting_started/installation/kubernetes_installation Use the `kubectl describe` command to retrieve detailed diagnostic information, including events, for a Posit Workbench pod that is failing to start. This helps identify issues like image pulling problems, container creation failures, or readiness probe failures. ```bash kubectl describe pod -l app.kubernetes.io/name=rstudio-workbench ``` -------------------------------- ### Enable Tutorial API Calls from Host Page Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/tutorial_api/configuration This configuration enables the Tutorial APIs to be called from the hosting page. It requires modifying the `/etc/rstudio/rsession.conf` file to set the `tutorial-api-enabled` option to `1`. ```Config /etc/rstudio/rsession.conf tutorial-api-enabled=1 ``` -------------------------------- ### Start RStudio Server Service Source: https://docs.posit.co/ide/server-pro/2023.06.2/server_management/backup_guide This command initiates the RStudio Server service, making the Posit Workbench accessible. It typically requires superuser privileges to execute. ```Shell sudo rstudio-server start ``` -------------------------------- ### RStudio Launcher Service Status Output Example Source: https://docs.posit.co/ide/server-pro/2024.09.0/job_launcher/troubleshooting/service-status An example of the expected output when checking the status of the `rstudio-launcher.service`. This output confirms the service is 'active (running)', providing details on its loaded configuration, uptime, main process ID, and recent log messages related to bootstrapping Kubernetes and Local plugins, indicating proper operation. ```Log ● rstudio-launcher.service - RStudio Launcher Loaded: loaded (/etc/systemd/system/rstudio-launcher.service; disabled; vendor preset: disabled) Active: active (running) since Fri 2020-05-01 18:16:53 UTC; 2min 7s ago Main PID: 13148 (rstudio-launche) CGroup: /system.slice/rstudio-launcher.service ├─13148 /usr/lib/rstudio-server/bin/rstudio-launcher ├─13161 /usr/lib/rstudio-server/bin/rstudio-kubernetes-launcher --server-user rstudio-server --enable-debug-logging 1 --scratch-path /var/lib/rstu... └─13173 /usr/lib/rstudio-server/bin/rstudio-local-launcher --server-user rstudio-server --enable-debug-logging 1 --scratch-path /var/lib/rstudio-l... May 01 18:16:53 rstudio-server-pro systemd[1]: Started RStudio Launcher. May 01 18:16:53 rstudio-server-pro rstudio-launcher[13148]: Bootstrapping plugin Kubernetes May 01 18:16:53 rstudio-server-pro rstudio-kubernetes-launcher[13161]: Pruning 0 jobs May 01 18:16:53 rstudio-server-pro rstudio-launcher[13148]: Bootstrapping plugin Local May 01 18:16:53 rstudio-server-pro rstudio-local-launcher[13173]: Loading jobs from file... May 01 18:16:53 rstudio-server-pro rstudio-local-launcher[13173]: Loaded 0 jobs from file May 01 18:16:53 rstudio-server-pro rstudio-local-launcher[13173]: Pruning 0 jobs May 01 18:16:53 rstudio-server-pro rstudio-launcher[13148]: Initializing TcpIpAsyncServer with address 127.0.0.1 and port 5559 May 01 18:16:53 rstudio-server-pro rstudio-launcher[13148]: Running server ``` -------------------------------- ### Install VS Code Extensions via code-server Command Line Source: https://docs.posit.co/ide/server-pro/2023.09.1/vscode_sessions/installation This snippet provides the command-line syntax and examples for installing VS Code extensions using `code-server`. It demonstrates how to install extensions from a configured repository using their publisher and name, and how to install extensions from a local VSIX file. The `--extensions-dir` argument specifies the target directory for the installation. ```Shell code-server --extensions-dir --install-extension . ``` ```Shell /usr/lib/rstudio-server/bin/code-server/bin/code-server --extensions-dir=/opt/code-server/extensions --install-extension ms-python.python ``` ```Shell /usr/lib/rstudio-server/bin/code-server/bin/code-server --extensions-dir=/opt/code-server/extensions --install-extension ./my-extension.vsix ``` -------------------------------- ### Configure Show Help Home Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/reference/rsession_conf Indicates whether the help home page should be displayed on startup. ```APIDOC show-help-home - Description: Indicates whether or not to show the help home page on startup. - Type: bool - Default: 0 ``` -------------------------------- ### Basic PAM Setup for Homepage Access with Job Launcher Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/rstudio_pro_sessions/pam_sessions This configuration shows a basic PAM setup for Job Launcher where PAM sessions are only initiated when users access the Workbench homepage. This approach does not forward user credentials to the session and is sufficient when PAM sessions are not required at the start of every Launcher session, relying on `pam_rootok.so` for initial setup. ```Configuration launcher-sessions-enabled=1 auth-pam-sessions-enabled=1 auth-pam-sessions-profile=rstudio ``` -------------------------------- ### Install Posit Workbench on Ubuntu 22 / Debian 12 Source: https://docs.posit.co/ide/server-pro/2024.04.0/getting_started/installation/installation Commands to install `gdebi-core`, download the Posit Workbench DEB package for Ubuntu 22 (Jammy) or Debian 12, and then install it using `gdebi`. This ensures proper dependency handling for the DEB package. ```bash sudo apt-get install gdebi-core curl -O https://download2.rstudio.org/server/jammy/amd64/rstudio-workbench-2024.04.0-amd64.deb sudo gdebi rstudio-workbench-2024.04.0-amd64.deb ``` -------------------------------- ### Install and Start Posit Workbench License Server on Linux Source: https://docs.posit.co/ide/server-pro/2023.06.1/license_management/floating_licensing This snippet demonstrates the commands required to install the Posit Workbench License Server Debian package, activate it with a product key, and start the license server service on a Linux system. The configuration file `/etc/rsp-license-server.conf` can be used for further settings. ```bash $ sudo dpkg -i rsp-license-server-1.1.2-x86_64.deb $ sudo rsp-license-server activate $ sudo rsp-license-server start ``` -------------------------------- ### RStudio Launcher Kubernetes Resource Profiles Configuration Example Source: https://docs.posit.co/ide/server-pro/2023.06.1/job_launcher/kubernetes_plugin Example configuration for defining various resource profiles (CPU, memory, GPU) in the RStudio Launcher's `/etc/rstudio/launcher.kubernetes.resources.conf` file. These profiles simplify resource assignment for jobs by providing predefined sets of resources. ```Configuration [default] name = "Default" # optional, derived from the section name when absent cpus=1 mem-mb=4096 [small] cpus=1 mem-mb=512 [default-gpu] cpus=1 mem-mb=4096 nvidia-gpus=1 amd-gpus=0 [hugemem] name = "Huge Memory" cpus=8 mem-mb=262144 ``` -------------------------------- ### Example Job Launcher Mounts Configuration Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/job_launcher/configuration An example configuration for the `/etc/rstudio/launcher-mounts` file, demonstrating how to define a required user home directory mount using NFS and a shared code mount for Kubernetes clusters, also using NFS. ```YAML # User home mount - This is REQUIRED for the session to run MountType: NFS Host: nfs01 Path: /home/{USER} MountPath: /home/{USER} ReadOnly: false # Shared code mount Cluster: Kubernetes MountType: NFS Host: nfs01 Path: /dev64 MountPath: /code ReadOnly: false ``` -------------------------------- ### SSSD Configuration for Automatic User Provisioning (LDAP/AD) Source: https://docs.posit.co/ide/server-pro/2023.09.1/getting_started/installation/multi_server_installation Example SSSD configuration file (`/etc/sssd/sssd.conf`) for integrating Posit Workbench with LDAP or Active Directory for automatic user provisioning. It includes settings for NSS, PAM, and domain-specific LDAP parameters, ensuring home directories are created in shared storage via `override_homedir`. ```ini [sssd] config_file_version = 2 services = nss, pam domains = LDAP [nss] filter_users = root,named,avahi,haldaemon,dbus,radiusd,news,nscd filter_groups = [pam] [domain/LDAP] default_shell = /bin/bash override_homedir = /nfs/workbench/home/%u id_provider = ldap auth_provider = ldap chpass_provider = ldap sudo_provider = ldap enumerate = true cache_credentials = false ldap_schema = rfc2307 ldap_uri = "" ldap_search_base = dc=example,dc=org ldap_user_search_base = dc=example,dc=org ldap_user_object_class = posixAccount ldap_user_name = uid ldap_group_search_base = dc=example,dc=org ldap_group_object_class = posixGroup ldap_group_name = cn ldap_id_use_start_tls = false ldap_tls_reqcert = never ldap_tls_cacert = /etc/ssl/certs/ca-certificates.crt ldap_default_bind_dn = cn=admin,dc=example,dc=org ldap_default_authtok = admin access_provider = ldap ldap_access_filter = (objectClass=posixAccount) min_id = 1 max_id = 0 ldap_user_uuid = entryUUID ldap_user_shell = loginShell ldap_user_uid_number = uidNumber ldap_user_gid_number = gidNumber ldap_group_gid_number = gidNumber ldap_group_uuid = entryUUID ldap_group_member = memberUid ldap_auth_disable_tls_never_use_in_production = true use_fully_qualified_names = false ldap_access_order = filter ``` -------------------------------- ### Example Posit Workbench Extended R Version Definitions Source: https://docs.posit.co/ide/server-pro/2023.03.1/1352/r/using_multiple_versions_of_r Provides a comprehensive example of the `/etc/rstudio/r-versions` file, illustrating how to define multiple R environments with various fields such as Path, Label, Module, Script, Repo, and Library. It also shows how to list simple R installation paths. ```Configuration Path: /opt/R/R-4.0.5 Label: My special R Version Module: testmodule Script: ~/rload.sh Repo: https://cran.ms.unimelb.edu.au/ Library: /share/packages/R-4.0.5 Path: /opt/R/R-4.0.5-alternate Label: My special R Version 2 Module: r/latest Label: Latest version of R /opt/misc/R/SpecialR1 /opt/misc/R/SpecialR2 /opt/mic/R/AltnerateR ``` -------------------------------- ### Test VS Code Extension Installation Command Source: https://docs.posit.co/ide/server-pro/2023.06.1/vscode_sessions/installation Provides the `code-server` command to test individual extension installation lines. This is useful for validating entries intended for `vscode.extensions.conf` before full deployment. ```Shell code-server --extension-dir=/opt/code-server/extensions --install-extension ``` -------------------------------- ### Example RStudio Server Configuration File (rserver.conf) Source: https://docs.posit.co/ide/server-pro/2024.09.1/job_launcher/troubleshooting/configuration-files This snippet provides an example configuration for `/etc/rstudio/rserver.conf`, which defines core RStudio Workbench server settings. It includes the server's listening port, and critical parameters for integrating with the RStudio Launcher, such as its address, port, session management, and Kubernetes cluster details. ```INI # Server Configuration File www-port=80 # Launcher Config launcher-address=127.0.0.1 launcher-port=5559 launcher-sessions-enabled=1 launcher-default-cluster=Kubernetes launcher-sessions-callback-address=http://rstudio-server-pro:yourcompany.com:80 launcher-sessions-container-run-as-root=0 launcher-sessions-create-container-user=1 ``` -------------------------------- ### Install Posit Workbench VS Code Extension Per-User Source: https://docs.posit.co/ide/server-pro/2023.06.1/vscode_sessions/installation This snippet shows how to manually install the Posit Workbench VS Code extension for a particular user when a global installation directory is not in use. It creates a user-specific directory (using XDG_DATA_HOME or default ~/.local/share/rstudio) and then installs the VSIX file directly into that location. ```bash # Ensure the extension directory exists mkdir -p "${XDG_DATA_HOME:-~/.local/share}/rstudio" cd "${XDG_DATA_HOME:-~/.local/share}/rstudio" # Install the extension /usr/lib/rstudio-server/bin/code-server/bin/code-server --install-extension /usr/lib/rstudio-server/bin/vscode-workbench-ext/rstudio-workbench.vsix ``` -------------------------------- ### Example Posit Job Launcher Configuration File Source: https://docs.posit.co/ide/server-pro/2024.04.0/job_launcher/configuration Illustrates a sample `/etc/rstudio/launcher.conf` file, including the `[server]` section for general server settings and a `[cluster]` section for defining a local cluster with specific access groups. This configuration demonstrates basic setup for address, port, user, and cluster type. ```Conf [server] address=127.0.0.1 port=5559 server-user=rstudio-server admin-group=rstudio-server authorization-enabled=1 thread-pool-size=4 enable-debug-logging=1 [cluster] name=Local type=Local exe=/usr/lib/rstudio-server/bin/rstudio-local-launcher allowed-groups=devs,admins ``` -------------------------------- ### Start Posit Workbench Installation Verification Source: https://docs.posit.co/ide/server-pro/2024.04.0/job_launcher/troubleshooting/verify-installation This command initiates the Job Launcher verification process. It requires a valid user account (``) that is able to use Workbench, as the process will perform tests by launching sessions and jobs under that user, including mounting their home directories into containers. ```bash sudo rstudio-server verify-installation --verify-user= ```