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 | Local machine: macOS, with browser access |
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 | Configure Box once on the local Mac |
1. Install rclone
On macOS:
1 | brew install rclone |
On Linux:
1 | mkdir -p ~/bin ~/tmp/rclone-install |
2. Configure Box on the local Mac
Run:
1 | rclone config |
Create a new remote:
1 | n) New remote |
Use blank/default values, then authenticate in the browser:
1 | client_id> |
After browser login:
1 | Keep this "box" remote? |
Test:
1 | rclone lsd 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 | mkdir -p ~/.config/rclone |
You should see content like:
1 | rclone lsd box: |
Repeat this copy step for other headless servers.
4. Basic usage
Create a project folder:
1 | rclone mkdir box:research-artifacts |
Upload a file:
1 | rclone copy ./latest.pt box:research-artifacts/<PROJECT_NAME>/ \ |
Download a file:
1 | rclone copy box:research-artifacts/<PROJECT_NAME>/latest.pt ./ \ |
Upload selected experiment artifacts:
1 | rclone copy ./runs/exp_001 box:research-artifacts/<PROJECT_NAME>/exp_001/ \ |
5. Speed notes
Observed upload speed:
1 | China-side local machine -> Box: |
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 | chmod 700 ~/.config/rclone |
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.