Server Management

This section describes common administrative tasks for Posit Connect.

Stopping and Starting

Occasionally it is necessary to start and stop the Posit Connect service. Stopping and starting is handled by systemd.

Note

systemd is a management and configuration platform for Linux.

Off-Host Execution

If you are running Posit Connect via the Helm chart, then systemd is not used to start the server. Instead, you should use the helm upgrade ... command to perform a rolling update.

On stop/start or restart the following occurs:

Stop:

  • The Posit Connect process is stopped.
  • Processes serving applications and APIs are stopped.
  • Processes rendering documents run through completion.
  • In-progress deployments will fail. Processes running as part of the deployment may run to completion.

Start:

  • Posit Connect process is resumed.
  • Applications and APIs with a minimum number of processes are started.
  • Scheduled document render updates missed during system downtime are run at most once.

The Posit Connect installer installs a systemd service called rstudio-connect, which causes the connect program to be started and stopped automatically when the machine boots up and shuts down. The rstudio-connect service is also automatically launched during installation.

Use the following commands to manually start and stop the server:

sudo systemctl start rstudio-connect
sudo systemctl stop rstudio-connect

You can restart the server with:

sudo systemctl restart rstudio-connect

You can trigger a configuration reload with the systemctl reload command, which reads the changed configuration from disk:

sudo systemctl reload rstudio-connect

This causes the server to re-initialize but does not interrupt the current processes or any of the open connections to the server.

Note

Use systemctl reload to send a HUP signal when your configuration changes are limited to properties marked as “reloadable”. See the Configuration appendix to learn which settings may be reloaded. Perform a full restart of Posit Connect when changing other properties.

You can check the status of the rstudio-connect service using:

sudo systemctl status rstudio-connect

And finally, you can use the enable/disable commands to control whether Connect should be run automatically at boot time:

sudo systemctl enable rstudio-connect
sudo systemctl disable rstudio-connect

System Messages

Administrators can add a message to the Posit Connect welcome page and content page.

The Server.PublicWarning setting defines the message for the welcome page. Server.LoggedInWarning defines the message for the content page. The messages are supplied as HTML snippets. For example:

; /etc/rstudio-connect/rstudio-connect.gcfg
[Server]
PublicWarning = "<strong>Warning:</strong> Scheduled downtime this weekend."
LoggedInWarning = "Data Science Team Meeting Tomorrow"

Messages can be added or modified without restarting the connect service. After adding the message property to the config file, use the reload command:

sudo systemctl reload rstudio-connect

Health-Check

Posit Connect provides a simple health-check endpoint that can be used to test if Connect is up/listening. Point your browser to myserveraddress:myserverport/__ping__, which returns an empty JSON response and an HTTP 200 status.

curl -I -X GET http://myserveraddress:myserverport/__ping__

Determine Version Installed

The version of Posit Connect can be determined from the Connect web interface or terminal.

To find the version in the Connect web interface, refer to either the Documentation tab or the left-hand sidebar accessed by clicking the Menu button at the top left of the window.

To find the version using the terminal, use the command:

/opt/rstudio-connect/bin/connect --version

Downgrading

Rolling an Posit Connect installation back to an older version is not supported. Once an upgraded version of Connect is used within an environment, that environment is incompatible with older releases.

If you must revert to a previously used version, you must restore your Posit Connect environment from a previously created backup that is compatible with the Connect version. Please contact Posit customer support () if you need additional guidance.

Purging Posit Connect

You can fully remove Posit Connect and all its data from your server using the following steps:

  1. Stop the Posit Connect service. (See Starting and Stopping for details)

  2. Uninstall the Posit Connect package from your system.

    Ubuntu:

    sudo apt-get purge rstudio-connect

    Red Hat/CentOS:

    sudo yum remove rstudio-connect

    SUSE:

    sudo zypper remove rstudio-connect
  3. Remove logs from /var/log/rstudio/rstudio-connect/*

  4. Purge the database

    • When using SQLite, remove the SQLite.Dir directory. This has a default location of /var/lib/rstudio-connect/db.

    • When using PostgreSQL, drop the database used by Connect. You may also wish to remove the PostgreSQL user associated with Connect.

  5. Remove the Server.DataDir directory. By default, this is /var/lib/rstudio-connect.

  6. Remove configuration files from /etc/rstudio-connect if they still exist.