RealVNC server on RasPi with Raspian/Debian Bookworm - current situation

Oct 11, 2026 Last reply: 1 month ago 15 Replies

Most relevant reply

Knute Johnson

If you want to run RealVNC server on your Pi and access it from the internet you need to set your Pi to use X11 not Wayland. Do that in raspi-config. You can get a free account from RealVNC for up to 3 servers for personal use. It works great. I have 3 Pis running RealVNC…

Read the full reply

I know that at one time newer versions of Raspian (eg Bookworm) wouldn't run RealNVC server because of a problem with Wayland.



Has that situation been resolved yet? Is there a version of RealVNC server that will work with Debian Bookworm to allow cloud-based connections from outside my LAN?



I've got RealVNC client (eg on Windows or Android) to connect to my Pi by Direct connection, but that doesn't help with accessing from the WAN (eg if my phone or laptop is connected to a different internet connection when I'm away from home).



The workaround is to use Port Forwarding on my router, to forward <WAN-IP>:<port> to <Pi-LAN-IP>:5900 so an external connection looks like an internal LAN connection.



However I've got a new internet connection and the company (by default) uses CGNAT which means that port-forwarding doesn't work.



I may be able to get a static IP address from my internet company which presumably means there is no CGNAT (or at least, no double-NAT) so I can access ports on the WAN address from the outside world and use port-forwarding to pass on traffic to the Pi on the LAN.



But if that is not possible, I'll need a RealVNC solution that uses a cloud-based connection (as for RealVNC server on Windows) - hence my initial question.


If you want to run RealVNC server on your Pi and access it from the internet you need to set your Pi to use X11 not Wayland. Do that in raspi-config. You can get a free account from RealVNC for up to 3 servers for personal use. It works great. I have 3 Pis running RealVNC server and accessing them from the internet. You can even get an Android RealVNC viewer, it works great too.

Or look at the RaspberryPi scheme that I don't know anything about.

snip >

Raspberry Pi connect

Ah, I didn't know it was possible to change from Wayland to X11. I'll investigate.

Does changing from Wayland to X11 "break" anything that I might want to run on the Pi? Did older versions of Raspian (the versions avilable when the Pi 3 was sold) use X11?

I think I've got a spare RealVNC account, in addition to the two that I use for accessing my desktop and laptop Windows PCs. It's a shame that they reduced the "Lite" limit from five to three...

Annoyingly, three of the applications (*) that I use on the Pi on the PC only have HTTP interfaces (on different ports) so I either have to use port-forwarding to access from the internet or else RealVNC to the Pi (on X11!) and then start a browser on there to access the apps from the LAN.

(*) TVHeadend video recorder; Cumulus weather station software; an app for monitoring electricity usage over time on Kasa smart-plugs, to check that our deep freezers are working OK (look for any anomalous usage...)

Is there any possibility that a VPN might help to work around the difficulty in doing port forwarding?

Can I check what I need to do to switch between Wayland and X11, because I get a blank screen when I do so...

sudo raspi-config Advanced Options Wayland Openbox with X11 (as opposed to Labwc with Wayland, as it was before) reboot

RealVNC (direct TCP connection) gives a blank window, and the output on HDMI1 is also a black screen,

Fortunately I'd enabled SSH, so I was able to connect using PuTTY and run raspi-config to change back to Wayland

It's Wayland that breaks things due to its permanently unfinished state and features the developers just wont implement.

X11 is what Raspbian used to be shipped with. You will have no problems with it.

---druck

However...

When I changed from Wayland to X11 in raspi-config (Advanced | Wayland), I got a black screen both on the HDMI output and on a RealVNC "direct" (TCP) connection.

So it seems that something else is needed, in order for X11 to work on new versions of Raspberry PiOS/Debian, in the same way that it worked on older Raspbian.

Any clues would be appreciated...

Luckily I'd already enabled SSH on my Pi, so I could connect to it by PuTTY in order to run raspi-config again and change back to Labwc/Wayland. Otherwise I'd have been stuffed ;-)

I have one Pi5 that is running Bookworm and Wayland. I can access it with RealVNC viewer. It sometimes gives me a gray screen (not black) and other times I get the login screen if nobody is logged in. There are two users on that computer and I can log in as either but only one at a time and it is the running desktop that I can get to. I'm not sure how it works if you connect the RealVNC viewer with one user and then login to the computer with another but it seems to work most of the time.

FYI - I just tried to change that Pi5 to X11 and I can't get into it with the RealVNC viewer. It may have something to do with nobody being logged in. It's not convenient to run back and forth to the computers as they are 100 yards apart in different buildings.

I've got 4 Pis running X11 with no problems. Anytime I try Wayland I get some sort of issue that I can't resolve.

I think RealVNC and Wayland only work when you are on the same network, not using their servers.

To know whether you are running X11 or Wayland, from a command prompt type: echo $XDG_SESSION_TYPE.

You should get X11 or Wayland. This doesn't work if you SSH into another computer as it gives you: tty

You need to make sure the vncserver-x11-serviced service is running, and you have set up Real VNC with a password.

I have a few Pi 3's running the Real VNC Server on the 'standard' desktop, and it works. But I mainly use open source x11vnc with Pi 4's and 5's that use the Mate desktop, as it allows the main session to be shared.

It works for me when coming in from other networks over OpenVPN. Do you have any firewall rules rejecting other networks?

---druck

I really like x11vnc and I have about 100 computers running it (40 or 50 of them Pi4s) in a closed network. I access them with a hardware VPN and RealVNC viewer.

I don't think there is an equivalent to vncserver-x11-serviced for Wayland. Just wayvnc and you can't using RealVNC's network to get at that. Maybe there is a virtual VNC server?

Ah, Real VNC are now offering a 'cloud' remote access system. I've never used that, I only ever use VNC remotely via my own VPN, so have not signed the Real VNC instances in to a cloud account.

---druck

Probably runs an RDP server instead of VNC?

It is really nice and it is free. I had an actual commercial account with them for one server that I used for work but they realigned their accounts and got rid of me. I couldn't afford their minimum account any more.

Just a note that GUI remoting on Linux (or any other Unix-type system) works a bit differently from how you might think if you are more used to Microsoft/Apple platforms.

Basically, your remote session is entirely independent from what a local user might be doing on a physical screen on that same machine. The remoting server is acting as its own, entirely virtual, display device. In days of yore, this would have been acting as an X11 server, but there’s nothing preventing it from implementing the Wayland protocol nowadays. You just have to check this with the software docs, to see what it actually supports.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required