Publish a Remote Desktop
This guide opens a Windows desktop in the browser, step by step, and checks every step on the way: someone signs in at your identity provider and gets the desktop of a server on the office network, without an RDP program and without a network path to the server. It takes about ten minutes once a portal is running. For a Linux terminal over SSH or a VNC screen, see SSH terminal and VNC screen.
The example adds the desktop of the Windows server 192.168.1.30 to the
portal portal.example.com, under https://portal.example.com/desktop/.
Before you start
- A portal that is already served, with its hostname, DNS record and certificate in place. If you have none yet, follow Publish a web application up to step 3 and come back here: the desktop is one more application of that portal.
- A current agent on the portal's gateway asset: an older agent refuses portals with remote desktop applications, and the portal's Gateway status says why.
- The gateway asset reaches
https://dl.xplicittrust.com. It opens the RDP connection with guacd, the program that speaks RDP, SSH and VNC for the browser. You install nothing for it: the agent downloads guacd (about 12 MB) when the application you add in step 2 reaches it. Without internet access, see the options for a Linux asset or the asset container image. -
The
guacdaccount exists on a Linux asset installed from the tar.gz (the deb and rpm packages create it):id guacd || sudo useradd -r -U -M -d /var/empty -s /sbin/nologin guacd -
A Windows server with Remote Desktop on (Settings → System → Remote Desktop), and Network Level Authentication on, which is the default. The gateway asset refuses servers that offer neither NLA nor TLS, because their identity cannot be verified. The account that signs in is an administrator, or a member of the Remote Desktop Users group.
- A path from the gateway asset to the server's RDP port, 3389. The server needs no agent and no public address, only this one connection.
1. Check that the gateway asset reaches the server
On the gateway asset, run
timeout 3 bash -c '</dev/tcp/192.168.1.30/3389' && echo reachable
It prints reachable. If it does not, a firewall between them, or the
Windows firewall on the server, blocks the port.
2. Add the application
Open the portal, choose Edit and, on the Applications tab, Add application:
| Setting | Example |
|---|---|
| Name | Finance PC: what people see on the page and in the list of applications; empty shows 192.168.1.30:3389 |
| Path prefix | /desktop |
| Trust level | identity |
| Upstream | rdp://192.168.1.30 |
As soon as the upstream starts with rdp://, the application shows the
Remote desktop (RDP) settings. For this guide:
| Setting | Example |
|---|---|
| Username, Domain, Password | empty: everyone signs in with their own Windows account |
| Certificate fingerprints | empty: step 5 pins the certificate |
| Default keyboard layout | empty: every session starts with the layout of the browser's language, and each person can change it in the session |
| Copy from the session, Paste into the session | on |
| File upload, File download | off |
| Idle timeout (minutes) | empty: 30 minutes |
All settings are described in Remote desktop settings.
To have the gateway asset sign in by itself instead, for a shared service account for example, fill in Username, Domain and Password. People then never see the credentials, and the password never leaves the gateway asset.
Save. Within a few seconds the gateway asset picks up the new application and, for the first remote desktop application, downloads guacd, which takes a few seconds more on a usual connection. The portal's Gateway status shows Ready (guacd 1.6.1) once it is installed; until then a session shows The gateway is still installing the remote desktop service. Try again in a minute.
3. Grant the desktop with a policy
The application belongs to the portal, so the policy that grants the portal grants the desktop as well. If only some of its users may open the desktop, narrow the application with Allowed user groups, for example to IT Admins. Allowed user groups never grant on their own: the user also needs a policy that grants the portal. See Policies.
4. Open the desktop
- Open
https://portal.example.com/desktop/in a browser, on a device without the agent. You are sent to your identity provider, as for anyidentityapplication. - After signing in, the page asks for the Windows username, then the password.
- The Windows desktop opens in the browser tab and follows the size of the window.
On a device with the agent connected, the identity provider login is skipped; the Windows login is still asked for.
While the desktop is open, the portal's detail page lists the session under Remote desktop sessions, with your name, the server and the Windows account. The gateway asset's session limits are set there too; see Open sessions and session limits.
5. Pin the server's certificate
At the first session the gateway asset trusted the certificate the server presented, and it refuses any other certificate from now on. Make sure it was the right one:
- Open the portal's detail page. Under Remote desktop targets the server is listed as Trusted on first use, with the SHA-256 fingerprint of its certificate.
-
On the Windows server, in PowerShell as administrator, print the fingerprint of the certificate Remote Desktop uses:
PowerShell snippet: fingerprint of the Remote Desktop certificate
$hash = (Get-CimInstance -Namespace root/cimv2/TerminalServices ` -ClassName Win32_TSGeneralSetting -Filter "TerminalName='RDP-Tcp'").SSLCertificateSHA1Hash $cert = Get-ChildItem Cert:\LocalMachine -Recurse | Where-Object Thumbprint -eq $hash | Select-Object -First 1 ([Security.Cryptography.SHA256]::Create().ComputeHash($cert.RawData) | ForEach-Object { $_.ToString('x2') }) -join ':' -
If both fingerprints are the same, choose Pin. The fingerprint is now part of the application, and the target shows as Pinned.
If they differ, do not pin: something between the gateway asset and the server presented its own certificate. Find out what before anyone signs in again. More on this in Target identity.
Verify
- Close the browser tab, or sign out of Windows.
- In the event log, the session shows as
web_app_desktop_session_startedandweb_app_desktop_session_ended, with the user, the Windows account they typed, the server, the duration and the end reasonclosed. - Test that access really ends: open the desktop again, then choose Sign Out Everyone on the portal. Within seconds the page says Your access to this remote desktop has ended.
If it doesn't work
| What you see | Where to look |
|---|---|
| The gateway is still installing the remote desktop service | The gateway asset is downloading guacd; wait a minute. |
| The connection failed. | The gateway asset cannot reach the server, or the server refused the account; repeat step 1. |
| The gateway does not trust the identity of … | The certificate changed since the first session; see step 5. |
| Anything else | Portal messages and troubleshooting |
Next
- Remote maintenance by an outside vendor
- Add more desktops as further applications of the same portal, each with its own
path prefix and Name. People then find them all at
https://portal.example.com/_xt/apps; see Several applications in one portal. - Use the
tunneltrust level instead ofidentityto keep the desktop off the internet: then only devices with the agent reach it. - Turn Paste into the session off where the browser's clipboard must not reach the server; see Clipboard and files.
- Turn Record sessions on to record every session of the application, and keep the recordings on the gateway asset or upload them to your own bucket; see Session recording.

