--- layout: default navsection: installguide title: Install the websocket server ... {% comment %} Copyright (C) The Arvados Authors. All rights reserved. SPDX-License-Identifier: CC-BY-SA-3.0 {% endcomment %} The arvados-ws server provides event notifications to websocket clients. It can be installed anywhere with access to Postgres database and the Arvados API server, typically behind a web proxy that provides SSL support. See the "godoc page":http://godoc.org/github.com/curoverse/arvados/services/ws for additional information. # "Update config.yml":#update-config # "Update nginx configuration":#update-nginx # "Install arvados-ws package":#install-packages # "Start the service":#start-service # "Restart the API server and controller":#restart-api # "Confirm working installation":#confirm-working h2(#configure). Update config.yml Edit the cluster config at @/etc/arvados/config.yml@ and set @Services.Websocket.ExternalURL@ and @Services.Websocket.InternalURLs@. Replace @zzzzz@ with your cluster id.
    Services:
      Websocket:
        InternalURLs:
	  "http://localhost:8005": {}
        ExternalURL: wss://ws.ClusterID.example.com/websocket
h2(#update-nginx). Update Nginx configuration The arvados-ws service will be accessible from anywhere on the internet, so we recommend using SSL for transport encryption. Use a text editor to create a new file @/etc/nginx/conf.d/arvados-ws.conf@ with the following configuration. Options that need attention are marked with "TODO".
upstream arvados-ws {
  server                127.0.0.1:8005;
}

server {
  listen                *:443 ssl;
  server_name           ws.ClusterID.example.com;

  proxy_connect_timeout 90s;
  proxy_read_timeout    300s;

  ssl                   on;
  ssl_certificate       /TODO/YOUR/PATH/TO/cert.pem;
  ssl_certificate_key   /TODO/YOUR/PATH/TO/cert.key;

  location / {
    proxy_pass          http://arvados-ws;
    proxy_set_header    Upgrade         $http_upgrade;
    proxy_set_header    Connection      "upgrade";
    proxy_set_header    Host            $host;
    proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}
{% assign arvados_component = 'arvados-ws' %} {% include 'install_packages' %} {% include 'start_service' %} {% include 'restart_api' %} h2(#restart-api). Restart the API server and controller After adding the SSO server to the Services section, make sure the cluster config file is up to date on the API server host, and restart the API server and controller processes to ensure the changes are applied.
# systemctl restart nginx arvados-controller
h2(#confirm). Confirm working installation Confirm the service is listening on its assigned port and responding to requests.
~$ curl https://ws.ClusterID.example.com/status.json
{"Clients":1}