.. 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
   :class: red-text

.. _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.

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

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

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

* Choose the password for the WAPT Server.

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

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

.. image:: wapt-resources/waptserverexe.gif
  :align: center
  :alt: waptserver.exe

.. 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>`.
