.. Reminder for header structure:
  Parts (H1)          : #################### with overline
  Chapters (H2)       : ******************** with overline
  Sections (H3)       : ====================
  Subsections (H4)    : --------------------
  Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^
  Paragraphs (H6)     : """""""""""""""""""""

.. meta::
  :description: Installing WAPT Server on Windows
  :keywords: WAPT, installing, Windows

.. |date| date::

.. role:: red

.. _base_windows_server_install:

#################################
Installing WAPT Server on Windows
#################################

******************
To read beforehand
******************

* Installing WAPT on a **Linux server is the recommended method**, unless you are trialing WAPT and you are not familiar with Linux. 
  Due to a limitation of Nginx server on Windows, **the maximum number of support agents on a Windows WAPTserver is 200 agents**.
   
* The WAPT Server can not be installed on a computer with services already listening on port 443 (example WSUS with IIS). Port 443 is used by the WAPT Server and **MUST** be available. If port 443 is already occupied by another web service, you should take a look at the Microsoft official documentation for changing the default ports on Windows.

* The WAPT Server **will not run** on a x86 version of Windows and fresh :red:`Windows version currently supported by Microsoft`. The server component of WAPT works just as well on a win10 client VM or a physical host as it does on a Windows server version.

* The installation of the WAPT Server **MUST** be done using a :red:`Local Administrator` account on the host and **NOT a Domain Administrator** account.

* :program:`Nginx` is the **ONLY** supported web server with WAPT. **Apache or IIS (with or without WSUS) are NOT supported in WAPT**.

* In case of problems when installing WAPT, visit the :ref:`Frequently Asked Questions <wapt_faq>`.

**********************
Installing WAPT server
**********************

.. warning::

  The post-configuration script rewrites the nginx configuration.
  If you use a special configuration, save your :file:`nginx.conf` file with the command:

  .. code-block:: bash

    copy C:\wapt\waptserver\nginx\conf\nginx.conf C:\wapt\waptserver\nginx\conf\nginx.conf.old

  It will be necessary to overwrite the configuration after the post-configuration with the command:

  .. code-block:: bash

    copy C:\wapt\waptserver\nginx\conf\nginx.conf.old C:\wapt\waptserver\nginx\conf\nginx.conf

* Download and execute |waptserversetup_exe|.

* Choose the language for the WAPT installer.

.. image:: wapt-resources/wapt_deploy_choose-language_dialog-box.png
  :align: center
  :alt: Choosing the language for deploying the WAPT installer

* Click on :guilabel:`OK` to go on to the next step.

.. image:: wapt-resources/wapt_deploy_accept-license_dialog-box.png
  :align: center
  :alt: Accepting the WAPT license terms

* Accept the licence terms and click on :guilabel:`Next` to go to next step.

* Choose additional configuration tasks (leave the default if not sure).

.. figure:: wapt-resources/wapt_deploy_additional-configuration-server_dialog-box.png
  :align: center
  :alt: Choosing the installer options for deploying the WAPT Serer

  Choosing the installer options for deploying the WAPT Server

* Choose the password for the WAPT Server.

.. image:: wapt-resources/wapt_deploy_choosing-password_dialog-box.png
  :align: center
  :alt: Dialog box for changing the password

* Click on the :guilabel:`Install` to launch the installation, wait for the installation to complete.

.. image:: wapt-resources/wapt_deploy_installation-in-progress_dialog-box.png
  :align: center
  :alt: Dialog box showing the WAPT installation in progress

* Click on :guilabel:`Finish` to close the window.

.. image:: wapt-resources/wapt_deploy_installation-completed_dialog-box.png
  :align: center
  :alt: Installation has finished

.. attention::

  * **For security, do not run the WAPT Console or your WAPT package development tool on the WAPT Server.**

  * The WAPT Server on Windows **includes the WAPT Agent**.
    It is not necessary to install the WAPT Agent to manage the WAPT Server on Windows.

Your WAPT Server is now ready.
You may now go to the documentation on :ref:`Installing the WAPT management Console <installing_the_WAPT_console>`.
