Dropbox with a Custom Sync Directory

How to install Dropbox on an Ubuntu-based distro and configure it to sync to a non-default directory — including the nautilus-dropbox CLI workaround.

Beginner Verified Working Updated 8 min read Tested on Linux Mint 22.3 Cinnamon (Ubuntu 24.04 Noble base); also tested on Zorin OS 18.1 Pro Hardware Lenovo ThinkPad L14 Gen 2 (Intel i5-1135G7, 16GB RAM, Intel Iris Xe, 1366x768)

What This Guide Achieves

GoalStatus
Install Dropbox on an Ubuntu-based distroDone
Sync Dropbox files to a custom directory (not ~/Dropbox)Done
Get Nautilus file manager integration (sync icons, right-click menu)Done
Link your Dropbox account via browserDone

Prerequisites

  • Any Ubuntu 24.04-based distro
  • Internet connection
  • A working web browser (Firefox, Chrome, or Edge)
  • The target directory should be on a partition that is mounted whenever Dropbox starts. The tested setup used an internal partition; removable external drives are a riskier choice for always-on sync.
  • Verify partition ownership: If your target directory is on a separate partition, check that your user owns it. A root-owned partition (common with fresh internal drives) will silently prevent Dropbox from syncing. Run lsblk -f to list partitions, then sudo chown -R $USER:$USER /media/yourusername/partitionname if needed.
  • Critical: Add the partition to /etc/fstab for auto-mount at boot. Without this, the partition stays unmounted after every restart — Dropbox shows “Can’t sync” or “Folder missing” because the symlink target doesn’t exist until you manually click the drive in Nemo. See Rename Drive Labels - Make Partitions Auto-Mount.

The Problem (Windows User Perspective)

On Windows, you download Dropbox, install it, and choose where to put your Dropbox folder during setup. On Linux, there’s no official GUI installer — Dropbox provides a “headless” daemon that you install from the terminal. By default, it creates a Dropbox folder in your home directory (~/Dropbox). If you want your files somewhere else (like a separate partition), you need to set that up before the first run.


Solution

This is the simplest approach — one command gives you Dropbox with full file manager integration. Choose the package that matches your desktop environment:

For GNOME/Nautilus (Ubuntu, Zorin OS):

sudo apt update
sudo apt install nautilus-dropbox -y

For Cinnamon/Nemo (Linux Mint):

sudo apt update
sudo apt install nemo-dropbox -y

This installs:

  • The Dropbox daemon
  • File manager integration (sync status icons on files)
  • System tray icon
  • Right-click Dropbox menu in Files

Relaunch the file manager:

# Nautilus (GNOME/Zorin)
nautilus -q
# Nemo (Cinnamon/Mint)
nemo -q

Dropbox will appear in your system tray. Sign in and it will sync to ~/Dropbox by default.

To use a custom directory with this method, use the symlink approach after initial sync:

Before moving the folder: If your target location is on a separate partition, verify your user owns it first:

sudo chown -R $USER:$USER /media/mohsin/bigd
# Stop Dropbox first
dropbox stop
# Move the folder to your desired location
mv ~/Dropbox /media/mohsin/bigd/Dropbox
# Create a symlink so Dropbox thinks the folder is still in ~/
ln -s /media/mohsin/bigd/Dropbox ~/Dropbox
# Restart
dropbox start

Enable autostart so Dropbox starts when you log in:

dropbox autostart y

Option B: Headless Install with Custom Path (Advanced)

This method lets you set the Dropbox folder location before the first sync, avoiding any file moving.

Step 1 — Download and extract the Dropbox daemon

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

This creates a .dropbox-dist folder in your home directory containing the daemon.

Step 2 — Create your target folder

mkdir -p /media/mohsin/bigd/Dropbox

Replace /media/mohsin/bigd/Dropbox with wherever you want your files. Prefer a location that is mounted every time you log in. In the tested setup, that meant an internal partition rather than a removable USB drive.

Step 3 — Start the daemon with custom path

DROPBOX_PATH=/media/mohsin/bigd/Dropbox ~/.dropbox-dist/dropboxd

The DROPBOX_PATH environment variable tells Dropbox where to create its sync folder.

The daemon needs to be linked to your Dropbox account. It should print a URL like:

To link this computer to a Dropbox account, visit the following url:
https://www.dropbox.com/cli_link_nonce?nonce=xxxxxxxx

If the URL doesn’t appear in the terminal output, open a new terminal and run:

# Download the CLI control script first
wget -O ~/dropbox.py "https://www.dropbox.com/download?dl=packages/dropbox.py"
chmod +x ~/dropbox.py

# Get the linking URL
~/dropbox.py status

Copy the URL and paste it in your browser. Log into your Dropbox account. The daemon will start syncing automatically.

Note: The linking URL (nonce) expires quickly. Don’t run status again before visiting the URL — each call generates a new nonce that invalidates the previous one.

Step 5 — Verify sync is working

~/dropbox.py status
# Should show "Syncing..." or "Up to date"

ls /media/mohsin/bigd/Dropbox
# Your Dropbox files should appear here

Step 6 — Set up the CLI shortcut

sudo ln -s ~/dropbox.py /usr/local/bin/dropbox

Now you can control Dropbox from anywhere:

dropbox start       # Start the daemon
dropbox stop        # Stop the daemon
dropbox status      # Check sync status

Step 7 — Auto-start on boot (Optional)

Create a systemd service:

sudo nano /etc/systemd/system/dropbox.service

Paste:

[Unit]
Description=Dropbox Daemon
After=network.target

[Service]
User=mohsin
Environment=DROPBOX_PATH=/media/mohsin/bigd/Dropbox
ExecStart=/home/mohsin/.dropbox-dist/dropboxd
Restart=on-failure

[Install]
WantedBy=multi-user.target

Replace every occurrence of mohsin with your own username (check with whoami). This affects both the User= line and the path inside ExecStart=. The DROPBOX_PATH value should match the custom directory you set in Step 1.

Enable it:

sudo systemctl daemon-reload
sudo systemctl enable dropbox
sudo systemctl start dropbox

What Didn’t Work (and Why)

Approach TriedWhy It Failed
Moving an existing large Dropbox folder to a new locationTakes extremely long for large folders — set the path before first run instead
Clicking the terminal URL to open browserSome terminal emulators don’t support click-to-open URLs by default — copy/paste the URL into your browser manually
Running dropbox status before downloading dropbox.pyThe dropbox command isn’t available until you install nautilus-dropbox or download dropbox.py
Running ~/dropbox.py status multiple times to get the linking URLEach call generates a new nonce that invalidates the previous one — visit the URL immediately
Trying to use a removable external USB drive for Dropbox syncIn this workflow the drive may not be mounted when Dropbox starts, so an always-available location is the safer default
Having a residual Dropbox folder on a different partition from the symlink targetIf another partition has a Dropbox folder from a previous attempt, Dropbox may detect it first and use the wrong location
Setting Dropbox to sync on a root-owned partition without chown firstDropbox runs as your user and cannot write files to a root-owned directory — the folder appears empty after linking

Verification

# Check Dropbox is running
dropbox status
# Expected: "Up to date" or "Syncing..."

# Check files are in the right location
ls /media/mohsin/bigd/Dropbox

# Check Dropbox config (if using headless install)
cat ~/.dropbox/info.json
# Should show your chosen path

Troubleshooting

SymptomCauseFix
Command 'dropbox' not foundCLI script not installedRun sudo apt install nautilus-dropbox or download dropbox.py
Daemon starts but no linking URL appearsURL may have opened in browser automaticallyCheck your browser for an open Dropbox tab
info.json: No such file or directoryAccount not linked yetRe-run daemon and visit the linking URL
Flatpak repo error in terminal outputUnrelated to Dropbox — a separate Flatpak issueIgnore it, doesn’t affect Dropbox
/media/mohsin/bigd/Dropbox folder is empty after linkingSync hasn’t started or path wasn’t set correctlyCheck ~/dropbox.py status and verify DROPBOX_PATH was set

Complete Removal

# Stop Dropbox
dropbox stop

# Remove the daemon
rm -rf ~/.dropbox-dist

# Remove Dropbox config
rm -rf ~/.dropbox

# Remove Nautilus integration (if installed)
sudo apt remove nautilus-dropbox

# Remove the sync folder (CAUTION: deletes all local Dropbox files)
# rm -rf /media/mohsin/bigd/Dropbox

# Remove CLI shortcut
sudo rm /usr/local/bin/dropbox
rm ~/dropbox.py

# Remove systemd service (if created)
sudo systemctl stop dropbox
sudo systemctl disable dropbox
sudo rm /etc/systemd/system/dropbox.service
sudo systemctl daemon-reload

Discussion