Thingsboard Apache proxy settings

The default installation of the Thingsboard IoT software presents its client interface and dashboards on port 8080. To make it available on the standard HTTP port 80 I use an Apache2 virtual host with these reverse proxy settings. These settings assume your Thingsboard installation is visible on and you want to make it available on Note that, as well as a reverse proxy for the HTML, you’ll also need one for the websockets which are used to deliver data. You’ll need to have the Apache2 mod_proxy installed and you’ll have to enable both mod_proxy and mod_proxy_wstunnel.

# Proxy to
<VirtualHost *:80>

        # close off proxying while allowing reverseproxy
        ProxyRequests Off
        # pass header information through to the proxied host
        ProxyPreserveHost On

        # mod_proxy_wstunnel for the data websockets
        ProxyPass "/api/ws/" "ws://"
        ProxyPass "/api/ws/" "ws://"

        # mod_proxy for the vanilla HTML requests
        ProxyPass "/" ""
        ProxyPassReverse "/" ""

        LogLevel warn
        ErrorLog ${APACHE_LOG_DIR}/things.error.log
        CustomLog ${APACHE_LOG_DIR}/things.access.log combined

Leave a Comment