Skip to main content
Skip table of contents

MonolixSuite and R on different machines

Mount MonolixSuite over NFS for use with RStudio Desktop or Posit Workbench

Use this guide when MonolixSuite is installed on Machine A and you want to use it from Machine B (where RStudio Desktop or Posit Workbench runs) via the lixoftConnectors R package.

Requirements

  • Both machines must run Linux. (This does not work if one machine is Windows or macOS.)

  • CPU architecture must be compatible (e.g., both x86_64).

  • Machine B must have the MonolixSuite requirements installed, as listed here.

  • Machine B must have the MonolixSuite license.

  • Network connectivity between the two machines.

  • Admin privileges (sudo).

Topology & Variables

  • Server (Machine A): hosts the MonolixSuite installation
    Example path: /opt/MonolixSuite

  • Client (Machine B): mounts the server’s install path
    Desired mount point: /mnt/monolix

Replace the placeholders below:

  • SERVER_IP → IP of Machine A

  • CLIENT_IP/CIDR → IP or subnet of Machine B (e.g., 192.168.1.0/24)


1) Install NFS Packages

RHEL (8–9)

Server & Client

CODE
sudo dnf install -y nfs-utils

Debian / Ubuntu

  • Server

    CODE
    sudo apt update
    sudo apt install -y nfs-kernel-server
  • Client

    CODE
    sudo apt update
    sudo apt install -y nfs-common

2) Configure the NFS Server (Machine A)

2.1 Export MonolixSuite (read-only recommended)

Read-only is safer for application install trees.

CODE
# Add an export rule (grant the client IP or subnet)
echo "/opt/MonolixSuite CLIENT_IP/CIDR(ro,sync,no_subtree_check)" | sudo tee -a /etc/exports

2.2 Start and enable NFS services

CODE
# RHEL family
sudo systemctl enable --now nfs-server

# Debian/Ubuntu
sudo systemctl enable --now nfs-kernel-server

Apply and verify exports:

CODE
sudo exportfs -rav
sudo exportfs -v

2.3 Open the firewall (if enabled)

  • RHEL family (firewalld):

    CODE
    sudo firewall-cmd --permanent --add-service=nfs
    sudo firewall-cmd --permanent --add-service=mountd
    sudo firewall-cmd --permanent --add-service=rpc-bind
    sudo firewall-cmd --reload
  • Ubuntu with UFW (example allowing from a subnet):

    CODE
    sudo ufw allow from 192.168.1.0/24 to any port 2049 proto tcp
    sudo ufw allow from 192.168.1.0/24 to any port 111  proto tcp
    sudo ufw allow from 192.168.1.0/24 to any port 111  proto udp

3) Configure the NFS Client (Machine B)

3.1 Create a mount point

CODE
sudo mkdir -p /mnt/monolix

3.2 One-off mount (test)

Prefer NFSv4.x when available.

CODE
sudo mount -t nfs -o vers=4.2 SERVER_IP:/opt/MonolixSuite /mnt/monolix
# If your kernel/server supports only 4.1, use:  -o vers=4.1

Verify:

CODE
ls /mnt/monolix

3.3 Make the mount persistent (at boot)

Add to /etc/fstab:

CODE
# MonolixSuite over NFS (read-only)
SERVER_IP:/opt/MonolixSuite  /mnt/monolix  nfs  vers=4.2,ro,hard,timeo=600,retrans=2,_netdev  0 0

Activate:

CODE
sudo systemctl daemon-reload
sudo mount -a

4) Point lixoftConnectors to the Mounted Path

In R (on Machine B):

CODE
# install.packages("/mnt/monolix/MonolixSuite2024R1/connectors/lixoftConnectors.tar.gz", repos = NULL, type = "source")  # if not already installed
library(lixoftConnectors)

initializeLixoftConnectors(
  software = "monolix",
  path = "/mnt/monolix"  # the NFS mount point
)

5) Permissions

NFS respects numeric UIDs/GIDs from the server. Ensure the user running R/RStudio on the client has read & execute rights on the exported directory. Typical app installs under /opt are owned by root and world-readable:

CODE
# On the server (Machine A)
sudo chmod -R a+rX /opt/MonolixSuite

If you switch to a read-write export, align UIDs/GIDs or use a shared group to control write access.


Copy-Paste Example

Change CLIENT_IP and SERVER_IP to the correct IP addresses.

Server (Machine A):

CODE
# RHEL family
sudo dnf install -y nfs-utils
echo "/opt/MonolixSuite CLIENT_IP(ro,sync,no_subtree_check)" | sudo tee -a /etc/exports
sudo systemctl enable --now nfs-server
sudo exportfs -rav
sudo firewall-cmd --permanent --add-service=nfs
sudo firewall-cmd --permanent --add-service=mountd
sudo firewall-cmd --permanent --add-service=rpc-bind
sudo firewall-cmd --reload

Client (Machine B):

CODE
# RHEL family
sudo dnf install -y nfs-utils
sudo mkdir -p /mnt/monolix
sudo mount -t nfs -o vers=4.2 SERVER_IP:/opt/MonolixSuite /mnt/monolix
# persist at boot:
echo "SERVER_IP:/opt/MonolixSuite /mnt/monolix nfs vers=4.2,ro,hard,timeo=600,retrans=2,_netdev 0 0" | sudo tee -a /etc/fstab
sudo mount -a

R (on the client):

CODE
library(lixoftConnectors)
initializeLixoftConnectors(software = "monolix", path = "/mnt/monolix")
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.