Deploying Viewers and Servers with local certificates

Follow

This article explains how to deploy RealVNC Viewer and RealVNC Server applications that are licensed by the On-Prem Management Console, with the SSL certificates stored locally on each device that the application is being installed on.

Before you begin, you will need the following values from your On-Prem Management Console:

  • OPCHost – the URL of your On-Prem Management Console.
  • Join Token (Server deployments only) – used to register a server with the Management Console for the first time.

Both of these values can be found in your On-Prem Management Console.

You will also need the SSL certificate file (for example, OPC.pem) provided during the setup of your On-Prem Management Console. This certificate must be copied to a local path on each device before running the deployment steps below.

RealVNC Connect v8 All-in-one application

The RealVNC Connect v8 All-in-one application is not compatible with the On-Prem Management Console. You must install RealVNC Viewer and RealVNC Server as separate applications using the instructions below.

Certificate storage

Do not store the RealVNC Viewer certificate in the same location as the RealVNC Server certificate on the same device. If both applications are installed on one device, use separate directories for each certificate, otherwise the applications may not be able to read their certificates correctly.

For RealVNC Server, we recommend storing the certificate in C:\ProgramData\RealVNC-Service\vncserver.d on Windows, or /etc/vnc/certs/ on Linux and macOS.


RealVNC Viewer deployment

RealVNC Viewer v7 – Windows

Command line

These steps apply the On-Prem Management Console settings to all users of RealVNC Viewer on the device.

  1. Download the RealVNC Viewer for Windows MSI.
  2. Open Command Prompt as Administrator and run the following command, replacing <vnc-viewer> with the filename of the MSI you downloaded:

    msiexec /i <vnc-viewer>.msi /qn
  3. Open Registry Editor as Administrator.
  4. Navigate to (or create) the registry key path HKEY_LOCAL_MACHINE\Software\Policies\RealVNC\vncviewer.
  5. Create three new String values with the following details:

    Name Value
    OPCHost Your On-Prem Management Console URL
    OPCCerts The local path to your SSL certificate
    EnableOPC True
  6. Open RealVNC Viewer.
  7. Click Sign In at the top right, then click Sign In with On-Prem Console.

Manual install

  1. Download and install the RealVNC Viewer for Windows MSI.
  2. Open RealVNC Viewer.
  3. Open Preferences via the File menu at the top of the RealVNC Viewer window.
  4. Select Expert.
  5. Set OPCHost to your On-Prem Management Console URL.
  6. Set OPCCerts to the local path to your SSL certificate.
  7. Set EnableOPC to TRUE.
  8. Close and re-open RealVNC Viewer.
  9. Click Sign In at the top right, then click Sign In with On-Prem Console.

Group Policy

RealVNC Viewer v7 can also be configured for the On-Prem Management Console using Group Policy. For details, refer to Configuring and Licensing RealVNC Connect for Windows using Group Policy.

RealVNC Viewer v7 – Linux

Command line

These steps apply the On-Prem Management Console settings to all users of RealVNC Viewer on the device.

  1. Download the RealVNC Viewer DEB (Ubuntu) or RPM (Red Hat), depending on your Linux distribution.
  2. Open a terminal and install the package, then open the policy configuration file:

    Ubuntu:

    sudo apt install -y /path/to/deb
    sudo nano /etc/vnc/policy.d/common

    Red Hat:

    sudo yum install -y /path/to/rpm
    sudo nano /etc/vnc/policy.d/common
  3. Add the following lines to the configuration file, replacing the values with your own:

    OPCHost=https://your-opc-host
    OPCCerts=/path/to/your/certificate.pem
    EnableOPC=TRUE
  4. Save and close the file (Ctrl+O, then Ctrl+X).
  5. Open RealVNC Viewer.
  6. Click Sign In at the top right, then click Sign In with On-Prem Console.

Manual install

  1. Download and install the RealVNC Viewer DEB (Ubuntu) or RPM (Red Hat), depending on your Linux distribution.
  2. Open RealVNC Viewer.
  3. Open Preferences via the File menu at the top of the RealVNC Viewer window.
  4. Select Expert.
  5. Set OPCHost to your On-Prem Management Console URL.
  6. Set OPCCerts to the local path to your SSL certificate.
  7. Set EnableOPC to TRUE.
  8. Close and re-open RealVNC Viewer.
  9. Click Sign In at the top right, then click Sign In with On-Prem Console.

Policy templates

RealVNC Viewer v7 can also be configured using policy templates. For details, refer to Remotely configuring, licensing and locking down RealVNC Connect using policy.

RealVNC Viewer v7 – macOS

Command line

These steps apply the On-Prem Management Console settings to all users of RealVNC Viewer on the device.

  1. Download the RealVNC Viewer for macOS DMG file.
  2. Open a terminal and run the following commands, replacing <vnc-viewer> with the filename of the DMG you downloaded:

    hdiutil attach <vnc-viewer>.dmg
    cp -a /Volumes/<vnc-viewer>/VNC\ Viewer.app /Applications
    hdiutil detach /Volumes/<vnc-viewer>
  3. Open the policy configuration file:

    sudo nano /etc/vnc/policy.d/common
  4. Add the following lines, replacing the values with your own:

    OPCHost=https://your-opc-host
    OPCCerts=/path/to/your/certificate.pem
    EnableOPC=TRUE
  5. Save and close the file (Ctrl+O, then Ctrl+X).
  6. Open RealVNC Viewer.
  7. Click Sign In at the top right, then click Sign In with On-Prem Console.

Manual install

  1. Download and install the RealVNC Viewer for macOS DMG file.
  2. Open RealVNC Viewer.
  3. Open Preferences via the File menu at the top of the RealVNC Viewer window.
  4. Select Expert.
  5. Set OPCHost to your On-Prem Management Console URL.
  6. Set OPCCerts to the local path to your SSL certificate.
  7. Set EnableOPC to TRUE.
  8. Close and re-open RealVNC Viewer.
  9. Click Sign In at the top right, then click Sign In with On-Prem Console.

Policy templates

RealVNC Viewer v7 can also be configured using policy templates. For details, refer to Remotely configuring, licensing and locking down RealVNC Connect using policy.

RealVNC Viewer v8 – Windows

  1. Download and install the RealVNC Connect Viewer MSI.
  2. Open Windows PowerShell as Administrator and run the following script, after replacing the certificate path with the local path to your SSL certificate:

    # Set the parameters for your environment
    $OPCHost = "https://your-opc-host"
    $OPCCerts = "C:\path\to\OPC.pem"
    
    ### DO NOT EDIT BELOW THIS LINE ###
    $regpath = "HKLM:\Software\Policies\RealVNC\rvncconnect"
    
    if (-not (Test-Path $regPath)) {
        New-Item -Path $regPath -Force
    }
    
    New-ItemProperty -Force -Path $regpath -PropertyType String -Name "EnableOPC" -Value 1
    New-ItemProperty -Force -Path $regpath -PropertyType String -Name "OpcCerts" -Value $OPCCerts
    New-ItemProperty -Force -Path $regpath -PropertyType String -Name "OpcHost" -Value $OPCHost

    This script applies the settings to all users of RealVNC Connect Viewer on the device.

  3. Open the RealVNC Connect Viewer app from the Start Menu.
  4. Enter your On-Prem Management Console username and password, then click Sign In.

Group Policy

RealVNC Connect Viewer v8 can also be configured for the On-Prem Management Console using Group Policy. For details, refer to Configuring and Licensing RealVNC Connect v8 for Windows using Group Policy.

RealVNC Viewer v8 – Linux

  1. Download and install the RealVNC Connect Viewer DEB (Ubuntu) or RPM (Red Hat), depending on your Linux distribution.
  2. Run the following script as root or with sudo, after replacing the certificate path with the local path to your SSL certificate:

    #!/bin/sh
    
    # Set the parameters for your environment
    OPCHost=https://your-opc-host
    OPCCerts=/path/to/OPC.pem
    
    ### DO NOT EDIT BELOW THIS LINE ###
    configpath="/etc/vnc/policy.d/"
    mkdir -p "${configpath}"
    
    configfile="${configpath}/rvncconnect"
    touch "${configfile}"
    
    sed -i '/^EnableOPC/d' "${configfile}"
    sed -i '/^OpcCerts/d' "${configfile}"
    sed -i '/^OpcHost/d' "${configfile}"
    
    {
      echo "EnableOPC=1"
      echo "OpcCerts=${OPCCerts}"
      echo "OpcHost=${OPCHost}"
    }  "${configfile}"

    This script applies the settings to all users of RealVNC Connect Viewer on the device.

  3. Open the RealVNC Connect Viewer app.
  4. Enter your On-Prem Management Console username and password, then click Sign In.

RealVNC Viewer v8 – macOS

  1. Download and install the RealVNC Connect Viewer PKG.
  2. Run the following script as root or with sudo, after replacing the certificate path with the local path to your SSL certificate:

    #!/bin/sh
    
    # Set the parameters for your environment
    OPCHost=https://your-opc-host
    OPCCerts=/path/to/OPC.pem
    
    ### DO NOT EDIT BELOW THIS LINE ###
    configpath="/etc/vnc/policy.d/"
    mkdir -p "${configpath}"
    
    configfile="${configpath}/rvncconnect"
    touch "${configfile}"
    
    sed -i '' '/^EnableOPC/d' "${configfile}"
    sed -i '' '/^OpcCerts/d' "${configfile}"
    sed -i '' '/^OpcHost/d' "${configfile}"
    
    {
      echo "EnableOPC=1"
      echo "OpcCerts=${OPCCerts}"
      echo "OpcHost=${OPCHost}"
    }  "${configfile}"

    This script applies the settings to all users of RealVNC Connect Viewer on the device.

  3. Open the RealVNC Connect Viewer app from the Applications menu or Launchpad.
  4. Enter your On-Prem Management Console username and password, then click Sign In.

RealVNC Server deployment

Each RealVNC Server requires two parameters (OPCHost and OPCCerts) and a join token. The join token is only required the first time a server is registered with the On-Prem Management Console. When updating an existing RealVNC Server to a newer version, the join token is not needed again.

RealVNC Server – Windows

Command line (new installation)

  1. Download the RealVNC Server for Windows MSI.
  2. Open Command Prompt as Administrator and run the following command, replacing the placeholder values with your own OPCHost URL, certificate path and join token:

    msiexec /i <vnc-server>.msi /qn JOINOPC=<your-join-token> PARAMS="OPCHOST=https://your-opc-host,OPCCERTS=C:\path\to\OPC.pem"

Command line (updating an existing installation)

If RealVNC Server is already registered with the On-Prem Management Console and you are updating to a newer version, run:

msiexec /i <vnc-server>.msi /qn

Manual install

  1. Download and install the RealVNC Server for Windows MSI.
  2. Close the Licensing Wizard if it appears.
  3. Open Registry Editor as Administrator.
  4. Navigate to (or create) the registry key path HKEY_LOCAL_MACHINE\Software\RealVNC\vncserver.
  5. Create two new String values with the following details:

    Name Value
    OPCHost Your On-Prem Management Console URL
    OPCCerts The local path to your SSL certificate
  6. Open Command Prompt as Administrator and register the server with the On-Prem Management Console by running the following command, replacing the placeholder with your join token:

    vncserver.exe -service -joinOpc <your-join-token>

RealVNC Server – Linux

Command line

  1. Download the RealVNC Server DEB (Ubuntu) or RPM (Red Hat), depending on your Linux distribution.
  2. Open a terminal and install the package, then open the configuration file:

    Ubuntu:

    sudo apt install -y /path/to/deb
    sudo nano /etc/vnc/config.d/common.custom

    Red Hat:

    sudo yum install -y /path/to/rpm
    sudo nano /etc/vnc/config.d/common.custom
  3. Add the following lines to the configuration file, replacing the values with your own:

    OPCHost=https://your-opc-host
    OPCCerts=/path/to/your/certificate.pem
  4. Save and close the file (Ctrl+O, then Ctrl+X).
  5. Register the server with the On-Prem Management Console by running the following command, replacing the placeholder with your join token:

    sudo vncserver-x11 -service -joinopc <your-join-token>
  6. Start the RealVNC Server service:

    sudo systemctl enable --now vncserver-x11-serviced.service

RealVNC Server – macOS

Command line

  1. Download the RealVNC Server for macOS PKG.
  2. Open a terminal and install the package, replacing <vnc-app> with the filename of the PKG you downloaded:

    sudo installer -pkg <vnc-app>.pkg -target /
  3. Open the configuration file:

    sudo nano /etc/vnc/config.d/common.custom
  4. Add the following lines, replacing the values with your own:

    OPCHost=https://your-opc-host
    OPCCerts=/path/to/your/certificate.pem
  5. Save and close the file (Ctrl+O, then Ctrl+X).
  6. Register the server with the On-Prem Management Console by running the following command, replacing the placeholder with your join token:

    sudo /Library/vnc/vncserver -service -joinopc <your-join-token>

Manual install

  1. Download and install the RealVNC Server for macOS PKG.
  2. Close the Licensing Wizard if it appears.
  3. Open a terminal and run:

    sudo nano /etc/vnc/policy.d/common
  4. Add the following lines, replacing the values with your own:

    OPCHost=https://your-opc-host
    OPCCerts=/path/to/your/certificate.pem
  5. Save and close the file (Ctrl+O, then Ctrl+X).
  6. Open a terminal as an administrator and register the server with the On-Prem Management Console by running the following command, replacing the placeholder with your join token:

    sudo /Library/vnc/vncserver -service -joinOpc <your-join-token>
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.