Score:1

How to set up an XPRA proxy server for multiple users, reverse proxied with Apache

cn flag

On an Ubuntu 20.04 LTS system I would like to configure the "XPRA proxy server" in the following manner:

  1. XPRA should be accessed via its HTML5 client so that users don't need XPRA on their machines.
  2. Users shall be able to connect to XPRA via the URL https://xpra.example.net, instead of http://example.net:14500. I.e. the XPRA HTML service should be reverse-proxied by the (Apache) webserver so that HTTPS requests to the xpra.example.net virtual host get forwarded to localhost:14500. I could not find any descriptions of how to do this: most likely one must use websockets.
  3. Each user shall get access to his/her graphical desktop. I figured out that if I start on the server XPRA manually as xpra start-desktop --bind-tcp=0.0.0.0:14500 --start-child=startlxde (for the LXDE desktop) then I can indeed connect via the HTML5 client using http://example.net:14500 but this quickly gets clumsy as one needs to SSH into the server first to run the xpra start-desktop command there.
  4. The proxy server shall be started/stopped as a system service. There is indeed a /lib/systemd/system/xpra.service service file but I am not sure whether it is correctly configured for these requirements above.

I have tried my best to figure all this out from the XPRA documentation but failed. Has anyone succeeded in setting up XPRA this way? If yes, any help would be much appreciated.

PS I would have liked to tag this question with "xpra" but don't have enough reputation to do so.

in flag
I'd like the same, but right now I'll settle for xpra htm5 working on Ubuntu 20.04 at all because I have been unable to make that combo work so far for aarch64 anyway.
Score:0
nc flag

I'm in basically the same situation, except I want to use nginx. I think the xpra proxy server may be able to support such a setup, but I'm not fully sure, it's also possible that the version in ubuntu 20.04 is too old to make it work correctly. I don't seem to be able to chain the two xpra layers, and I can't control what the web UI does (it tends to start a new session when I tell it to connect to an existing one, for example).

What I ended up with is having multiple virtual subdirectories on the webserver, with each proxying to a different upstream xpra instance. This seems to work adequately.

I still have a couple of minor issues, like the DPI is sometimes messed up, the PAM authentication doesn't work when I launch a user's desktop through a systemd service, but these can probably be solved or worked around with a bit of time.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.