# Advanced Configuration

# Different Port

As mentioned earlier, the default port the TS3 Manager is listening on is port 3000. You can set an environment variable PORT to change this behavior.

# Windows

Open up a powershell window and set the environment variable PORT for example to 8080.

$env:PORT=8080

The environment variable is only available in the current powershell session. So you have to start the ts3-manager-windows.exe inside that session.

Path\To\The\Executable\ts3-manager-windows.exe

# Mac And Linux

Open the terminal and set the environment variable and enable the variable by exporting it.

PORT=8080
export PORT

The environment variable is only available in the current terminal session. So you have to start the executable inside that session.

Path/To/The/Executable/ts3-manager-linux

# Reverse Proxy

The TS3 Manager is only accessible over HTTP. To make the app available over HTTPS you need to set up a reverse proxy (e.g. Apache or NGINX). There are tons of guides on the internet how to setup a reverse proxy with free ssl certificate. Below is just an example vhost file for Apache. Pay attention how the websocket connection is handled. If the websocket connection is not handled correctly the app will be using long-polling via AJAX as fallback, which is less efficient than websockets.

<IfModule mod_ssl.c>
  <VirtualHost *:443>
    ServerName ts3-manager.example.com
    ServerAdmin webmaster@example.com

    # Reverse Proxy enabled. See https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html
    ProxyPass "/" "http://127.0.0.1:3000/"
    ProxyPassReverse "/" "http://127.0.0.1:3000/"

    # Rules for handling websockets behind the proxy
    RewriteEngine On
    RewriteCond %{REQUEST_URI}  ^/socket.io            [NC]
    RewriteCond %{QUERY_STRING} transport=websocket    [NC]
    RewriteRule /(.*)           ws://127.0.0.1:3000%{REQUEST_URI} [P,L]

    # Certificates
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/ts3-manager.example.com/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/ts3-manager.example.com/privkey.pem
  </VirtualHost>
</IfModule>