The goal of this system (the HPC Gateway with Rathole) is to make local services hosted on private compute nodes (which are not directly connected to the Internet) accessible via a secure public address.
The main objectives are:
gatewaypoc.hpc.unige.ch) and a specific port for each service, instead of managing complex IP addresses or advanced network configurations.In summary: It is a secure bridge that allows remote access to powerful but isolated computing services.
All services exposed through this Proof of Concept are accessible via the single address:
https://gatewaypoc.hpc.unige.ch
The final access port is specified in the Rathole configuration file (e.g., `rathole.client.toml`) provided by the HPC team. It is indicated as a comment at the beginning of the file.
Before any technical configuration, you must follow these steps:
1. Contact the HPC Team: Send an email to [support email] with the following information:
2. Validation: The HPC team will validate your request. 3. SSL Configuration:
Once authorized, you must install and configure Rathole on your compute node.
Rathole is available via the cluster's environment modules. Load it with the following command:
ml rathole
Verify that the command is available:
which rathole
The HPC team will provide you with a client configuration file (rathole.client.toml). This file contains two crucial pieces of information:
Here is an example of the file you will receive:
## https://gatewaypoc.hpc.unige.ch:1200 [client] # HPC Gateway address (Rathole connection port) remote_addr = "gatewaypoc.hpc.unige.ch:2333" [client.services.sagon_lm_studio] # Unique authentication token provided by the HPC team token = "61d4d8fdc96e641140ddf66******************6e9d733b0ce95bd21" # Protocol type (tcp for most web/API services) type = "tcp" # Local address where your service listens on the compute node # IMPORTANT: Your service MUST listen on this port (here 11200). local_addr = "127.0.0.1:11200"
Field Explanations:
## https://gatewaypoc.hpc.unige.ch:1200: This is the final URL to use to access your service. The port 1200 is the public exposure port.remote_addr: Points to the HPC Gateway.token: Secret key to authenticate your tunnel. Do not share this token.local_addr: The IP address and port on which your service runs on the compute node.local_addr (here 11200). This port is not used by end users, but is used for the internal tunnel.Run Rathole with the provided configuration file:
rathole rathole.client.toml
Check the logs to ensure the connection is established successfully (look for messages indicating “connected” or “listening”).
Your service is now accessible via the URL indicated in the comment of the configuration file.
*Example: If the file contains `## https://gatewaypoc.hpc.unige.ch:1200`, the URL will be:* https://gatewaypoc.hpc.unige.ch:1200
Script to launch the tunnel and lm-studio:
# start rathole tunnel and lm-studio ml purge ml LMStudio/0.4.26 rathole/0.5.0 rathole --client client.toml & lm-studio --no-sandbox