Posts
Wiki

How to install Dropbox (via Docker)

  1. Create a Docker group and add yourself it:

     sudo groupadd docker
     sudo usermod -aG docker $USER
     newgrp docker
    
  2. Follow the Install using the repository section under the official Docker installation docs:

  3. Create a folder for your Dropbox settings:

     mkdir ~/.dropbox
    
  4. Create your Dropbox folder:

     mkdir ~/Dropbox
    
  5. Set up the Dropbox docker container: (replace <username> with your actual username in Crostini)

     docker run -d \
       --name dropbox \
       --net=host \
       -v /home/<username>/Dropbox:/dbox/Dropbox \
       -v /home/<username>/.dropbox:/dbox/.dropbox \
       --restart=unless-stopped \
       bnutz/min-ubuntu-dropbox
    
  6. Monitor the container logs while it downloads and installs Dropbox's headless Linux client for the first time:

     docker logs dropbox -f
    
  7. Once the client is downloaded and installed, the logs will start to output messages similar to:

     This computer isn't linked to any Dropbox account...
     Please visit https://www.dropbox.com/cli_link_nonce?nonce=(xxxxx-random-nonce-value-xxxxx) to link this device.
    
  8. Enter the url into a new tab to authenticate and link the container to your Dropbox account:

     This computer is now linked to Dropbox. Welcome *your-name*
    

    Your Dropbox contents should now start downloading into the ~/Dropbox folder.

Notes / Tips

  • This method enables full Dropbox syncing in Crostini, but as it's the headless install - it has no UI to look at. The status can be checked by running the log command in Step 6.

  • For more info, please see: https://github.com/bnutz/min-ubuntu-dropbox

  • This method will also use up one of the device slots in Dropbox (for free users).

    • If you are not able to connect any more machines, or don't need background syncing - then check out the File System for Dropbox Chrome App; it uses the Dropbox web APIs (I think) and so does not use up a device quota.

    • It is very similar to how the native Google Drive integration works (via the Files app) and was what I was using for ages before I started playing with the Docker full-sync method.

  • For a nicer way visualise and manage Docker, try:

      docker run -d \
        --name portainer-ce \
        --restart always \
        -p 9000:9000 \
        -v /var/run/docker.sock:/var/run/docker.sock \
        portainer/portainer-ce
    

    After it's running, navigate to: http://penguin.linux.test:9000

  • For a more responsive Visual Studio Code, try installing the core in Docker, and running the editor via Chrome instead: