How to Setup Box Cloud Storage

Box is a cloud storage service, similar to Google Drive or Dropbox, that is widely used by universities. My school (UC Davis) provides its community with Box storage, including unlimited storage capacity and support for individual files up to 150 GB (UC Davis ServiceHub policy).

This makes Box a convenient option for storing research artifacts such as model checkpoints, datasets, and other large files.

How to setup Box Cloud Storage

My setup is:

1
2
3
Local machine: macOS, with browser access
Remote machines: Linux servers, usually headless (i.e., no GUI or browser available.)
Storage backend: UC Davis Box

Since most data reside on Linux servers (of whom all are headless), I need a CLI tool for uploads and downloads. I chose rclone, a command-line program that manages files on cloud storage and supports multiple backends including Box.

The core idea is simple:

1
2
3
4
5
Configure Box once on the local Mac
-> authenticate through browser
-> get rclone.conf
-> copy rclone.conf to headless Linux servers
-> use rclone on each server to upload/download files

1. Install rclone

On macOS:

1
2
brew install rclone
rclone version

On Linux:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mkdir -p ~/bin ~/tmp/rclone-install
cd ~/tmp/rclone-install

curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64

cp rclone ~/bin/
chmod +x ~/bin/rclone

# You can switch bash to zsh or other shells
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

rclone version

2. Configure Box on the local Mac

Run:

1
rclone config

Create a new remote:

1
2
3
n) New remote
name> box
Storage> box

Use blank/default values, then authenticate in the browser:

1
2
3
4
5
6
client_id>
client_secret>
box_config_file>
access_token>
Edit advanced config? n
Use web browser to automatically authenticate rclone with remote? y

After browser login:

1
2
Keep this "box" remote?
y

Test:

1
2
rclone lsd box:
rclone about box:

3. Copy the config to Linux servers

Find the local config file:

1
rclone config file

Usually:

1
~/.config/rclone/rclone.conf

Copy it to a server:

1
scp ~/.config/rclone/rclone.conf <REMOTE_USER>@<REMOTE_HOST>:~/rclone.conf

On the server:

1
2
3
4
5
6
7
8
mkdir -p ~/.config/rclone
chmod 700 ~/.config/rclone

mv ~/rclone.conf ~/.config/rclone/rclone.conf
chmod 600 ~/.config/rclone/rclone.conf

rclone lsd box:
rclone about box:

You should see content like:

1
2
3
4
5
6
rclone lsd box:
rclone about box:
-1 2026-06-10 10:50:58 -1 rclone-speedtest
Total: 8.000 EiB
Used: 138.340 MiB
Free: 8.000 EiB

Repeat this copy step for other headless servers.

4. Basic usage

Create a project folder:

1
2
rclone mkdir box:research-artifacts
rclone mkdir box:research-artifacts/<PROJECT_NAME>

Upload a file:

1
2
3
4
5
6
7
rclone copy ./latest.pt box:research-artifacts/<PROJECT_NAME>/ \
--progress \
--transfers 4 \
--checkers 8 \
--retries 10 \
--low-level-retries 20 \
--stats 30s

Download a file:

1
2
rclone copy box:research-artifacts/<PROJECT_NAME>/latest.pt ./ \
--progress

Upload selected experiment artifacts:

1
2
3
4
5
6
7
8
9
rclone copy ./runs/exp_001 box:research-artifacts/<PROJECT_NAME>/exp_001/ \
--include "config.yaml" \
--include "metrics.csv" \
--include "*.json" \
--include "*.mp4" \
--include "*final*.pt" \
--include "*best*.pt" \
--exclude "*" \
--progress

5. Speed notes

Observed upload speed:

1
2
3
4
5
China-side local machine -> Box:
~1–3 MiB/s

US-side Linux server -> Box:
~7–10 MiB/s

Conclusion:

  • Use the US servers as the main Box upload endpoints.
  • Avoid uploading large artifacts from the China-side local machine.

6. Security

The config file contains private Box credentials:

1
~/.config/rclone/rclone.conf

Keep it private:

1
2
chmod 700 ~/.config/rclone
chmod 600 ~/.config/rclone/rclone.conf

Do not commit it to Git or paste its token into logs.

If the token is exposed, reconnect:

1
rclone config reconnect box:

Then copy the refreshed rclone.conf to the servers again.