Content Settings Panel
This section contains an overview of the Content Settings panel available to publishers and administrators. Content settings are available for each content item and can be accessed by opening a piece of content through the Posit Connect user interface. The Settings panel opens to the Access tab by default.
To toggle the Settings panel open and closed, click on the Settings icon in the upper right Toolbar menu. To hide access to the content controls altogether, share content in Open Solo mode (also located in the Toolbar menu, or under the More icon on narrow screens).
Info and content metadata
After your Connect content has been published, you can change its title, add a description, and upload a content image to make it easier for others to find your content.
First, open the content and click on the Info tab.
The top text field is the application title. This defaults to the application name if it was given. Other users cannot edit this field unless they are collaborators or administrators.
The large text area is the application description. You can describe the content in this field, or add other information that you feel is important. Only collaborators and administrators can edit this field.
The area that displays a prompt to select an image for this content is the content image field. You can upload a JPEG, PNG, GIF, or SVG image that represents the content. Unlike title or description, users who cannot view the content (including administrators) are also unable to view the image you have uploaded. This way, if you wish to upload a screenshot of the content, any information contained in that screenshot will not leak to users who would not otherwise be able to access it.
Usage data
Applications and document-based content types also have basic usage data displayed in the Info panel (visible to the content owner and Connect administrators only).
Usage data for the content item is summarized to show the last 30 days of activity across all associated versions and variants. Shiny applications display the total number of visits and the total user interaction time in the past 30-day period, plus a plot of the daily visit count. Other content items have the same statistics displayed, except for user interaction time.
Example recipes are available in the Cookbook.
Content usage data is not instantly recorded to the database, so very recent usage might not be reflected in the returned data. The default interval is 2 seconds, though this can be changed by your system administrator.
Execution image
If your Connect installation uses off-host content execution with Kubernetes, the Info panel also displays which image was used the last time your content was deployed.
By default, an image is selected automatically by Connect, but you can also specify which image you want to be used at deploy time. See instructions for R and instructions for the command line. You can see a list of all available images by clicking the Environments button at the top of the page.
Alternatively, you can modify the execution image through the Runtime panel.
Access
After publishing a piece of content to Connect, the Connect user interface opens to show the Access panel.
There are three types of user interaction settings available to publishers in this panel:
- Sharing Settings (who can see this content)
- Access List (who can view or change this content)
- Custom Content URL (vanity URL)
The final setting may be restricted to administrators only.
Sharing settings
The default access settings are setup such that only the publisher can view this new piece of content. This means that the content is not visible to other users on your Connect server unless you change the access settings here.
There are several visibility options, arranged from most open to least:
- Anyone - no login required
- All users - login required
- Specific users or groups
Your Posit Connect configuration and license may restrict which visibility options are available to your content.
Choosing Specific users or groups
allows you to specify individual named user accounts or groups registered on the Connect server with help from auto-complete text lookup.
It is not possible to change the content owner through the dashboard settings available here. To transfer content ownership between users, an administrator can use the Posit Connect Server API for single content items, or the usermanager
utility for all of a user’s content.
Public Access content verification
To use the Anyone - no login required access type on interactive content (e.g., Shiny apps, FastAPI APIs), you must have a license with a Public Access entitlement which is available with Posit Connect Public Access and Posit Connect Advanced Unrestricted. If your license does not include this entitlement, you are not permitted to select the Anyone - no login required option.
If your license includes the Public Access entitlement but is not Unrestricted, Public Access interactive content must be available on the public internet. Posit Connect automatically verifies the public accessibility of Public Access interactive content.
See documentation on Public Access content verification for more information. Check with your server administrator if you are unsure what your license allows or requires.
If your license allows Public Access and requires verification, and you configure interactive content to use the Anyone - no login required access type, you can see additional information in the sharing settings area. These messages indicate the verification status of your content.
Content that is new, or recently verified to be publicly accessible, looks like this:
Posit Connect allows for occasional network failures or temporary configuration issues and continues to show this message if verification fails a few times. If the content cannot be verified as publicly accessible for some time, the message changes to a warning:
If the content remains in this state for some time, the message changes to an error. At this time, access to the content is automatically restricted to logged-in users only.
Public Access is restored once the content is available on the public internet and Posit Connect verifies its accessibility. Check with your server administrator if you are not sure whether your content is publicly accessible.
Access list settings
To enable multiple users to maintain and update a single piece of content on Connect, all users should be listed as collaborators on the content. You can control which users are collaborators and which are viewers with the dropdown at the end of the searchbox. After adding a user, you can also change the user’s permission from viewer to collaborator using the icon dropdown on the user’s row.
For more information about the best practices for collaborative development and data project management on Posit Connect, see the Publishing with Collaborators section.
Custom content URL
Administrators and publishers can create a custom vanity URL for a content item. The vanity URL is appended to the server address to form the complete path to the content.
Vanity URLs can be useful for all published content types. The example below demonstrates how creating a custom content URL for a plumber API updates the base URL to a cleaner, more user-friendly address:
By default, publishers can manage vanity paths for content items they own and collaborate on. To restrict this to admins only, set the Authorization.PublishersCanManageVanities
configuration to false
.
Content URL restrictions
Vanity URLs can not be nested inside of one another. If a vanity URL /finance/
already exists, you would not be able to create a new vanity URL at /finance/budget/
. Sibling paths, such as: /finance/budget/
and /finance/quarterly/
can both exist concurrently.
Connect performs a case-sensitive match against vanity URLs when determining what piece of content is requested. If you create a vanity URL like this, /vanityURLexample/
, but try to navigate to the content here /vanityurlexample/
, Connect will return a 404 page not found response.
A case-insensitive match is performed when determining if a new vanity URL is permitted. If you try to apply /vanityURLexample/
to one piece of content, and /vanityurlexample/
to another, Connect considers them to be in conflict and will not allow the action.
Vanity URLs can include only alphanumeric characters, hyphens, underscores, and slashes.
The following path prefixes are prohibited in vanity URLs:
/__
/favicon.ico
/connect
/apps
/users
/groups
/setpassword
/user-completion
/confirm
/recent
/reports
/plots
/unpublished
/settings
/metrics
/tokens
/help
/login
/welcome
/register
/resetpassword
/content
- The custom location for the Connect dashboard, configured by
Server.DashboardPath
.
Locking content
Content owners and Connect administrators can deactivate content items by locking them. Locking content has the following effects:
- All processes associated with the content are terminated.
- Any scheduled runs associated with the content are paused.
- On-demand rendering of locked content is disabled.
- New content bundles cannot be deployed.
- New visits to locked content are not recorded.
Unlocking content can be done at any time, reverting back the effects of locking the content:
- Content runs again for any new visitors.
- Processes start immediately when there is a minimum of processes configured.
- Any scheduled runs resume based on the existing configuration.
When scheduled content is locked, Connect continues to consider that content item for rendering according to its schedule. No work is done when the content is locked, but if you unlock that content, scheduled rendering resumes.
When permanently locking content, we recommend that you remove its scheduling configuration.
Use the locked content message field to provide context or instructions for any visitors who might still try to access your locked content. For example, a new application has precedence over an old application and you want to provide an explanation to any visitors of the old application and some instructions to go to your new application.
Markdown syntax can be used to format your custom message.
Locked content does not appear in content searches within the dashboard, unless the is:locked
filter is used.
Deleting content
Content owners and Connect administrators can delete content.
Deleted content cannot be restored. If you you are unsure whether content should be fully removed, locking content to disable it is also an option.
When content is deleted:
- All processes associated with the content are terminated.
- Any scheduled runs associated with the content are removed.
- All content bundles and rendered artifacts are permanently deleted from disk.
To delete content, select the More button above the Content Settings panel. From the dropdown, select Delete. Connect displays a popup to confirm content deletion. Select Yes.
Runtime
Posit Connect is built to scale content. Publishers and administrators have access to runtime settings to help tune and scale their applications and APIs. The primary concern for scaling content in Connect is understanding when and how Python or R code is executed on the server.
A powerful component of Connect is the ability to host data products that require backend processes during a user’s visit. Examples include Shiny applications, R Markdown documents with runtime: shiny
, and Quarto documents with server: shiny
, Flask, FastAPI and Plumber APIs, and Dash and Streamlit applications. In the case of applications, an end user’s browser (the client) is connected with a process running on the server. When a user changes an input, the client sends a message to the server and a portion of code is re-run. The server sends back the result as output. In the case of APIs, a client makes a request which is sent to a running process, and the results are sent back to the client.
If the runtime controls do not apply to the content type (e.g., static/batch content including: documents, plots, and HTML files), you will see limited settings or a message stating that there are no runtime settings to configure.
Process configurations
References to per node configurations refer to Posit Connect instantiations which are configured for High Availability. Check with your server administrator if you’re not sure whether this applies to you.
Changes to min/max processes take effect immediately, but existing processes in use are not terminated until they are no longer serving any connections.
Max processes
The maximum number of processes that can be simultaneously running for this content per Connect node, regardless of load.
Min processes
The minimum number of processes that can be kept running for this content per Connect node, regardless of load.
Max connections per process
The maximum number of client connections allowed to an individual process. Incoming connections which exceed this limit are routed to a new process or rejected.
Load factor
A value between 0 and 1 which determines how lazily additional processes are spawned to handle incoming load for this process. At the highest setting, Connect only spawns additional processes when existing processes are not allowed to accept an additional connection. At the lowest setting, Connect creates many new processes as new users arrive to handle the load.
Errors such as connection timeouts or HTTP 503 status codes indicate insufficient process resources to serve the incoming requests. This can be caused by sudden bursts of requests to this piece of content. If this occurs, some possible solutions are:
Increase
Min processes
so that one or more worker processes are kept running. Those processes begin handling requests while additional processes are starting up. Keep in mind that processes that are kept running when not needed still consume system memory.Increase
Max processes
and/orMax connections per process
to provide enough total connections to hold all incoming requests while processes are starting up.
Applications that take significant time to start up might also benefit from setting Min processes
. Users visiting the application can then be served quickly by a process that is already running, rather than waiting for an application process to start up. Connect configurations that use off-host execution might see somewhat longer application startup times and can also use Min processes
to keep workers running if needed.
For more information, see Scaling and Performance Tuning in Posit Connect.
Timeout configurations
Connections to new processes use updated timeout values, while existing connections are not modified or disconnected.
Idle timeout per process
The minimum number of seconds a worker process remains alive after it goes idle (no active connections).
Initial timeout
The maximum number of seconds to wait for an app to start.
Connection timeout
The maximum number of seconds allowed without data sent or received across a client connection. A value of 0 means connections will never time-out (not recommended).
Read timeout
Maximum number of seconds allowed without data received from a client connection. A value of 0 means a lack of browser interaction will never cause the connection to close. This is useful when deploying dashboard applications which send regular updates but have no need for interactivity.
Process execution
Content is initially configured to run on the server as a Unix user configured by your Posit Connect administrator, defaulting to the rstudio-connect
user. Your content may need to run as a different Unix user due to resource permissions and constraints. If you specify an alternate user, the target user must be a member of a shared Unix group which is configured by your administrator. The default shared group is also called rstudio-connect
.
If you are running Connect in off-host execution mode, there is no guarantee that there is a mapping between the RunAs
user’s uid
and the SharedRunAsUnixGroup
’s gid
inside of the execution environment image.
Your Connect administrator can adjust the default Unix user and shared group by modifying the Applications.RunAs
and Applications.SharedRunAsUnixGroup
settings.
Service accounts
Content Service Account settings are only available when Connect is configured for off-host execution with Kubernetes.
In off-host execution mode, the Process Execution section of the Runtime panel provides an additional dropdown which configures the Kubernetes service account used to execute content.
Only administrators can modify the service account assigned to a piece of content. Publishers can view the configured service account but cannot modify it.
The list of available Kubernetes service accounts is populated during Connect startup. Therefore, the actual service accounts available in Kubernetes can diverge from the service accounts available to Connect. De-synchronized service accounts can lead to undesirable behavior, such as: (a) the content failing to execute with an error message indicating that the service account was not found, or (b) a valid service account not being available to the content.
If you encounter service account de-synchronization, your Connect administrator can restart Connect to refresh its list of available service accounts.
Default service accounts
If your Connect administrator has set a default service account for the server, it appears in the dropdown with a (default)
postfix. Published content defaults to using this service account to execute content.
The Kubernetes namespace’s default service account appears as namespace default
. If no default service account is specified by your Connect administrator, published content defaults to using this service account to execute content.
Your Connect administrator can adjust the default service account for the server by modifying the Launcher.KubernetesDefaultServiceAccount settings.
Validation
If your content is configured to use a service account that is not identified at startup, Connect alerts you beneath the dropdown. The configured service account is also be annotated with a (not recognized)
postfix.
Execution environment
Content Execution Environment selection is only available when Connect is configured for off-host execution with Kubernetes.
In off-host execution mode, the Runtime panel allows you to specify the image used to create the content execution container.
By default, the most appropriate execution environment for your content is selected automatically by Connect.
Alternatively, you can specify the execution environment manually. Selecting the Use a specific environment
option from the dropdown directs you to a list of available execution environments. Here, you can manually set the execution environment for your content.
CPU & RAM configurations
Initial and Max CPU and Initial RAM settings are only available when Connect is configured for off-host execution with Kubernetes. Check with your server administrator if you’re not sure whether this applies to you. See Resource Management for Pods and Containers for more details about how CPU and RAM constraints are used by Kubernetes. In particular, if you set Limits but not Requests, Request is automatically set equal to Limit.
Changes to memory or CPU constraints apply to new processes but not existing ones.
Initial number of CPUs
Number of CPU units requested for your process. This indicates the minimum amount of CPU your content needs to render or execute, and is used by Kubernetes to determine which node should run your content. Fractional values are allowed.
0
indicates that no request should be made.Max number of CPUs
Limits the number of CPU units your process are allowed to use. Fractional values are allowed.
0
indicates no limit (this may be disabled by your administrator). Processes that use more CPU than allowed are throttled.Initial RAM requested
Amount of RAM (in GiB) requested for your process. This indicates the minimum amount of RAM your content needs to render or execute, and is used by Kubernetes to determine which node should run your content.
0
indicates that no request should be made.Max RAM
Limits the amount of RAM (in GiB) your process is allowed to use.
0
indicates no limit (this can be disabled by your administrator). Processes that use more RAM than allowed are terminated.
Your administrator can set defaults or upper limits for some or all of these values. Note that setting Max CPUs or Max RAM to 0
means the process is allowed unlimited resources. However, if your administrator has set an upper limit for one of these settings, you will not be able to set it to 0
/unlimited.
These requests and limits are applied to any process involved in rendering or executing your content. For example, if you have interactive content with a prerendered component, these settings will apply both to the prerender process and the runtime interactive process.
When a process is terminated due to exceeding allowed RAM, it is terminated by the operating system. The error message depends on the specific OS, language, packages, and user code involved. Therefore, it is not possible to give a list of possible error codes, or for Connect to detect that this is the reason for termination. If your content is failing to render or execute and the reason is ambiguous, try increasing or removing any RAM limits. Similarly, requests for initial CPU or RAM that cannot be fulfilled by Kubernetes can cause errors that appear in Kubernetes logs but not Connect logs. If your content process is failing to start, try increasing or removing initial CPU and RAM requests.
GPU configurations
GPU settings are only available when Connect is configured for off-host execution with Kubernetes. Administrators must also configure either Scheduler.MaxAMDGPULimit
or Scheduler.MaxNvidiaGPULimit
to enable GPUs. Check with your server administrator if you’re not sure whether this applies to you. See Using device plugins for more details about how GPU devices are exposed by Kubernetes.
Your administrator can set application defaults or upper limits for both AMD and NVIDIA GPUs. Note that setting Max GPUs to 0
(the default) means that GPUs are disabled and the process is not allowed to request any GPUs. If GPUs are disabled then the GPU options are not rendered in the application runtime settings pane. If your administrator has enabled GPUs by setting an upper limit for one of these settings, you can request any number of GPUs, up to the configured max. Users can always set the value to 0
to disable GPUs for the application.
Requesting a GPU when there are none available in Kubernetes can cause your content to fail to start. If your content is not starting after requesting a GPU, check with your Kubernetes and Connect server administrators to ensure that there are enough GPUs of the correct type available to Kubernetes.
Environment management
Administrators and content owners can configure the application-level default environment management strategy for a piece of content using the Next time drop-down menu in the environment management configuration section.
If environment management is Disabled
, then Connect does not perform any package installation during the build and it is the responsibility of the administrator to ensure that the packages required by the content are installed in the runtime environment. Modifying the environment management selection causes the content to perform a rebuild the next time it executes. For interactive content, this is immediate. For rendered content, the rebuild occurs the next time the content renders. During the subsequent rebuild, Connect determines whether the Python or R environment should be managed by Connect.
The Last time information box indicates what Connect previously determined was the effective environment management strategy the last time the content was built. The environment management strategy for Python can be configured independently of the environment management strategy for R. See the corresponding sections in the Admin Guide for details on how Connect determines the effective environment management strategy during a rebuild.
The effective environment indicated by Last time might not always correspond to the setting configured by the dropdown. This can occur when the content bundle requests an explicit environment management strategy. The environment management strategy defined by the bundle has higher precedence than the application-level default strategy defined by the drop-down in the dashboard.
Schedule and emailing
The Schedule panel is available for content types that can be rendered on a schedule. If scheduling is not applicable to the content, you will see a message stating that there are no settings to configure.
The scheduling customization options available depend on which schedule type you choose. For example, selecting the daily
schedule type allows a choice between running the report every x
number of days or every weekday.
By default, the email functionaly for Connect is disabled until it is properly configured. Instructions are available in the Admin Guide.
Scheduled reports can be configured to send an email to targeted recipients upon successful completion. When a scheduled report fails to run, the content owner (and all collaborators unless otherwise configured) will get an email indicating that there has been rendering error.
A full description of all scheduling features is available in the Scheduling chapter.
Vars (Environment Variables)
When developing content for Connect, you should never place secrets (keys, tokens, passwords, etc.) in the code itself. Best practices dictate that this kind of sensitive information should be protected through the use of environment variables or another method of configuration such as the config
package.
Connect automatically provides a number of environment variables when running your content:
RSTUDIO_PRODUCT
is assigned the valueCONNECT
.The
RSTUDIO_PRODUCT
environment variable cannot be customized.CONNECT_SERVER
contains the public URL of the Connect server. This URL was specified by theServer.Address
server configuration setting.Content owners can overwrite this value in the Vars pane or with the Posit Connect Server API.
The automatic addition of
CONNECT_SERVER
can be disabled for security reasons using theApplications.DefaultServerEnv
server configuration setting. Reach out to your Connect server administrator for additional details.CONNECT_API_KEY
is owned by the content owner and is ephemeral (only exists for the duration of the underlying content process).Content owners can overwrite this value in the Vars pane or with the Posit Connect Server API.
The automatic addition of
CONNECT_API_KEY
can be disabled for security reasons using theApplications.DefaultAPIKeyEnv
server configuration setting. Reach out to your Connect server administrator for additional details.CONNECT_CONTENT_GUID
contains the GUID for the content.Content owners can overwrite this value in the Vars pane or with the Posit Connect Server API.
R_CONFIG_ACTIVE
identifies the active configuration for use with theconfig
R package. The default value isrsconnect
, but administrators can change this value globally with theR.ConfigActive
server configuration setting.The
R_CONFIG_ACTIVE
environment variable is automatically configured only for content using R.Content owners can overwrite the default value for
R_CONFIG_ACTIVE
in the Vars pane or with the Posit Connect Server API. Some installations might prohibit this adjustment.SPARK_CONNECT_USER_AGENT
containsposit-connect/
and the Connect version.Content owners can overwrite this value in the Vars pane or with the Posit Connect Server API.
Environment variables can be set prior to deploying a content bundle with the Posit Connect API. Follow the Deploying Content workflow in the Server Cookbook.
To set environment variables after initial deployment in the Connect dashboard, navigate to the Vars pane. Enter a name and value for your environment variable, then click on the Add Variable button.
Once a variable is added, the value is obscured. Environment variables are encrypted on-disk and in-memory. They are decrypted only when a process is about to be started.
Documents must be published with source code to be executable. Static content (HTML) is served as-is. It is not rendered by the server and does not receive these environment variables.
Logs
The logs viewer contains execution details for each launched process associated with the piece of content. Standard output and standard error are captured and streaming log entries appear in real time.
The logs viewer can be opened from the Connect dashboard Toolbar menu by clicking the Show Logs icon. For smaller windows and mobile, this icon is consolidated into the More option. The logs can also be opened and closed with a keyboard shortcut (~
).
Search and download functionality is scoped to the log file you currently have selected and displayed in the logs viewer.
Switching between logs
Use the Logs Selection drop-down (located in the upper left) to view the available logs and switch between them in the viewer. Logs are organized by content bundle. Each time you publish an update to a content item, a new content bundle is created. The current bundle is denoted as Active.
Currently running process logs are indicated by a green live symbol. The log currently shown in the viewer is indicated by a check mark symbol.
Use the filter to narrow the type of logs shown in the Logs Selection drop-down. There are several types of logs available to filter depending on the type of content you are inspecting. Documents published with source code have environment restore logs and render logs. Applications have environment restore logs and process logs.
Truncation
The viewer output may be truncated for log line length (at 4096 characters) and lines shown (at 5000 lines). Truncation prevents performance issues in the browser.
To retrieve the full output of the log file, use the Download button located in the upper right corner of the viewer.