AnyDesk installs on Ubuntu from the vendor’s own apt repository in about a minute, and the AnyDesk ID is live once the service starts. Trouble starts when someone tries to connect to you. Ubuntu runs GNOME on Wayland by default, and AnyDesk cannot be controlled through a Wayland session, so an Ubuntu 24.04 host answers with “Remote display server is not supported” while Ubuntu 26.04 drops the session with anynet_closed. Outgoing connections work on both.
This guide adds the AnyDesk repository with a scoped signing key, installs the package, sets an unattended password and connects from the terminal. It then fixes incoming sessions with an Xorg login on 24.04 and an Xfce desktop on X11 for 26.04, where GNOME has no Xorg session left. All of it was run across Ubuntu 26.04.1 LTS and 24.04.5 LTS lab desktops with AnyDesk 8.1.0 in October 2026, and the screenshots come from both.
Check whether your desktop can accept sessions
Whether AnyDesk can be controlled depends on the session you are logged into, not on the Ubuntu release or the package. We connected two lab desktops to each other across these four sessions with the same unattended password, and the session type decided every result:
| Session on the machine you connect to | Incoming connection | Outgoing from it |
|---|---|---|
| Ubuntu 24.04, GNOME on Wayland (default) | Refused: “Remote display server is not supported (e.g. Wayland)” | Works |
| Ubuntu 24.04, GNOME on Xorg | Works, including at the login screen | Works |
| Ubuntu 26.04, GNOME on Wayland (default) | Fails: “Session Closed”, status anynet_closed | Works |
| Ubuntu 26.04, Xfce on X11 | Works | Works |
The vendor’s own Linux documentation says the same thing. Incoming sessions need an Xorg session, and Wayland is only good for outgoing ones. To see which one you are on, open a terminal on the desktop itself, because an SSH login reports tty instead:
echo $XDG_SESSION_TYPE
A stock Ubuntu desktop prints wayland. If you only manage the box over SSH, ask logind about the session on the physical seat instead:
loginctl show-session $(loginctl list-sessions --no-legend | awk '$4=="seat0"{print $1}') -p Type
Our 26.04 machine answered with the default. A 24.04 desktop prints the same line until you change the GDM config, which is covered below:
Type=wayland
If you only need to reach other computers from this one, Wayland is fine and you can skip the two fix sections further down. If this machine is the one you want to support remotely, plan on an X11 session from the start.
Add the AnyDesk repository
AnyDesk publishes one apt repository for every Debian-based release, with a single suite called all. Older versions of this guide dropped the key into /etc/apt/trusted.gpg.d, which tells apt to trust it for every repository on the system, and pointed at the repo over plain http. The deb822 file below limits the key to this one repository with Signed-By and fetches over https.
Clear out any earlier AnyDesk repo setup first, whether it came from this guide’s old steps or from AnyDesk’s own instructions, which write an anydesk-stable.list with a different key path. With both in place, apt update stops with “E: Conflicting values set for option Signed-By” and refuses to read any sources. Remove the old files:
sudo rm -f /etc/apt/sources.list.d/anydesk*.list /etc/apt/keyrings/keys.anydesk.com.asc /etc/apt/trusted.gpg.d/anydesk.gpg
Download the signing key into its own keyring. The --yes flag lets you re-run the line later without gpg stopping to ask about overwriting:
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo gpg --dearmor --yes -o /etc/apt/keyrings/anydesk.gpg
Before you trust it, check the fingerprint against what we saw in October 2026. The current key is an RSA 3072 key created in February 2025 that expires in 2035:
gpg --show-keys /etc/apt/keyrings/anydesk.gpg
The fingerprint line should match this one exactly. Stop here if it does not, because a different key means the file you downloaded is not the one AnyDesk publishes:
pub rsa3072 2025-02-06 [SC] [expires: 2035-02-04]
06B5EA2FAE208E7CDA9761DCA2FB21D5A8772835
uid AnyDesk Software GmbH <[email protected]>
sub rsa3072 2025-02-06 [E] [expires: 2035-02-04]
Now write the source file. A single printf piped to tee creates it without opening an editor:
printf '%s\n' 'Types: deb' 'URIs: https://deb.anydesk.com/' 'Suites: all' 'Components: main' 'Signed-By: /etc/apt/keyrings/anydesk.gpg' | sudo tee /etc/apt/sources.list.d/anydesk.sources
Refresh the package index so apt fetches the AnyDesk package list. Any problem with the key or the source file shows up here, before you try to install anything:
sudo apt update
Two lines in the output should come from deb.anydesk.com, and there should be no E: or W: lines about it:
Get:4 https://deb.anydesk.com all InRelease [7386 B]
Get:6 https://deb.anydesk.com all/main amd64 Packages [609 B]
The current build is published for amd64 and arm64 only. The armhf and i386 indexes in the same repository still stop at much older releases, so on a Raspberry Pi use Ubuntu’s arm64 image (we only tested amd64).
Install AnyDesk
Check that apt picks the package from AnyDesk’s repository and not from somewhere else:
apt policy anydesk
On both releases the candidate came from deb.anydesk.com at the default priority of 500:
anydesk:
Installed: (none)
Candidate: 8.1.0
Version table:
8.1.0 500
500 https://deb.anydesk.com all/main amd64 Packages
With the right candidate confirmed, install the package. The -y flag answers the confirmation prompt for you:
sudo apt install -y anydesk
It is one package with no extra dependencies on a desktop install, a 16.8 MB download that takes 44.5 MB on disk. This is the apt summary from 26.04, where apt prints the newer Summary: layout, while 24.04 shows the older wording with the same sizes:
Installing:
anydesk
Summary:
Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 4
Download size: 16.8 MB
Space needed: 44.5 MB / 33.5 GB available
Get:1 https://deb.anydesk.com all/main amd64 anydesk amd64 8.1.0 [16.8 MB]
Fetched 16.8 MB in 3s (6570 kB/s)
Selecting previously unselected package anydesk.
Preparing to unpack .../anydesk_8.1.0_amd64.deb ...
Failed to stop anydesk.service: Unit anydesk.service not loaded.
Unpacking anydesk (8.1.0) ...
Setting up anydesk (8.1.0) ...
Created symlink '/etc/systemd/system/multi-user.target.wants/anydesk.service' → '/etc/systemd/system/anydesk.service'.
Ignore the red “Failed to stop anydesk.service” line. The pre-install script tries to stop a service that does not exist yet on a first install. The dependency list still names libgcc1, which libgcc-s1 has provided since 2020, plus the old names of the GLib and GTK 3 libraries, which apt resolves to their renamed t64 packages on both releases. The package then enables and starts anydesk.service, which runs as root and is what lets people connect when nobody is at the keyboard:
systemctl status anydesk --no-pager | head -6
Look for enabled on the Loaded line and active (running) below it:
● anydesk.service - AnyDesk
Loaded: loaded (/etc/systemd/system/anydesk.service; enabled; preset: enabled)
Active: active (running) since Wed 2026-10-21 06:42:41 UTC; 23s ago
Invocation: 8a45effcbcd14c3aad18d7a8e655f271
Main PID: 4243 (anydesk)
Tasks: 45 (limit: 6420)
Open AnyDesk from the app grid. The main window shows this machine’s AnyDesk address, the number another user types to reach you, with a red banner across the top on the free licence:

The free licence covers personal use only, and every session shows a “This is a non-commercial session.” notice in the corner of the remote screen, which you can see in the session screenshots further down.
Set an unattended password
Without a password, every incoming request waits for someone at the remote machine to click Accept. That is fine for helping a relative, but useless for your own machines. You can set the password from the Set password card in the main window, or from a shell, which also works over SSH. Read the ID and connection status first:
anydesk --get-id; echo; anydesk --get-status; echo
An online status means the service has registered with AnyDesk’s network and can take connections. Both options print without a trailing newline, hence the echo after each:
1036311179
online
Pick a long password, because anyone who knows the ID and the password gets your desktop. Type it at a silent read prompt so it never lands in your shell history, pipe it into --set-password with sudo, then clear the variable:
read -rs ADPW
echo "$ADPW" | sudo anydesk --set-password
unset ADPW
Run it without sudo and AnyDesk prints “Setting the password requires administrator privileges and an installed service.” but still exits with status 0. A provisioning script that only checks the exit code will think it worked, so check /etc/anydesk/system.conf afterwards. A successful run adds a line starting with ad.security.permission_profiles._unattended_access.pwd that holds a hash, not your password.
Connect to another machine from the terminal
The GUI works the way you’d expect. Type the remote address into the box at the top and press Enter. For scripts and launchers, the same binary takes an ID on the command line and reads the remote machine’s unattended password from standard input. Use the same silent prompt:
read -rs ADPW
echo "$ADPW" | anydesk 829736501 --with-password
unset ADPW
Run it from a terminal inside your desktop session. It opens a normal AnyDesk window that’s already logged in to the remote machine, and it skips the Accept prompt on the other end. AnyDesk refuses to run its GUI as root, so leave sudo off this one. We ran it from the default GNOME on Wayland desktop on both releases and both sessions connected, which matches the vendor’s statement that Wayland only blocks incoming sessions.
Fix incoming sessions on Ubuntu 24.04
Connecting to a 24.04 machine that sits on the default Wayland session gets you this dialog, even with the right unattended password:

Ubuntu 24.04 still ships GNOME’s Xorg session, so the fix is to make GDM use it. You can pick “Ubuntu on Xorg” from the gear icon on the login screen for a single login, but a machine you support remotely needs it every time, including after a reboot. Turn Wayland off in GDM’s config by uncommenting the line that’s already there:
sudo sed -i 's/^#\s*WaylandEnable=false/WaylandEnable=false/' /etc/gdm3/custom.conf
grep -n WaylandEnable /etc/gdm3/custom.conf
The line should now be active. If grep prints nothing, your file has no commented line to flip, so add WaylandEnable=false under [daemon] by hand:
7:WaylandEnable=false
Restart GDM to apply it. This ends your graphical session on the spot, so save your work first or reboot instead:
sudo systemctl restart gdm3
Log back in at the GDM screen as usual, then check the session type again and look for a running X server:
loginctl show-session $(loginctl list-sessions --no-legend | awk '$4=="seat0"{print $1}') -p Type; pgrep -a Xorg
The session now reports x11, and Xorg is running on the seat:
Type=x11
700470 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
The same connection that was refused a minute earlier opened straight onto the GNOME desktop:

With Wayland off, the GDM login screen itself runs on Xorg, so you do not need automatic login on 24.04. We put the machine back at the login screen, connected from 26.04, and got the GDM user list:

Typing the password through AnyDesk logged us in, and the session followed into the user’s desktop without dropping. That beats automatic login, because nobody at the physical console gets your session after a reboot.
Fix incoming sessions on Ubuntu 26.04
Ubuntu 26.04 ships GNOME 50, which has no Xorg session at all, so the 24.04 fix has nothing to switch to. Its /etc/gdm3/custom.conf does not even carry a WaylandEnable line any more. We added WaylandEnable=false under [daemon] anyway and restarted GDM, and the automatic login came straight back on Wayland:
Name=josphat
Service=gdm-autologin
Type=wayland
On the default desktop, incoming connections don’t get the friendly “not supported” dialog you see on 24.04. The host accepts the connection and then closes it, and the client reports anynet_closed. We reproduced it three times, including after a clean reboot and a restart of anydesk.service:

What works is a second desktop that still runs on X11. Xfce is the lightest common choice, and GDM lists it on the login screen next to GNOME, so you do not have to change display managers. Install it:
sudo apt install -y xfce4
On our 26.04 desktop that pulled in 91 packages, including xserver-xorg-core and LightDM. If apt stops to ask which display manager to use, keep gdm3. Our install left GDM in charge, and /etc/X11/default-display-manager still pointed at /usr/sbin/gdm3. If you are choosing between desktops, our desktop environment RAM comparison has the idle memory numbers. Log out, then switch sessions at the login screen:
- Click your user name
- Click the gear icon in the bottom right corner
- Choose “Xfce Session”, not “Xfce Session (Wayland)”
- Type your password and log in
The menu on our 26.04 machine listed four sessions once Xfce was installed:

Inside the Xfce terminal, echo $XDG_SESSION_TYPE now prints x11. A connection from a 24.04 machine running Wayland went straight through and gave full control of the 26.04 desktop:

The 26.04 login screen is a different story. GDM’s greeter still runs on Wayland there, and connecting to a machine sitting at it ended in the same anynet_closed. For a machine that has to come back reachable after a reboot, log it straight into Xfce. GDM reads each user’s default session from AccountsService, so set it to Xfce:
sudo sed -i 's/^Session=.*/Session=xfce/' /var/lib/AccountsService/users/$USER
sudo grep ^Session= /var/lib/AccountsService/users/$USER
The file should now read Session=xfce. If grep prints nothing, the account has never picked a session, so choose Xfce once from the gear menu as shown above and run the two lines again. Then turn on automatic login in GDM’s config:
sudo vim /etc/gdm3/custom.conf
Set these two lines under [daemon], with your own username in place of josphat:
AutomaticLoginEnable = true
AutomaticLogin = josphat
After a reboot our machine came up in Service=gdm-autologin with Type=x11 and xfce4-session running, and the next AnyDesk connection landed on the Xfce desktop. The trade-off is that anyone at the physical console gets your session too, so use it on machines in a locked room or lock the screen before you disconnect.
If you’d rather keep GNOME on 26.04, AnyDesk isn’t the right tool for incoming sessions on that release. RustDesk and a VNC server on Ubuntu are the usual alternatives, and our roundup of open source remote desktop tools compares them. Anyone still deciding whether to move off 24.04 should weigh this in the Ubuntu 26.04 vs 24.04 comparison before running the 24.04 to 26.04 upgrade on a machine you support remotely.
Remove AnyDesk
Purge the package so its service config goes with it. A plain remove leaves the ID and password hash behind, which matters if you are handing the machine to someone else:
sudo apt purge -y anydesk
On 26.04 the purge frees the same 44.5 MB and deletes /etc/anydesk, which holds the AnyDesk ID and the unattended password hash:
REMOVING:
anydesk*
Summary:
Upgrading: 0, Installing: 0, Removing: 1, Not Upgrading: 4
Freed space: 44.5 MB
Removing anydesk (8.1.0) ...
Removed '/etc/systemd/system/multi-user.target.wants/anydesk.service'.
Purging configuration files for anydesk (8.1.0) ...
A reinstall after a purge gets a brand new AnyDesk ID, so anyone who saved the old one has to update it. A plain apt remove keeps /etc/anydesk, and our reinstall after it came back with the same ID. These files survive the purge:
- the repository file
/etc/apt/sources.list.d/anydesk.sources - the keyring
/etc/apt/keyrings/anydesk.gpg - the service trace log
/var/log/anydesk.trace - per-user settings and history in
~/.anydesk
Delete the system files, then refresh apt so it forgets the repository:
sudo rm -f /etc/apt/sources.list.d/anydesk.sources /etc/apt/keyrings/anydesk.gpg /var/log/anydesk.trace
sudo apt update
The update output should no longer mention deb.anydesk.com. Remove ~/.anydesk as well if you want the address book and session history gone.
Fix AnyDesk errors on Ubuntu
These are the messages we hit while testing on both releases, with what each one actually means.
Not supported: Remote display server is not supported (e.g. Wayland)
The machine you’re connecting to is logged into a Wayland session. That is the default on Ubuntu 24.04, and the client shows this dialog instead of the remote screen. Switch that machine to Xorg with WaylandEnable=false as shown above. A correct password doesn’t help, because the failure happens before authentication matters.
Session Closed: The session has ended. Status: anynet_closed
On Ubuntu 26.04 this is how the Wayland limit shows up, both on the GNOME desktop and at the GDM login screen. The service trace in /var/log/anydesk.trace shows “Connecting to console session” followed by “Received data on invalid vport”, and it never logs the “Starting a new backend” line that an accepted X11 session gets. Log the host into an X11 session such as Xfce. If the host is already logged into an X11 desktop and you still get this, check that both ends report online with anydesk --get-status.
E: Conflicting values set for option Signed-By regarding source https://deb.anydesk.com/ all
Two source files point at the AnyDesk repository with different keys, usually an anydesk-stable.list from AnyDesk’s own instructions plus this guide’s anydesk.sources. Apt refuses to read any sources until one goes, so apt update fails for every repository on the machine. Run the rm line from the repository section and update again.
Setting the password requires administrator privileges and an installed service.
You ran anydesk --set-password without sudo. Pipe the password into sudo anydesk --set-password instead. The command exits 0 even when it fails, so scripts have to check /etc/anydesk/system.conf instead of $?.
The application AnyDesk has closed unexpectedly
We saw this crash report on 26.04 right after switching from GNOME to Xfce. The AnyDesk process from the old session died with SIGABRT when that session ended, and Ubuntu’s crash reporter showed it at the next login. The service kept running and a new tray process started in the Xfce session, so click “Don’t send” and carry on. It doesn’t affect remote access.
Great article. Thank you
Easy to read and understanding purpose. Thank You!
originally from anydesk doc, but not work any more on Apr.2022
The article was so great but,
anydesk is fashing out after installation on 22.04
Can you share screenshot?
it workss thankss