Skip to content

Web Server Module

Alexander Smirnov edited this page Feb 19, 2021 · 3 revisions

Updated for V2.0.0

Web server is a built-in module that provides an access to a series of web pages required to authenticate or setup other modules. Everything that requires authentication through CCP services will also require a web server.

RELATED CONFIG SECTIONS

  • webServerModule

SETUP

  1. Open config file settings.json
  2. Find config section WebServerModule and set WebExternalIP/WebExternalPort properties. This will be your IP/Domain address and port to access ThunderED web server. By default HTTP protocol use port 80 and HTTPS protocol use port 443.
  3. Set CcpAppClientId and CcpAppSecret from the CCP application you created during setup process.
  4. Configure your OS /Docker/Router so the specified IP:PORT combination is accessible from the internet. If everything is set correctly then you will see initial web page by following the IP:PORT address.
  5. (Optional) You can enable UseHTTPS property to enable HTTP protocol through SSL. Keep in mind that you will need password protected SSL certificate (*.pfx) bound to your domain for this mode to work. You can specify certificate data using the CertificatePath and CertificatePassword properties.

WARNING: If you use Digital Ocean hosting you should add firewall rule to accept connections on specified port as all ports in there are closed by default.

FAQ for V1.4.2

DESCRIPTION

Web server is a built-in module that provides an access to a series of web pages required to authenticate or setup other modules. You will need it for the following modules: ModuleAuthWeb, ModuleNotificationFeed, ModuleTimers, ModuleMail, ModuleHRM, ModuleContractNotifications, ModuleWebConfigEditor, ModuleIndustrialJobs, etc.

RELATED CONFIG SECTIONS

  • webServerModule

SETUP

  1. Open config file settings.json
  2. Enable following modules: "ModuleWebServer": true
  3. Find config section WebServerModule and set WebExternalIP/WebExternalPort properties. This will be your IP/Domain address and port to access ThunderED web server.
  4. Set CcpAppClientId and CcpAppSecret from the CCP application you created during setup process.
  5. Configure your OS /Docker/Router so the specified IP:PORT combination is accessible from the internet. If everything is set correctly then you will see initial web page by following the IP:PORT address.

TROUBLESHOOTING

Console log spams "Starting Web Server" message

This behavior means that bot app can't initialize built-in web server using the settings specified in settings.json file. Usually it means that specified port is being used by another application or is closed by your OS/router/provider/whatever. If your host machine don't have direct access to your internet IP (e.g. you use router hardware) may be it is wise to configure port forwarding to route requests from you external IP:PORT to internal network IP:PORT available to your host machine.

WARNING: If you use Digital Ocean hosting you should add firewall rule to accept connections on specified port as all ports in there are closed by default.