Quick start
Build the server and client from the same source commit and use the matching templates. Build from source
Start with a dedicated empty database or SQLite data directory. Generate a new deployment root and Tunnel CA. Give each client an empty identity directory and enroll it again in the console. For pre-issued PEM deployment, download a certificate ZIP issued by the new gateway. Keep earlier database state, backups, and certificates with the original deployment.
Generate the root CA
In an offline signing environment, use OpenSSL 3.5 or later to generate the ML-DSA-87 root certificate root.pem and the PKCS#8 private key root.key. Then use the Tunnel server binary to issue the online Tunnel CA. Use new directories for offline-root and pki. Windows commands
(
umask 077
mkdir ./offline-root &&
openssl req -x509 -newkey ML-DSA-87 -noenc -days 3650 \
-subj '/CN=Tunnel Root CA' \
-addext 'basicConstraints=critical,CA:TRUE,pathlen:1' \
-addext 'keyUsage=critical,keyCertSign,cRLSign' \
-addext 'subjectKeyIdentifier=hash' \
-keyout ./offline-root/root.key -out ./offline-root/root.pem &&
./server init-pki --pki ./pki --offline-root ./offline-root
)Tunnel CA certificate
Copy root.pem, issuer.pem, and issuer.key from pki/ to the server. Keep offline-root/root.key offline. Distribute the public root.pem to clients through a trusted channel. On first startup, the server imports the online PKI into its database and uses the Tunnel CA to sign gateway and device certificates. Certificate rotation
Start the server
Save the example as server.yml and set the gateway DNS name or IP address that clients connect to. This example uses SQLite. Save a 12–256 byte initial administrator password in the UTF-8 file admin-password.txt beside the configuration and restrict access to the server account. Password settings
host: api.tunnel.example.com
database: sqlite
managed_pki_seed: ./pki
admin_password_file: ./admin-password.txt./server --config ./server.yml runOpen http://SERVER_ADDRESS:9650/ from the deployment network and sign in as admin. Public browsers use the Nginx HTTPS site. The two built-in roles are Administrator (admin) and User (user). A fresh installation creates only the administrator account admin. The administrator creates users as needed. After initialization, you can remove the initial password settings. Later starts use the stored password hash. HTTPS reverse proxy
To give other users access, open System → Accounts and Permissions, create their accounts, and configure and enable the user role. The role is disabled by default and starts with no grants. Accounts and permissions
Configure and add a client
Open Clients → List, add a direct client, and copy its registration key. Place the public root certificate in the client's cert/ directory. Save the configuration below as client.yml. You can also provide the key through TUNNEL_CLIENT_KEY. Client identity
endpoint: "tls://api.tunnel.example.com:9651"
web_endpoint: "https://api.tunnel.example.com:9650"
root: cert/root.pem
client_key: "client-key-from-console"./client --config ./client.yml verify
./client --config ./client.yml runThe client verifies the gateway with the root, generates its device private key and CSR locally, and obtains the device certificate and transport token over PQC HTTP/3 on 9650/UDP. Certificates use ML-DSA-87 and key exchange uses MLKEM1024. The TLS cipher suite is TLS_AES_256_GCM_SHA384. The client then connects to 9651/TCP. The default KCP relay uses the control host at 9654/UDP. Once the client is online, test a mapping from an actual access client. Verify a mapping
If the gateway is temporarily unreachable or returns HTTP 503, the client retries initial enrollment or transport token retrieval with backoff. Use client status to check the process or client stop to stop it. The client stores its runtime identity in its data directory. For pre-issued ZIP deployment, configure the three PEM files in the ZIP. MQTT clients use the app.yml and credentials from their complete ZIP. MQTT access