> For the complete documentation index, see [llms.txt](https://gsfcorp.gitbook.io/macula/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gsfcorp.gitbook.io/macula/administration-guide-v1.34.0/web-client-setup.md).

# Web Client Setup

The Web Client lets users watch live video, play back and export recorded video, and check channel status in a web browser, for the channels their user account can access. It is served by the Macula Streaming Server, which is part of every Macula server. The Web Client itself is described in the Web Client User Guide, provided as a separate document. This section covers the server setup it needs, and how to give users access.

#### Web Client Address

Once the server is set up, the Web Client is available at:

* *\<Server IP>:\<HTTP port>*

Starting with Macula version 1.34.0, this address opens the new Web Client. The previous Web browser interface remains available at:

* *\<Server IP>:\<HTTP port>/old*

#### Server Connection Settings

The Web Client uses the server's HTTP port, or its HTTPS port if secure connections are enabled. To set them up:

1. In Macula Console, go to *Configuration* -> *Servers* and double-click the server.
2. Select *Connections* on the left.
3. Check the *HTTP port*. The default is 8080.

   <figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FIeVG4alep15DDAx5rF5H%2Fimage.png?alt=media&amp;token=0e3e4335-9c6d-4e62-9224-47c184f79841" alt=""><figcaption></figcaption></figure>
4. To use a secure connection, select *Enable HTTPS*. In *HTTPS* port, enter a port different from the HTTP port.
5. Next to *Digital certificate*, click Change. Choose a certificate from the list of available digital certificates or click *New digital certificate* to add one. Until a certificate is chosen, an error mark is shown next to the field.
6. Click *OK* to save.

   <figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2Fu3sfKiS0i0eGtWRqAA95%2Fimage.png?alt=media&amp;token=293f1ea1-85ce-4d1e-b2a4-312413b02903" alt=""><figcaption></figcaption></figure>

For HTTPS you can use your own certificate signed by a trusted authority, which is recommended, or generate a self-signed one in Macula Console. With a self-signed certificate, browsers show a security warning. If you use your own CA certificate, apply it as a .pem file containing the full certificate chain, together with your key.

{% hint style="warning" %}
In a Macula Enterprise system, also enable HTTPS on each Macula Recording Server, in that server's settings. Add the certificate once, then choose it from the list on each Recording Server.
{% endhint %}

{% hint style="warning" %}
Make sure the HTTP or HTTPS port is open in the server firewall, forwarded on any intermediate network equipment where needed, and not used by another application on the server.
{% endhint %}

{% hint style="warning" %}
If users sign in with AD/LDAP accounts, enable HTTPS for better security.
{% endhint %}

For all connection settings, see Server Settings and Security.

To check the setup, open a browser on a computer in the same network and go to *\<Server IP>:\<HTTP port>*. The Web Client connection page opens.

#### Allowing and Preventing Access

Access to the Web Client is set per user, with the *Login via HTTP* permission. A user without it cannot sign in to the Web Client. The same permission also allows HTTP API connections, so removing it stops that user's API logins too.

To make the Web Client unavailable on a server altogether, set *HTTP port* to 0 and leave *Enable HTTPS* cleared.

{% hint style="warning" %}
With *HTTP port* set to 0 and *Enable HTTPS* cleared, the server accepts no HTTP or HTTPS connections at all, not only from the Web Client. Macula Mobile, HTTP API connections, and the services that use the API, such as License Plate Recognition and Face Recognition modules, are disconnected too.
{% endhint %}

#### Creating a User for the Web Client

1. In Macula Console, go to *Configuration* -> *Users* and create a user, as described in Add Users and User Groups.
2. In the user properties, open *Administration profile* and, under *Client permissions*, enable *Login via HTTP (includes HTTPS)*.
3. Select *Resources* on the left and, on the *Permissions* tab, grant the channels the user should see:
   1. *View live video*: live view
   2. *Video playback*: recorded video
   3. *Control PTZ*, *Use PTZ presets*, *Use PTZ tours*: PTZ control
4. Click *OK*.

The built-in administrator has access to all resources. Channel and channel group permissions can also be changed in the *Channels* section: double-click the channel or group and open the *Permissions* tab.

AD/LDAP users sign in with *domain.name\user.name*. The field is not case-sensitive.

To let users sign in with Google, Apple ID, Microsoft account, Okta or a custom OAuth service, set up an authentication provider and create a *New OAuth 2.0 user*, as described in Third Party Authentication Providers.

Once an OAuth user exists, the Web Client connection page offers both *Internal user account* and *OAuth 2.0*.
