.. title:: Listening Port Listening Port -------------- By default the Kasm Web Application will run on port ``443``. Administrators may which to change this for various reasons. .. note:: If Kasm will be deployed behind an reverse proxy, please consult the :doc:`Reverse Proxy Guide ` for additional configurations steps. Change Port During Installation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you would like to run the Web Application on a different port pass the ``-L`` flag when calling the installer. .. code-block:: Bash sudo bash kasm_release/install.sh -L 8443 Change Port Post Installation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In this example we will update the **Single Server** deployment to utilize port ``8443``. .. warning:: Changing the port of an existing installation will make existing sessions inaccessible. Administrators should destroy all existing sessions prior to making this change. * Log into the Kasm UI as an administrator. 1. Log into the Kasm UI as an administrator. 2. Select Zones. 3. Select **Edit** next to each Zone. 4. Change the **Proxy Port** setting to the desired value. (e.g ``8443``) 5. Click Submit. .. figure:: /images/zones/proxy_port_change.png :width: 80% :align: center **Proxy Port Zone Configuration** * Stop All Kasm services. .. code-block:: bash sudo /opt/kasm/current/bin/stop * Update the ``agent.app.config.yaml`` with the desired port. .. code-block:: bash sudo sed -i "s/public_port.*/public_port: 8443/g" /opt/kasm/current/conf/app/agent.app.config.yaml * (Optional) Verify the changes with the following command. .. code-block:: bash sudo grep public_port /opt/kasm/current/conf/app/agent.app.config.yaml public_port: 8443 public_port: 8443 * Update the Kasm Nginx proxy configuration to listen on the desired port. .. code-block:: bash sudo sed -i "s/listen.*/listen 8443 ssl ;/g" /opt/kasm/current/conf/nginx/orchestrator.conf * (Optional) Verify the changes with the following command. .. code-block:: bash sudo grep listen /opt/kasm/current/conf/nginx/orchestrator.conf listen 8443 ssl ; * Update the ``docker-compose.yaml`` to export the desired port for `kasm_proxy` container. .. code-block:: bash sudo sed -i "s/- \"443:443\"/- \"8443:8443\"/g" /opt/kasm/current/docker/docker-compose.yaml * (Optional) Verify the changes with the following command. .. parsed-literal:: sudo grep kasm_proxy -A5 /opt/kasm/current/docker/docker-compose.yaml container_name: kasm_proxy image: "kasmweb/nginx:latest" ports: - "8443:8443" networks: - kasm_default_network * Remove the ``kasm_proxy`` container so it can be recreated using the updated port mapping. .. code-block:: bash sudo docker rm -f kasm_proxy * Start All Kasm services. .. code-block:: bash sudo /opt/kasm/current/bin/start * Log into the Kasm UI. Create a new Kasm Session to verify configurations.