Easy Steps To Install Dropbox on Debian 12 Bookworm

Posted on

Easy Steps To Install Dropbox on Debian 12 Bookworm

Easy Steps To Install Dropbox on Debian 12 Bookworm

This tutorial aims to guide you through the process of installing Dropbox on Debian 12 Bookworm and setting up the Dropbox Command Line Interface (CLI). Dropbox is a leading cloud storage solution, allowing you to securely store your files online and synchronize them across multiple devices. You can easily share files and folders with others using Dropbox links. The free Dropbox plan offers 2 GB of storage. Follow the steps below to successfully install Dropbox on Debian 12 Bookworm.

Before you begin, ensure you have access to your Debian 12 server as a non-root user with sudo privileges. If you haven’t already, you can refer to a guide on initial server setup for Debian 12 Bookworm to configure this.

Now, let’s proceed with the steps to Install Dropbox on Debian 12 Bookworm.

Step 1 – Download and Install Dropbox on Debian 12

First, update your system’s package list:

sudo apt update

Next, download the appropriate Dropbox package from the Dropbox official website using the wget command.

Download Dropbox for Linux

For 64-bit OS, execute the following command in the terminal:

sudo cd ~ && sudo wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

For 32-bit OS, use this command:

sudo cd ~ && sudo wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -

Note: The above command creates a hidden folder named .dropbox-dist in your home directory. To view hidden folders, navigate to your home directory using cd ~ and then type ls -a.

Step 2 – How To Launch Dropbox from the Linux Terminal?

Run the Dropbox daemon with the following command:

sudo ~/.dropbox-dist/dropboxd

Note: If you’re running Dropbox on your server for the first time, you’ll be prompted to copy and paste a link into a browser to create a new account or link your server to an existing account.

This computer isn't linked to any Dropbox account...
Please visit https://www.dropbox.com/cli_link_nonce?nonce=02a629dbedbaa8dd65 to link this device.

Once linked, your Dropbox folder will be created in your home directory.

You can also access the Dropbox app on your Debian 12 desktop under Applications > Internet. Click on it to launch the application.

After installing the Dropbox app on your PC, mobile device, or Linux server, any files you store locally in your Dropbox folder will be automatically synchronized with the Dropbox servers.

Step 3 – How To Install Dropbox CLI on Debian 12?

Dropbox offers a command-line interface (CLI) for controlling Dropbox via the command line. This allows you to start, stop, synchronize, and check the status of files.

Debian 12 usually comes with Python 3 pre-installed. If it’s missing, you can install it using:

sudo apt install python3

Download the Dropbox command line

Download the Python script necessary for controlling Dropbox from the command line:

sudo wget -O /usr/local/bin/dropbox "https://www.dropbox.com/download?dl=packages/dropbox.py"

Make the script executable:

sudo chmod +x /usr/local/bin/dropbox

To see a list of available Dropbox CLI commands, simply run:

dropbox
Output
Dropbox command-line interface

commands:

Note: use dropbox help <command> to view usage for a specific command.

 autostart    automatically start Dropbox at login
 exclude      ignores/excludes a directory from syncing
 filestatus   get current sync status of one or more files
 help         provide help
 lansync      enables or disables LAN sync
 ls           list directory contents with current sync status
 proxy        set proxy settings for Dropbox
 running      return whether Dropbox is running
 sharelink    get a shared link for a file in your Dropbox
 start        start dropboxd
 status       get current status of the dropboxd
 stop         stop dropboxd
 throttle     set bandwidth limits for Dropbox
 update       download latest version of Dropbox
 version      print version information for Dropbox

For example, to check the Dropbox version, use:

dropbox version
Output
Dropbox daemon version: 176.4.5108
Dropbox command-line interface version: 2022.12.05

Conclusion

You have now successfully learned how to Install Dropbox on Debian 12 Bookworm and the Dropbox CLI. Dropbox provides a convenient cloud storage solution for sharing, saving files, and more. Enjoy using Dropbox on your Debian 12 system!

You might also find these articles helpful:

Set Up Time Synchronization on Debian 12 Bookworm

Install PHP with Apache and Nginx on Debian 12

Configure Firewall with UFW on Debian 12 Bookworm

Alternative Installation Methods for Dropbox on Debian 12

While the official method detailed above works reliably, there are alternative ways to Install Dropbox on Debian 12 Bookworm, each with its own advantages and disadvantages. Here are two such alternatives:

1. Using a Graphical Package Manager (e.g., Synaptic)

Debian 12 offers graphical package managers like Synaptic. While Dropbox isn’t directly available in the standard Debian repositories, this method can be used in conjunction with downloading the .deb package from Dropbox and then using Synaptic to resolve any dependency issues. This offers a more user-friendly approach, especially for those less comfortable with the command line.

Explanation:

Synaptic is a GUI-based package management tool that simplifies the process of installing, removing, and upgrading software packages. It automatically handles dependencies, making it easier to install software that requires other packages to be present on the system.

Steps:

  1. Install Synaptic (if not already installed):

    sudo apt update
    sudo apt install synaptic
  2. Download the Dropbox .deb package: Download the appropriate .deb package for your system architecture (32-bit or 64-bit) from the Dropbox website. As of my last update, there isn’t a direct link to a .deb package, so downloading with wget as described in the original article and then extracting is necessary. If a direct .deb package becomes available, you can download it with wget:

    #Example hypothetical command, replace with actual .deb link if available
    sudo wget https://www.dropbox.com/download/dropbox.deb
  3. Open Synaptic Package Manager: Launch Synaptic from your desktop environment’s application menu.

  4. Install the .deb package: In Synaptic, go to File -> Add Custom Package... and select the downloaded .deb file.

  5. Resolve Dependencies: Synaptic will analyze the package and identify any missing dependencies. If there are any, click the "Mark for Installation" checkbox next to each missing dependency. Then, click "Apply" to install the package and its dependencies.

Advantages:

  • User-friendly interface.
  • Automatic dependency resolution.

Disadvantages:

  • Relies on a .deb package being available (or the ability to create one from the downloaded tarball).
  • Still requires downloading the Dropbox package manually.

2. Using Flatpak

Flatpak is a universal package management system that allows you to install applications in a sandboxed environment, isolating them from the rest of your system. This can be useful for installing applications that might have conflicting dependencies or that you want to keep separate from your main system.

Explanation:

Flatpak applications are distributed as bundles that include all the necessary dependencies, ensuring that the application will run consistently across different Linux distributions.

Steps:

  1. Install Flatpak: If Flatpak is not already installed on your system, you can install it using the following command:

    sudo apt update
    sudo apt install flatpak
  2. Add the Flathub repository: Flathub is the main repository for Flatpak applications. Add it to your system using the following command:

    flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  3. Install Dropbox via Flatpak: Search for Dropbox in the Flatpak repository and install it. This usually involves using flatpak search dropbox to find the correct application ID and then installing it with flatpak install <application_id>. However, as of the current date, Dropbox is not available directly as a Flatpak. If it were, the command might look like this (replace <application_id> with the actual ID if Dropbox becomes available):

    #Hypothetical example
    flatpak install flathub com.dropbox.Client
  4. Run Dropbox: Once installed, you can run Dropbox from your desktop environment’s application menu or by using the following command:

    #Hypothetical example, if com.dropbox.Client was the ID
    flatpak run com.dropbox.Client

Advantages:

  • Sandboxed environment for better security.
  • Consistent application behavior across different distributions.
  • Easier dependency management.

Disadvantages:

  • Not available for Dropbox as of current knowledge.
  • Applications may take up more disk space due to bundled dependencies.
  • Can sometimes be slightly slower than native applications due to the sandboxed environment.

These alternative methods provide flexibility when installing Dropbox on Debian 12 Bookworm, catering to different preferences and technical skill levels. While the original method remains the most straightforward official approach, understanding these alternatives can be valuable in various situations. Be sure to consult the official Dropbox documentation and Flatpak/Synaptic documentation for the most up-to-date information and instructions. Install Dropbox on Debian 12 Bookworm with the method that best suits your needs!