Skip to content

File Storage#

The Package Manager service stores a variety of files containing software packages, metadata, and artifacts to function properly and speed up computation.

This storage can be configured in three different ways:

  • Local storage: This is the default configuration and only works with single-node configurations.
  • Network File Systems (NFS): This enables Package Manager to function in a cluster and provides better redundancy.
  • AWS Simple Cloud Storage Service (S3): This also enables Package Manager to function in a cluster, provides better redundancy, and allows administrators to separate the computation from the storage-layer entirely.

The only exceptions are the application program files, the application logging, and the access logging, which will be written to local storage by default.

Manual Installation File Storage

The file locations and values specified in this section are the default and do not apply to users who manually installed Package Manager to a custom location. For more information, reference the Manual Installation for Minimal Root Use section.

Program Files#

The Package Manager installers place all program files into the /opt/rstudio-pm directory.

You should not move any files in the /opt/rstudio-pm hierarchy, as this could break installations. Additionally, any alterations will be overwritten by subsquent Package Manager upgrades.

The installer will also create the /var/log/rstudio/rstudio-pm directory with 0775 permissions, /var/lib/rstudio-pm directory with 0701 permissions, and all other subdirectories within /var/lib/rstudio-pm (e.g., file storage and database directories) with 0700 permissions.

Configuration#

The Package Manager configuration file is stored at /etc/rstudio-pm/rstudio-pm.gcfg and owned by rstudio-pm with permissions 0640. This configuration may need to contain passwords and other sensitive information. Refer to the appendix for more information on encrypting this information for better security.

An example configuration file that includes all the available configuration settings along with their defaults is installed at /etc/rstudio-pm/rstudio-pm.gcfg.defaults.

Data Directory#

The Package Manager data directory contains information used by the server to manage repositories including a SQLite databases and an encryption key.

The default location for the Package Manager data directory is /var/lib/rstudio-pm, which can be configured by changing the DataDir setting in your configuration file's Server section. Here is an example of updating the DataDir to the point to the /mnt/rstudio-pm directory:

/etc/rstudio-pm/rstudio-pm.gcfg
[Server]
DataDir = /mnt/rstudio-pm

The Package Manager service user must have permissions to read, write, and create directories in the data directory. Refer to the appendix for more information on changing the RunAs user.

Warning

The SQLite database must exist on local storage. If the location for DataDir is not local storage but a networked location over NFS, configure the Dir setting in the SQLite section of your server configuration file.

/etc/rstudio-pm/rstudio-pm.gcfg
[Server]
DataDir = /mnt/rstudio-pm

[SQLite]
Dir = /var/lib/rstudio-pm/db

By default, the data directory stores several subdirectories used by Package Manager. These subdirectories include the cache, persistent, metrics, packages, and other folders containing data used by Package Manager during execution. Although it is not recommended, you can customize each of these storage directories individually. For more information on the contents of these subdirectories or how to change the locations, refer to the appendix.

Data Destinations#

As mentioned above, Package Manager can use local, NFS, or S3 for file storage. While local storage works for single-node setups and does not require additional configuration, multi-node or high-availability setups require mounting certain files to a shared file system. The NFS and S3 sections provide the steps for configuring these systems.