Best Steps To Install AnyDesk on Debian 12 Bookworm

Posted on

Best Steps To Install AnyDesk on Debian 12 Bookworm

Best Steps To Install AnyDesk on Debian 12 Bookworm

In this guide, we want to teach you how to Install AnyDesk on Debian 12 Bookworm from Command-Line. If you are looking for a good and fast remote desktop application, AnyDesk is an excellent option for you. It has many amazing features, and it’s also suitable for small businesses. This tutorial provides the best steps to Install AnyDesk on Debian 12 Bookworm.

Now follow this guide on the Orcacore website to Install AnyDesk on Debian 12 Bookworm in the latest version.

To Install AnyDesk on Debian 12 Bookworm, you must have access to your server as a non-root user with sudo privileges. To do this, you can check this guide on Initial Server Setup with Debian 12 Bookworm.

Then, follow the steps below to Install AnyDesk on Debian 12 Bookworm.

Step 1 – Install Required Packages for AnyDesk

First, you need to update your local package index with the command below:

sudo apt update

Then, use the following command to install dependencies and required packages:

sudo apt install software-properties-common apt-transport-https wget ca-certificates gnupg2 -y

Step 2 – Import AnyDesk GPG Key on Debian 12

At this point, you need to import the GPG key to verify the authenticity of the packages. To do this, run the following wget command:

sudo wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo apt-key add -

Step 3 – Add AnyDesk Repository To Debian 12

Now use the following command to add the AnyDesk repository on Debian 12:

sudo echo "deb http://deb.anydesk.com/ all main" > /etc/apt/sources.list.d/anydesk-stable.list

Step 4 – Install AnyDesk on Debian 12 Manually

At this point, you need to run the system update again:

sudo apt update

Finally, use the command below to Install AnyDesk on Debian 12 Bookworm:

sudo apt install anydesk -y

Now you can verify your AnyDesk installation on Debian 12 by checking its version:

anydesk --version
**Output**
6.2.1orca@debian:~#

As you can see, AnyDesk 6.2.1 is successfully installed on your Debian 12.

Step 5 – How To Launch AnyDesk on Debian Linux?

At this point, you can launch your AnyDesk app. From your Debian terminal, you can run the following command:

anydesk

Or, you can run it in the background to free up the terminal:

anydesk &

Also, from your Debian 12 desktop, you can open it from Activities > Show Applications > AnyDesk.

The first time you open AnyDesk, you will see the following window.

AnyDesk app
Install AnyDesk on Debian 12 Bookworm

Step 6 – Start Using AnyDesk on Debian 12

To start using your AnyDesk app, you need to be sure that you have AnyDesk installed on both remote and local machines. As you can see from the previous step image, you have an ID for your system. You will need to share this ID with others if you want them to connect to your system. Also, you need to have the ID of the remote machine and enter it in the Remote Desk to connect to your remote machine.

When you enter the correct ID, on the remote machine you must accept the connection, and then the connection will start, and you have access to your remote machine.

Step 7 – How To Update AnyDesk in Debian?

The software should update itself with your system packages for desktop users using the APT package manager. For users who want to check manually, use the following command:

sudo apt update && sudo apt upgrade

For more information, you can visit AnyDesk Linux page.

Step 8 – Remove or Uninstall AnyDesk From Debian

When you no longer want the video conference software installed on your system, use the following command to remove it:

sudo apt autoremove anydesk --purge -y

Remove the repository if you plan not to re-install AnyDesk again:

sudo rm /etc/apt/sources.list.d/anydesk-stable.list

After removing the repository list file, remove the GPG.

sudo rm /usr/share/keyrings/anydesk.gpg

Conclusion

At this point, you have learned to Install AnyDesk – Fast Remote Desktop Application – on Debian 12 Bookworm from the command line Terminal. Also, you have learned to Launch, Update, and Uninstall it.

Hope you enjoy it. You may also like these articles:

Install Portainer Docker GUI on Debian 12

Install GitLab on Debian 12 Bookworm

Alternative Methods to Install AnyDesk on Debian 12 Bookworm

While the above method of using the AnyDesk repository is the recommended and straightforward approach, here are two alternative ways to install AnyDesk on Debian 12 Bookworm.

Method 1: Using the Direct .deb Package Download

This method involves downloading the .deb package directly from the AnyDesk website and installing it using dpkg. This is useful if you prefer not to add external repositories to your system or need to install a specific version not available in the repository.

Steps:

  1. Download the .deb package: Visit the AnyDesk downloads page (https://anydesk.com/en/downloads/linux) and download the Debian package (usually the one labeled "Debian"). Make sure to select the correct architecture for your system (usually amd64 for 64-bit systems).

  2. Install the .deb package using dpkg: Open a terminal and navigate to the directory where you downloaded the .deb package. Then, use the following command to install it:

    sudo dpkg -i anydesk_<version>_amd64.deb

    Replace <version> with the actual version number of the downloaded package. For example:

    sudo dpkg -i anydesk_6.2.1-1_amd64.deb
  3. Fix Dependency Issues (if any): If dpkg reports any dependency issues, you can resolve them by running:

    sudo apt-get install -f

    This command will attempt to download and install any missing dependencies required by AnyDesk.

  4. Verify Installation: Run anydesk --version to verify the installation.

Explanation:

  • dpkg -i installs a .deb package.
  • apt-get install -f fixes broken dependencies.

This method avoids adding the AnyDesk repository, giving you more control over the installed version. However, you’ll need to manually download and install updates when new versions are released.

Method 2: Using a Containerization Tool (Docker)

While not a direct installation on the host system, using Docker to run AnyDesk offers isolation and portability. This method is more complex but useful for advanced users or those who want to avoid modifying their base system. Keep in mind that performance can be affected.

Steps:

  1. Install Docker: If you don’t have Docker installed, install it using the official instructions for Debian (https://docs.docker.com/engine/install/debian/).

  2. Create a Dockerfile: Create a file named Dockerfile (without any extension) with the following content. This Dockerfile provides a basic setup; more complex configurations might be needed for specific use cases, especially regarding display and audio forwarding. This example builds upon a lightweight Debian base image and downloads/installs AnyDesk directly.

    FROM debian:bookworm-slim
    
    RUN apt-get update && apt-get install -y --no-install-recommends 
        wget 
        ca-certificates 
        libx11-6 
        libxext6 
        libxtst6 
        xvfb 
        x11vnc 
        && rm -rf /var/lib/apt/lists/*
    
    # Download and install AnyDesk
    RUN wget -qO /tmp/anydesk.deb https://download.anydesk.com/debian/anydesk_6.2.1-1_amd64.deb  # Replace with the latest version
    RUN dpkg -i /tmp/anydesk.deb || apt-get install -fy
    RUN rm /tmp/anydesk.deb
    
    # Configure Xvfb and X11vnc
    ENV DISPLAY=:1
    RUN echo "Xvfb ${DISPLAY} -screen 0 1024x768x24 &" > /root/start_xvfb.sh
    RUN chmod +x /root/start_xvfb.sh
    
    # Start Xvfb and X11vnc
    CMD /root/start_xvfb.sh && x11vnc -display ${DISPLAY} -forever -nopw -shared
  3. Build the Docker Image: In the same directory as the Dockerfile, run the following command to build the Docker image:

    docker build -t anydesk-debian .
  4. Run the Docker Container: Run the Docker container with port forwarding (for VNC) and necessary volume mounts for configuration:

    docker run -d -p 5900:5900 anydesk-debian

    This command runs the container in detached mode (-d) and forwards port 5900 (VNC) from the container to port 5900 on your host machine. You’ll need a VNC client on your host to connect. This example uses X11vnc inside the container to provide VNC access.

Explanation:

  • The Dockerfile defines the environment for the AnyDesk application. It uses a base Debian image, installs dependencies, downloads and installs AnyDesk.
  • It also configures Xvfb (a virtual framebuffer) and X11vnc to allow remote access to the AnyDesk GUI within the container.
  • docker build creates the image from the Dockerfile.
  • docker run starts a container from the image. The -p flag maps ports between the host and the container.

Accessing AnyDesk via VNC:

You’ll need a VNC client (like Remmina, TigerVNC, or RealVNC) installed on your Debian 12 host machine. Connect to localhost:5900 (or the appropriate IP address of your Debian 12 machine if you’re connecting from a different computer). There is no password configured in the example Dockerfile.

Important Considerations for Docker Method:

  • Security: The example Dockerfile disables VNC password protection for simplicity. This is highly insecure and should NOT be used in production environments. Implement proper authentication for VNC.
  • Performance: Running a GUI application inside a Docker container with VNC can be less performant than a native installation.
  • Audio and Display Forwarding: More advanced configurations are required for seamless audio and display forwarding. Consider using solutions like Xpra or properly configuring X11 forwarding for a more integrated experience, but those are significantly more complex. This simplified example provides basic remote access to the AnyDesk GUI running within the container.
  • License: Ensure that your use of AnyDesk within a Docker container complies with the AnyDesk license agreement.

These alternative methods offer different approaches to installing and running AnyDesk on Debian 12 Bookworm, catering to various needs and technical preferences. Choose the method that best suits your requirements and expertise.

Leave a Reply

Your email address will not be published. Required fields are marked *