To install AnyDesk on Ubuntu 26.04 or 24.04, add the vendor’s apt repository at deb.anydesk.com and run sudo apt install anydesk. The service starts by itself and your AnyDesk ID is live a few seconds later. We ran that path and a direct .deb install on Ubuntu 26.04.1 and 24.04.5 with AnyDesk 8.1.1 in November 2026.
Outgoing connections work right after the install. Incoming ones don’t, because Ubuntu’s default GNOME on Wayland can’t be controlled. When we re-ran every connection in November, a 24.04 host dropped the session with anynet_closed and a 26.04 host answered “Remote display server is not supported”. An earlier AnyDesk build gave the same two messages the other way round. You’ll find the X11 fix for each release below, along with the unattended password, firewall ports and the CLI quirks we hit.
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 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) | Fails: “Session Closed”, status anynet_closed | Works |
| Ubuntu 24.04, GNOME on Xorg | Works, including at the login screen | Works |
| Ubuntu 26.04, GNOME on Wayland (default) | Refused: “Remote display server is not supported (e.g. Wayland)” | Works |
| Ubuntu 26.04, GDM login screen | Refused: “Remote display server is not supported (e.g. Wayland)” | Not applicable |
| Ubuntu 26.04, Xfce on X11 | Works | Works |
Those messages come from our November re-run on the current release. An October run on the previous build got them the other way round, the “not supported” dialog from 24.04 and anynet_closed from 26.04, so treat either one as the same Wayland refusal.
The vendor’s own Linux documentation backs the table up. 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
A stock Ubuntu desktop ships wget but not curl, so install it first, then 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 apt install -y curl
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 November 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:5 https://deb.anydesk.com all/main amd64 Packages [613 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
The candidate should come from deb.anydesk.com at the default priority of 500. On our 26.04 desktop it did:
anydesk:
Installed: (none)
Candidate: 8.1.1
Version table:
8.1.1 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.7 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: 77
Download size: 16.8 MB
Space needed: 44.7 MB / 35.6 GB available
Get:1 https://deb.anydesk.com all/main amd64 anydesk amd64 8.1.1 [16.8 MB]
Fetched 16.8 MB in 3s (6067 kB/s)
Selecting previously unselected package anydesk.
Preparing to unpack .../anydesk_8.1.1_amd64.deb ...
Failed to stop anydesk.service: Unit anydesk.service not loaded.
Unpacking anydesk (8.1.1) ...
Setting up anydesk (8.1.1) ...
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 Sun 2026-11-22 12:12:14 UTC; 3s ago
Invocation: 72840bad7a5f47aa8f95107a543c3583
Main PID: 3853 (anydesk)
Tasks: 10 (limit: 4025)
The 26.04 desktop showed the whole run in one window, from the policy check to the running service:

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.
Download the AnyDesk .deb without adding the repository
Some machines should not carry a third-party apt source, or you want one file to copy to an offline box. AnyDesk’s download page hands you a versioned .deb, but there is no stable “latest” link to script against. The repository index always names the current build, so read the file name from there and fetch it. The first line adds curl, which a stock desktop doesn’t ship:
sudo apt install -y curl
DEB=$(curl -fsSL https://deb.anydesk.com/dists/all/main/binary-amd64/Packages | awk '/^Filename:/{print $2; exit}')
echo "$DEB"
wget -q "https://deb.anydesk.com/$DEB"
On our 24.04 desktop that resolved to the 8.1.1 build in the pool:
pool/main/a/anydesk/anydesk_8.1.1_amd64.deb
The same index carries a SHA256: line for the package, and the file we downloaded matched it. Install the local file with apt rather than dpkg -i, so any missing library gets pulled in:
curl -fsSL https://deb.anydesk.com/dists/all/main/binary-amd64/Packages | grep '^SHA256:'
sha256sum "$(basename "$DEB")"
sudo apt install -y "./$(basename "$DEB")"
The ./ prefix matters, since without it apt goes looking for a package name in its sources. The install looked the same as the repository route, down to the 44.7 MB on disk. Our run typed the expanded file name, anydesk_8.1.1_amd64.deb, where the block above uses $(basename "$DEB"):

The trade-off is updates. The .deb does not add the repository for you, and afterwards apt policy anydesk listed only /var/lib/dpkg/status as its source. Nothing upgrades it until you repeat these steps or add the repository. The Flathub package com.anydesk.Anydesk is another option, but its Flathub page calls it a community package that AnyDesk Software GmbH doesn’t verify or support.
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:
1389926947
online
That worked without sudo because we were logged into the desktop. Run the same line over SSH while the machine sits at the login screen and 8.1.1 prints nothing at all and exits 1, because the seat belongs to the gdm-greeter user rather than you. Prefix both options with sudo on a headless or freshly rebooted box:

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
Without sudo the password never gets written, and how loudly that fails depends on the build. Our 8.1.0 run printed “Setting the password requires administrator privileges and an installed service.” yet exited 0, while 8.1.1 over SSH at the login screen exited 1 with no message. Don’t trust either, and check the config instead:
sudo grep -o '^ad.security.permission_profiles._unattended_access.pwd' /etc/anydesk/system.conf
After sudo anydesk --set-password on 8.1.1 the key name came back, which is all you need to see. The line itself holds a hash, not your password.
Open the AnyDesk ports in ufw
AnyDesk’s firewall article lists TCP 80, 443 and 6568 and says at least one of them must be open for a remote connection. It doesn’t say which direction. On our 26.04 host the only established AnyDesk socket was outgoing, from a high local port to a relay on 443 (10.0.1.51:60858 → 203.0.113.10:443), and ufw’s default policy already allows outgoing traffic. So none of the three needs an inbound rule for relayed sessions. What the service listens on locally is a different set, and ss shows it.
sudo ss -tulpn | grep anydesk
Our 8.1.1 service held TCP 7070 on IPv4 and IPv6 for direct connections, plus UDP 50001 for LAN discovery. The vendor puts discovery on UDP 50001 to 50003, sent to multicast 239.255.102.18:
udp UNCONN 0 0 0.0.0.0:50001 0.0.0.0:* users:(("anydesk",pid=1409,fd=103))
tcp LISTEN 0 10 0.0.0.0:7070 0.0.0.0:* users:(("anydesk",pid=1409,fd=78))
tcp LISTEN 0 10 [::]:7070 [::]:* users:(("anydesk",pid=1409,fd=79))
Open those two only if you want direct LAN sessions and devices showing up in the Discovery panel. If you manage the box over SSH, allow it before you enable ufw or you will lock yourself out. The OpenSSH profile comes with openssh-server, so skip that line on a desktop without it:
sudo ufw allow OpenSSH
sudo ufw allow 7070/tcp comment 'AnyDesk direct LAN'
sudo ufw allow 50001:50003/udp comment 'AnyDesk discovery'
sudo ufw --force enable
sudo ufw status numbered
On our 26.04 desktop, anydesk --get-status still reported online once ufw was active. Here are the listener and the three rules side by side:

On a corporate network the blocker is usually the edge firewall instead. AnyDesk asks admins to allow *.net.anydesk.com and exempt it from HTTPS inspection, which breaks its TLS sessions.
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. From the default GNOME on Wayland desktop, 26.04 connected on the current release and 24.04 connected on the previous build in October, 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 fails even with the right unattended password. On our November run the client dropped it twice with anynet_closed, and the 24.04 service trace logged “Connecting to console session” and then “Received data on invalid vport 10”:

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:
9: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 (ours had automatic login on and came straight back without one), 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
3247 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1001/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -novtswitch -verbose 3
The same connection that was refused a minute earlier asked for the unattended password and then 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. logind then reported the new session as Type=x11 and State=active:

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
An AnyDesk Ubuntu 26.04 host left on the default desktop refuses incoming connections outright. On our November run a 24.04 client got the “Not supported” dialog at once (the October run on the previous build ended in anynet_closed instead):

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 gear menu lists whatever session files exist, so you can check them from a terminal before logging out:
ls /usr/share/xsessions /usr/share/wayland-sessions
Our 26.04 machine had four after the install. xfce.desktop under xsessions is the X11 one you want:
/usr/share/wayland-sessions:
ubuntu.desktop
xfce-wayland.desktop
/usr/share/xsessions:
lightdm-xsession.desktop
xfce.desktop
Inside the Xfce terminal, echo $XDG_SESSION_TYPE now prints x11. A connection from a 24.04 machine went straight through and gave full control of the 26.04 desktop. We opened the terminal through AnyDesk itself and typed the check there:

The 26.04 login screen is a different story. GDM’s greeter still runs on Wayland there (logind shows it as Type=wayland, Class=greeter), and connecting to a machine sitting at it got the same refusal:

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. A stock desktop only has vim-tiny, which doesn’t answer to vim, so the first line adds the full editor:
sudo apt install -y vim
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 our 24.04 desktop the purge freed the same 44.7 MB and deleted /etc/anydesk, which holds the AnyDesk ID and the unattended password hash:
The following packages will be REMOVED:
anydesk*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 44.7 MB disk space will be freed.
Removing anydesk (8.1.1) ...
Removed "/etc/systemd/system/multi-user.target.wants/anydesk.service".
Purging configuration files for anydesk (8.1.1) ...
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 on Wayland, either a logged-in desktop or the 26.04 GDM login screen. On the current release we got this dialog from 26.04 GNOME and from the 26.04 greeter; the previous build showed it for 24.04. Switch a 24.04 machine to Xorg with WaylandEnable=false, and log a 26.04 machine into Xfce on X11, 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
This is the other face of the same Wayland limit. On the current release a 24.04 GNOME desktop on Wayland produced it every time; the previous build produced it for 26.04 instead. The service trace in /var/log/anydesk.trace on the host shows “Connecting to console session” followed by “Received data on invalid vport 10”, and it never logs the “Starting a new backend” line that an accepted X11 session gets. Move the host to an X11 session: Xorg on 24.04, Xfce on 26.04. 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 previous build printed this and still exited 0, and the current one exits 1 with no message at the login screen, so scripts should check /etc/anydesk/system.conf as well as $?.
anydesk –get-id prints nothing and exits 1
The machine is at the login screen, or someone else owns the seat, and you ran the command as a regular user over SSH, so the client and the seat belong to different users. Use sudo anydesk --get-id, which talks to the root service and works whoever is logged in.
The application AnyDesk has closed unexpectedly
Ubuntu’s crash reporter raises this dialog for reports it finds in /var/crash, and on 26.04 AnyDesk left one at every shutdown. The reports name /usr/bin/anydesk --crash-handler with signal 6 (SIGABRT), written while the machine was shutting down, plus one more from the greeter’s AnyDesk process right after the install. The service came back online every time and the next connection worked, 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