Configuring Ports
Define which services your app exposes for remote access by creating a port-template.yml file in the .ironflock/ directory.
Basic Example
ports:
- name: Web Interface
port: 5000
main: true
protocol: httpsThis makes port 5000 available for remote access. Users can enable the tunnel from the app settings on their device.
Full Example
ports:
- name: Web Interface
port: 1100
main: true
protocol: http
remote_port_environment: TUNNEL_PORT
- name: Video Stream
port: 1200
protocol: http
- name: Remote Desktop
port: 5900
protocol: tcp
remote_port_environment: VNC_REMOTE_PORT
- name: LoRaWAN Gateway
port: 1700
protocol: udpField Reference
| Field | Required | Description |
|---|---|---|
name | Yes | Label shown in the device’s app settings |
port | Yes | Local port number the service listens on |
main | No | If true, this port is used for the quick-access icon on the device’s app list |
protocol | No | http (default), https, tcp, or udp |
remote_port_environment | No | Environment variable name where the remote port number will be stored (TCP and UDP only) |
How Protocols Work
HTTP / HTTPS
For web-based services. IronFlock creates a public URL that proxies traffic to the device’s local port. Users open the URL in their browser.
TCP
For protocols like VNC (Remote Desktop) or direct socket connections. IronFlock allocates a remote port and stores it in the environment variable specified by remote_port_environment.
UDP
For protocols like LoRaWAN communication or VPN tunnels. Similar to TCP — a remote port is allocated and exposed via an environment variable.
Embedding in Boards
You can embed a device’s remote access tunnel directly into a board using the Embed Widget. This creates a seamless experience where users can:
- Monitor global data from all devices
- Interact with individual devices through embedded web UIs
All within the same dashboard.
Configuring remote access in
port-template.ymldoes not automatically activate tunnels. Only privileged users can enable or disable tunnels on their devices.