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
.
systemd
is a management and configuration platform for Linux.
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.
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 is displayed on the Documentation tab in the Connect web interface, as well as in the left-hand sidebar which is revealed by clicking the Menu button at the top left of the window.
Upgrading
We recommend creating a backup of the Posit Connect database and data directory before upgrading. If you need to roll back to a prior version, you will need these backups. See Downgrading for more details.
Upgrading Posit Connect requires limited downtime. Scheduled document renders are interrupted, and connections to running applications and APIs are closed. We recommend upgrading during a period of low usage. Users can be warned ahead of an upgrade with system messages.
The Posit Connect version number is visible on the left-hand navigation pane of the Posit Connect dashboard.
The latest version of Posit Connect is available on the download page along with release notes.
You can upgrade Posit Connect by using one of the following methods:
The installation/upgrade script or
The latest
.rpm
or.deb
file:Download the latest
.rpm
or.deb
file for your distribution.Run the install command:
sudo gdebi <rstudio-connect-version.deb>
sudo yum install <rstudio-connect-version.rpm>
sudo zypper install <rstudio-connect-version.rpm>
For offline environments, simply download the latest .rpm
or .deb
file, copy it to your offline server, and run the installation command (shown above).
The new version of Posit Connect installs on top of an earlier installation. Existing configuration settings are respected. During installation the Posit Connect service is restarted. Total downtime is less than 10 minutes.
The /etc/rstudio-connect/rstudio-connect-migration.gcfg
configuration file is modified during product updates. The Configuration Migration section describes this file and how it is managed. The migration file acts as a staging area for new or updated options. Review the contents of this file after upgrading and move its contents to the main /etc/rstudio-connect/rstudio-connect.gcfg
configuration file.
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 (support@posit.co) 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:
Stop the Posit Connect service. (See Starting and Stopping for details)
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
Remove logs from
/var/log/rstudio/rstudio-connect/*
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.
Remove the
Server.DataDir
directory. By default, this is/var/lib/rstudio-connect
.Remove configuration files from
/etc/rstudio-connect
if they still exist.