2024-09-28 08:54:05 +02:00
|
|
|
---
|
|
|
|
|
title: "iCloud Drive"
|
|
|
|
|
description: "Rclone docs for iCloud Drive"
|
|
|
|
|
versionIntroduced: "v1.69"
|
2025-01-11 18:36:25 +00:00
|
|
|
status: Beta
|
2024-09-28 08:54:05 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# {{< icon "fa fa-cloud" >}} iCloud Drive
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
The initial setup for an iCloud Drive backend involves getting a trust token/session.
|
|
|
|
|
This can be done by simply using the regular iCloud password, and accepting the code
|
|
|
|
|
prompt on another iCloud connected device.
|
2024-11-20 17:43:42 +00:00
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
**IMPORTANT**: At the moment an app specific password won't be accepted. Only
|
|
|
|
|
use your regular password and 2FA.
|
2024-11-20 17:43:42 +00:00
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
`rclone config` walks you through the token creation. The trust token is valid
|
|
|
|
|
for 30 days. After which you will have to reauthenticate with `rclone reconnect`
|
|
|
|
|
or `rclone config`.
|
2024-09-28 08:54:05 +02:00
|
|
|
|
|
|
|
|
Here is an example of how to make a remote called `iclouddrive`. First run:
|
|
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
```sh
|
|
|
|
|
rclone config
|
|
|
|
|
```
|
2024-09-28 08:54:05 +02:00
|
|
|
|
|
|
|
|
This will guide you through an interactive setup process:
|
|
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
```text
|
2024-09-28 08:54:05 +02:00
|
|
|
No remotes found, make a new one?
|
|
|
|
|
n) New remote
|
|
|
|
|
s) Set configuration password
|
|
|
|
|
q) Quit config
|
|
|
|
|
n/s/q> n
|
|
|
|
|
name> iclouddrive
|
|
|
|
|
Option Storage.
|
|
|
|
|
Type of storage to configure.
|
|
|
|
|
Choose a number from below, or type in your own value.
|
|
|
|
|
[snip]
|
|
|
|
|
XX / iCloud Drive
|
|
|
|
|
\ (iclouddrive)
|
|
|
|
|
[snip]
|
|
|
|
|
Storage> iclouddrive
|
|
|
|
|
Option apple_id.
|
|
|
|
|
Apple ID.
|
|
|
|
|
Enter a value.
|
|
|
|
|
apple_id> APPLEID
|
|
|
|
|
Option password.
|
|
|
|
|
Password.
|
|
|
|
|
Choose an alternative below.
|
|
|
|
|
y) Yes, type in my own password
|
|
|
|
|
g) Generate random password
|
|
|
|
|
y/g> y
|
|
|
|
|
Enter the password:
|
|
|
|
|
password:
|
|
|
|
|
Confirm the password:
|
|
|
|
|
password:
|
|
|
|
|
Edit advanced config?
|
|
|
|
|
y) Yes
|
|
|
|
|
n) No (default)
|
|
|
|
|
y/n> n
|
|
|
|
|
Option config_2fa.
|
|
|
|
|
Two-factor authentication: please enter your 2FA code
|
|
|
|
|
Enter a value.
|
|
|
|
|
config_2fa> 2FACODE
|
|
|
|
|
Remote config
|
|
|
|
|
--------------------
|
2025-01-15 17:58:49 +00:00
|
|
|
[iclouddrive]
|
2024-09-28 08:54:05 +02:00
|
|
|
- type: iclouddrive
|
|
|
|
|
- apple_id: APPLEID
|
|
|
|
|
- password: *** ENCRYPTED ***
|
|
|
|
|
- cookies: ****************************
|
|
|
|
|
- trust_token: ****************************
|
|
|
|
|
--------------------
|
|
|
|
|
y) Yes this is OK (default)
|
|
|
|
|
e) Edit this remote
|
|
|
|
|
d) Delete this remote
|
|
|
|
|
y/e/d> y
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Advanced Data Protection
|
|
|
|
|
|
|
|
|
|
ADP is currently unsupported and need to be disabled
|
|
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
On iPhone, Settings `>` Apple Account `>` iCloud `>` 'Access iCloud Data on the Web'
|
|
|
|
|
must be ON, and 'Advanced Data Protection' OFF.
|
2025-01-15 17:58:49 +00:00
|
|
|
|
|
|
|
|
## Troubleshooting
|
|
|
|
|
|
|
|
|
|
### Missing PCS cookies from the request
|
|
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
This means you have Advanced Data Protection (ADP) turned on. This is not supported
|
|
|
|
|
at the moment. If you want to use rclone you will have to turn it off. See above
|
|
|
|
|
for how to turn it off.
|
2025-01-15 17:58:49 +00:00
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
You will need to clear the `cookies` and the `trust_token` fields in the config.
|
|
|
|
|
Or you can delete the remote config and start again.
|
2025-01-15 17:58:49 +00:00
|
|
|
|
|
|
|
|
You should then run `rclone reconnect remote:`.
|
|
|
|
|
|
2025-08-25 00:00:48 +02:00
|
|
|
Note that changing the ADP setting may not take effect immediately - you may
|
|
|
|
|
need to wait a few hours or a day before you can get rclone to work - keep
|
|
|
|
|
clearing the config entry and running `rclone reconnect remote:` until rclone
|
|
|
|
|
functions properly.
|
2025-01-15 17:58:49 +00:00
|
|
|
|
2024-09-28 08:54:05 +02:00
|
|
|
{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/iclouddrive/iclouddrive.go then run make backenddocs" >}}
|
|
|
|
|
### Standard options
|
|
|
|
|
|
|
|
|
|
Here are the Standard options specific to iclouddrive (iCloud Drive).
|
|
|
|
|
|
|
|
|
|
#### --iclouddrive-apple-id
|
|
|
|
|
|
|
|
|
|
Apple ID.
|
|
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
|
|
- Config: apple_id
|
|
|
|
|
- Env Var: RCLONE_ICLOUDDRIVE_APPLE_ID
|
|
|
|
|
- Type: string
|
|
|
|
|
- Required: true
|
|
|
|
|
|
|
|
|
|
#### --iclouddrive-password
|
|
|
|
|
|
|
|
|
|
Password.
|
|
|
|
|
|
|
|
|
|
**NB** Input to this must be obscured - see [rclone obscure](/commands/rclone_obscure/).
|
|
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
|
|
- Config: password
|
|
|
|
|
- Env Var: RCLONE_ICLOUDDRIVE_PASSWORD
|
|
|
|
|
- Type: string
|
|
|
|
|
- Required: true
|
|
|
|
|
|
|
|
|
|
#### --iclouddrive-trust-token
|
|
|
|
|
|
2025-01-12 15:09:13 +00:00
|
|
|
Trust token (internal use)
|
2024-09-28 08:54:05 +02:00
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
|
|
- Config: trust_token
|
|
|
|
|
- Env Var: RCLONE_ICLOUDDRIVE_TRUST_TOKEN
|
|
|
|
|
- Type: string
|
|
|
|
|
- Required: false
|
|
|
|
|
|
|
|
|
|
#### --iclouddrive-cookies
|
|
|
|
|
|
|
|
|
|
cookies (internal use only)
|
|
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
|
|
- Config: cookies
|
|
|
|
|
- Env Var: RCLONE_ICLOUDDRIVE_COOKIES
|
|
|
|
|
- Type: string
|
|
|
|
|
- Required: false
|
|
|
|
|
|
|
|
|
|
### Advanced options
|
|
|
|
|
|
|
|
|
|
Here are the Advanced options specific to iclouddrive (iCloud Drive).
|
|
|
|
|
|
2025-01-12 15:09:13 +00:00
|
|
|
#### --iclouddrive-client-id
|
|
|
|
|
|
|
|
|
|
Client id
|
|
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
|
|
- Config: client_id
|
|
|
|
|
- Env Var: RCLONE_ICLOUDDRIVE_CLIENT_ID
|
|
|
|
|
- Type: string
|
|
|
|
|
- Default: "d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d"
|
|
|
|
|
|
2024-09-28 08:54:05 +02:00
|
|
|
#### --iclouddrive-encoding
|
|
|
|
|
|
|
|
|
|
The encoding for the backend.
|
|
|
|
|
|
|
|
|
|
See the [encoding section in the overview](/overview/#encoding) for more info.
|
|
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
|
|
- Config: encoding
|
|
|
|
|
- Env Var: RCLONE_ICLOUDDRIVE_ENCODING
|
|
|
|
|
- Type: Encoding
|
|
|
|
|
- Default: Slash,BackSlash,Del,Ctl,InvalidUtf8,Dot
|
|
|
|
|
|
|
|
|
|
#### --iclouddrive-description
|
|
|
|
|
|
|
|
|
|
Description of the remote.
|
|
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
|
|
- Config: description
|
|
|
|
|
- Env Var: RCLONE_ICLOUDDRIVE_DESCRIPTION
|
|
|
|
|
- Type: string
|
|
|
|
|
- Required: false
|
|
|
|
|
|
|
|
|
|
{{< rem autogenerated options stop >}}
|