The remote conenction proxy server for the nymea cloud.
 
 
 
 
 
 
Go to file
jenkins 9ca21017e3 Jenkins release build 1.14.2 2026-02-19 12:13:00 +01:00
common Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
debian-qt5 Jenkins release build 1.14.2 2026-02-19 12:13:00 +01:00
debian-qt6 Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
docs First working connection mechanism for tunnel proxy 2021-08-03 19:52:00 +02:00
libnymea-remoteproxy Fix missing include in the UnixSocketServer 2026-01-12 11:45:13 +01:00
libnymea-remoteproxyclient Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
monitor Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
server Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
tests Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
tunnelclient Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
.gitignore Update .gitignore 2025-12-02 09:45:29 +01:00
COPYING Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
COPYING.LESSER Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
LICENSE.GPL3 Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00
LICENSE.LGPL3 Updatet copyright 2020-01-23 00:40:33 +01:00
README.md Update README.md 2025-12-02 09:48:31 +01:00
debian Add Qt6 debian packaging 2025-08-07 11:23:26 +02:00
generate-coverage.sh Remove deprecated proxy functionality and clean up code 2023-10-24 13:39:15 +02:00
nymea-remoteproxy-logging.conf Remove deprecated proxy functionality and clean up code 2023-10-24 13:39:15 +02:00
nymea-remoteproxy.conf Remove deprecated proxy functionality and clean up code 2023-10-24 13:39:15 +02:00
nymea-remoteproxy.pri Add Qt6 support 2025-08-04 15:32:45 +02:00
nymea-remoteproxy.pro Remove deprecated proxy functionality and clean up code 2023-10-24 13:39:15 +02:00
version.h.in Update license text and add SPDX identifier 2025-12-02 09:48:35 +01:00

README.md

nymea remote proxy server

The nymea remote proxy server acts as the rendezvous point between nymea servers and nymea clients and provides a secure tunnel to reach devices that sit behind NAT or firewalled networks.

Features

  • Secure TLS-protected tunnels between nymea instances.
  • JSON-RPC based control plane with optional monitoring interface.
  • Usable as system service or launched from a build tree for development.

Requirements

To build the proxy from source, install the Qt development packages and the helper tools that produce the Debian packages:

sudo apt install debhelper dpkg-dev pkg-config qt6-base-dev qt6-base-dev-tools \
                 qt6-websockets-dev libncurses5-dev

Build from source

cd nymea-remoteproxy
mkdir -p build && cd build
qmake ../
make -j$(nproc)

The resulting binaries and libraries will be available in the build directory. When running directly from there, the helper libraries must be discoverable:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/libnymea-remoteproxy:$(pwd)/libnymea-remoteproxyclient
./server/nymea-remoteproxy -c ../nymea-remoteproxy/nymea-remoteproxy.conf

Install

From repository

Official nymea packages are available:

sudo apt install nymea-remoteproxy nymea-remoteproxy-tunnelclient nymea-remoteproxy-monitor

The installation starts the nymea-remoteproxy.service systemd unit and also installs a test client.

From build directory

sudo make install

Configuration

The package ships /etc/nymea/nymea-remoteproxy.conf which can be used verbatim or as a template:

[ProxyServer]
name=nymea-remoteproxy
writeLogs=false
logFile=/var/log/nymea-remoteproxy.log
logEngineEnabled=false
monitorSocket=/tmp/nymea-remoteproxy-monitor.sock
jsonRpcTimeout=10000
inactiveTimeout=8000

[SSL]
enabled=false
certificate=/etc/ssl/certs/ssl-cert-snakeoil.pem
certificateKey=/etc/ssl/private/ssl-cert-snakeoil.key
certificateChain=

[UnixSocketServerTunnelProxy]
unixSocketFileName=/run/nymea-remoteproxy.socket

[WebSocketServerTunnelProxy]
host=127.0.0.1
port=2212

[TcpServerTunnelProxy]
host=127.0.0.1
port=2213

Test coverage

To generate a line coverage report:

  • Run qmake CONFIG+=coverage and execute the tests to produce the .gcno/.gcda data.
  • Install tooling and generate the HTML report:
sudo apt install lcov gcovr
./create-coverage-html.sh

The HTML output lives in coverage-html/.

Testing a local server

You can experiment with a local instance by issuing a self-signed certificate and pointing the proxy to it.

sudo apt update
sudo apt install nymea-remoteproxy nymea-remoteproxy-tunnelclient

After installation the daemon starts automatically using /etc/nymea/nymea-remoteproxy.conf, which you can adapt for local testing. Create a throwaway certificate:

cd /tmp
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
        -keyout test-proxy-certificate.key \
        -out test-proxy-certificate.crt
sudo cp test-proxy-certificate.crt /etc/ssl/certs/
sudo cp test-proxy-certificate.key /etc/ssl/private/

Adjust the config:

certificate=/etc/ssl/certs/test-proxy-certificate.crt
certificateKey=/etc/ssl/private/test-proxy-certificate.key

Restart manually for verbose output:

sudo systemctl stop nymea-remoteproxy.service
sudo nymea-remoteproxy -c /etc/nymea/nymea-remoteproxy.conf --verbose

License

The nymea-remoteproxy server, monitoring tools, and tunnel client are distributed under the terms of the GNU General Public License version 3.

The reusable libraries located in libnymea-remoteproxy and libnymea-remoteproxyclient are provided under the GNU Lesser General Public License version 3 (or later). See LICENSE.GPL3 and LICENSE.LGPL3 for the full texts.