Documentation

On-premise

Running UserView On-Premise

To run UserView on your infrastructure, you'll need to either run a Docker image that contains everything or host the components separately yourself.

If you have fewer than 5,000 Visitors online at any given time and no more than 100 concurrent Sessions, a single server will likely be enough. If you have more, you'll likely need to add more servers and scale UserView horizontally by having a separate Redis cluster.

Pull our image from Docker Hub and run it with the environment variables listed below.

docker run -d \
  -e BASE_ENDPOINT=https://cobrowsing.acmetech.com/ \
  -e LICENSE_KEY=https://api.upscope.io/v1.3/.... \
  -e SECRET_KEY=myrandomsecretkey... \
  -p 5002:5002 \
  upscope/onpremise

See the Configuration section for all available environment variables.

Host MongoDB Connection Issues
MongoDB cannot be listening only to localhost, because the container never uses the loopback network for connection. Set the net.bindIp to listen on 0.0.0.0 in /etc/mongod.conf, or—if it's a security issue—on the Docker network. This is similar for Redis, which should listen to *:6379.

Installing UserView on Your Website

After you run UserView, the output will give you instructions for your JavaScript SDK installation code. It looks like this (notice {BASE_ENDPOINT}):

<script>
  (function(w, u, d){if(typeof u!=="function"){var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};
  w.Upscope=i;var l = function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;
  s.src='{BASE_ENDPOINT}/upscope.js';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};l();}}
  )(window, window.Upscope, document);
  Upscope('init');
  Upscope('getWatchLink', console.log);
</script>

You can add that code to pages like you would with our cloud solution.

Installing UserView in Your Mobile Apps

The iOS, Android, Flutter, and React Native SDKs connect to your on-premise instance when you set the onPremiseBaseEndpoint configuration option to your BASE_ENDPOINT. The SDK then fetches its configuration from {BASE_ENDPOINT}/sdk-config.json and connects to {BASE_ENDPOINT}/session instead of our cloud servers, so the region option is ignored.

let config = UpscopeConfiguration(
    apiKey: "YOUR_API_KEY",
    onPremiseBaseEndpoint: "https://cobrowsing.acmetech.com"
)

try Upscope.shared.initialize(with: config)

Everything else — installation, configuration options, and SDK functions — works exactly like the cloud version.

Your License Key

To run UserView, you'll need to retrieve your license key. The license key can be downloaded to your server or read automatically from our server every time the server starts.

You'll need to enter the license key into the LICENSE_KEY environment variable. The LICENSE_KEY environment variable can be one of:

  • The license key content (note it's multi-line)
  • A file path to the license key content
  • The URL to the license key, the preferred method

If you don't have to restrict the instance's interactions with the internet, entering the URL provided on the dashboard as the LICENSE_KEY environment variable is preferable as you won't need to update it when it expires.

Good to Know
Your JavaScript SDK configuration is also embedded in your license key. This means you can still configure UserView on your dashboard and then restart the server to apply the changes.

Configuration

The following is configurable through environment variables:

Environment VariableDescriptionDefault
BASE_ENDPOINTThe base URL where this component will be mounted. For example, https://cobrowsing.acmetech.com/. It can be in a subdirectory.(nil, required)
LICENSE_KEYYour unique UserView license key (or a link to it).(nil, required)
SECRET_KEYA unique secret key used to sign internal JWTs. It's very important this key is kept safe and it's at least 32 characters long.(nil, required)
AUTH_ENDPOINTURL watch links will be redirected to for authentication.https://app.upscope.io/onprem_redirect/TEAM_IDENTIFIER
HOMEPAGEURL unrecognized requests will be redirected to.https://upscope.com/
LOOKUP_CODE_LENGTHThe number of digits in visitor lookup codes.4
MONGO_URIURI to a single MongoDB instance, or MongoDB clusterIf omitted, mongodb://localhost:27017/upscope. (In Docker this starts MongoDB within the image). If set to an empty string, it will disable MongoDB.
PORTThe port the server will listen on.5002
REDIS_URIURI to Redis or a Redis cluster.redis://localhost:6379. (In Docker this starts Redis within the image).
REST_KEYThe authentication API key for your on-premise REST API. Leave empty to disable the REST API.(nil)
SSL_REDIRECTWhen set to on, the server will automatically redirect all requests to https.off

If you use MONGO_URI=mongodb://localhost/upscope with the Docker image, a MongoDB server will be installed inside the container to serve the application.

If you use redis://localhost/ with the Docker image, a Redis server will be installed inside the container to serve the application.

Session Video Recording

Your on-premise instance can record Sessions and render them to MP4, with the video files never leaving your infrastructure. For recording to work you need:

  1. The session recording feature on your plan. It's embedded in your license key, so if you just added it, re-download the license key (or use the URL form of LICENSE_KEY) and restart the server.
  2. MongoDB (MONGO_URI must not be disabled): Session events used for the replay are stored there.
  3. For Sessions that include browser co-browsing, a separate Chromium container the server can reach over WebSocket. We test with the browserless Chromium image:

Then point your UserView instance at it with BROWSERLESS_ENDPOINT=ws://yourdockerhost:3000?token=mybrowserlesstoken. Sessions made only of screen sharing frames are rendered with ffmpeg directly and don't need the Chromium container (if you run the binaries instead of Docker, make sure ffmpeg is available on the PATH).

After a Session ends, our cloud asks your instance to render the recording (this requires the instance to be linked in your dashboard's on-premise settings) and stores only the resulting URL, which points at your storage.

Recordings can be stored on a local volume (the default) or on S3:

Environment VariableDescriptionDefault
RECORDINGS_STORAGEvolume stores recordings on disk under /recordings (mount a volume there to persist them) and serves them from {BASE_ENDPOINT}/recordings; s3 uploads them to S3 instead.volume
RECORDINGS_S3_BUCKETThe S3 bucket recordings are uploaded to when using s3 storage. Falls back to S3_BUCKET.(nil)
ACCESS_KEY_ID, SECRET_ACCESS_KEY, AWS_REGIONThe AWS credentials used for s3 storage.(nil)
RECORDINGS_BASE_URLThe public base URL recording links point to. Set it when using s3 storage (your bucket or CDN URL).{BASE_ENDPOINT}/recordings
BROWSERLESS_ENDPOINTWebSocket endpoint of the Chromium container used to replay browser Sessions. When unset, only screen sharing Sessions can be recorded.(nil)
RENDER_RECORD_ENDPOINTThe URL the Chromium container loads to render the replay. Override it when your BASE_ENDPOINT is not reachable from that container.{BASE_ENDPOINT}/record

Recording file URLs are not guessable (they contain a UUID), matching the access model of our cloud storage.

Integrating with the Dashboard

To use the UserView dashboard with UserView on-premise, head to your on-prem settings and scroll down to cloud link.

You'll need to enter your BASE_ENDPOINT and your SECRET_KEY, and have an option to enter the email of who should be contacted if we need to reach out quickly if we find a vulnerability we can't patch from remote.

Good to Know
To your Agents, everything will look just like the regular cloud version does, but behind the scenes, their browser will be in direct communication with your instance, so we never touch your Visitors' data.

What Doesn't Work On-Premise?

Although we've made our on-premise version as similar as possible to the original, there are a few missing functionalities. You'll need to use UserView cloud if you are interested in:

  • Integrations with live chat software (other than a simple link in the attributes)
  • Screenshots
  • IP geolocation features
  • Audio/video communication

Usage Without MongoDB

We are aware some of our customers cannot use MongoDB due to compliance reasons.

UserView works fine without MongoDB, but the Search feature will be limited. You'll still be able to search by:

  • Lookup code
  • Email
  • Unique ID
  • Integration IDs