github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/docs/content/yandex.md (about) 1 --- 2 title: "Yandex" 3 description: "Yandex Disk" 4 versionIntroduced: "v1.26" 5 --- 6 7 # {{< icon "fa fa-space-shuttle" >}} Yandex Disk 8 9 [Yandex Disk](https://disk.yandex.com) is a cloud storage solution created by [Yandex](https://yandex.com). 10 11 ## Configuration 12 13 Here is an example of making a yandex configuration. First run 14 15 rclone config 16 17 This will guide you through an interactive setup process: 18 19 ``` 20 No remotes found, make a new one? 21 n) New remote 22 s) Set configuration password 23 n/s> n 24 name> remote 25 Type of storage to configure. 26 Choose a number from below, or type in your own value 27 [snip] 28 XX / Yandex Disk 29 \ "yandex" 30 [snip] 31 Storage> yandex 32 Yandex Client Id - leave blank normally. 33 client_id> 34 Yandex Client Secret - leave blank normally. 35 client_secret> 36 Remote config 37 Use web browser to automatically authenticate rclone with remote? 38 * Say Y if the machine running rclone has a web browser you can use 39 * Say N if running rclone on a (remote) machine without web browser access 40 If not sure try Y. If Y failed, try N. 41 y) Yes 42 n) No 43 y/n> y 44 If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth 45 Log in and authorize rclone for access 46 Waiting for code... 47 Got code 48 -------------------- 49 [remote] 50 client_id = 51 client_secret = 52 token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","token_type":"OAuth","expiry":"2016-12-29T12:27:11.362788025Z"} 53 -------------------- 54 y) Yes this is OK 55 e) Edit this remote 56 d) Delete this remote 57 y/e/d> y 58 ``` 59 60 See the [remote setup docs](/remote_setup/) for how to set it up on a 61 machine with no Internet browser available. 62 63 Note that rclone runs a webserver on your local machine to collect the 64 token as returned from Yandex Disk. This only runs from the moment it 65 opens your browser to the moment you get back the verification code. 66 This is on `http://127.0.0.1:53682/` and this it may require you to 67 unblock it temporarily if you are running a host firewall. 68 69 Once configured you can then use `rclone` like this, 70 71 See top level directories 72 73 rclone lsd remote: 74 75 Make a new directory 76 77 rclone mkdir remote:directory 78 79 List the contents of a directory 80 81 rclone ls remote:directory 82 83 Sync `/home/local/directory` to the remote path, deleting any 84 excess files in the path. 85 86 rclone sync --interactive /home/local/directory remote:directory 87 88 Yandex paths may be as deep as required, e.g. `remote:directory/subdirectory`. 89 90 ### Modification times and hashes 91 92 Modified times are supported and are stored accurate to 1 ns in custom 93 metadata called `rclone_modified` in RFC3339 with nanoseconds format. 94 95 The MD5 hash algorithm is natively supported by Yandex Disk. 96 97 ### Emptying Trash 98 99 If you wish to empty your trash you can use the `rclone cleanup remote:` 100 command which will permanently delete all your trashed files. This command 101 does not take any path arguments. 102 103 ### Quota information 104 105 To view your current quota you can use the `rclone about remote:` 106 command which will display your usage limit (quota) and the current usage. 107 108 ### Restricted filename characters 109 110 The [default restricted characters set](/overview/#restricted-characters) 111 are replaced. 112 113 Invalid UTF-8 bytes will also be [replaced](/overview/#invalid-utf8), 114 as they can't be used in JSON strings. 115 116 {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/yandex/yandex.go then run make backenddocs" >}} 117 ### Standard options 118 119 Here are the Standard options specific to yandex (Yandex Disk). 120 121 #### --yandex-client-id 122 123 OAuth Client Id. 124 125 Leave blank normally. 126 127 Properties: 128 129 - Config: client_id 130 - Env Var: RCLONE_YANDEX_CLIENT_ID 131 - Type: string 132 - Required: false 133 134 #### --yandex-client-secret 135 136 OAuth Client Secret. 137 138 Leave blank normally. 139 140 Properties: 141 142 - Config: client_secret 143 - Env Var: RCLONE_YANDEX_CLIENT_SECRET 144 - Type: string 145 - Required: false 146 147 ### Advanced options 148 149 Here are the Advanced options specific to yandex (Yandex Disk). 150 151 #### --yandex-token 152 153 OAuth Access Token as a JSON blob. 154 155 Properties: 156 157 - Config: token 158 - Env Var: RCLONE_YANDEX_TOKEN 159 - Type: string 160 - Required: false 161 162 #### --yandex-auth-url 163 164 Auth server URL. 165 166 Leave blank to use the provider defaults. 167 168 Properties: 169 170 - Config: auth_url 171 - Env Var: RCLONE_YANDEX_AUTH_URL 172 - Type: string 173 - Required: false 174 175 #### --yandex-token-url 176 177 Token server url. 178 179 Leave blank to use the provider defaults. 180 181 Properties: 182 183 - Config: token_url 184 - Env Var: RCLONE_YANDEX_TOKEN_URL 185 - Type: string 186 - Required: false 187 188 #### --yandex-hard-delete 189 190 Delete files permanently rather than putting them into the trash. 191 192 Properties: 193 194 - Config: hard_delete 195 - Env Var: RCLONE_YANDEX_HARD_DELETE 196 - Type: bool 197 - Default: false 198 199 #### --yandex-encoding 200 201 The encoding for the backend. 202 203 See the [encoding section in the overview](/overview/#encoding) for more info. 204 205 Properties: 206 207 - Config: encoding 208 - Env Var: RCLONE_YANDEX_ENCODING 209 - Type: Encoding 210 - Default: Slash,Del,Ctl,InvalidUtf8,Dot 211 212 #### --yandex-description 213 214 Description of the remote 215 216 Properties: 217 218 - Config: description 219 - Env Var: RCLONE_YANDEX_DESCRIPTION 220 - Type: string 221 - Required: false 222 223 {{< rem autogenerated options stop >}} 224 225 ## Limitations 226 227 When uploading very large files (bigger than about 5 GiB) you will need 228 to increase the `--timeout` parameter. This is because Yandex pauses 229 (perhaps to calculate the MD5SUM for the entire file) before returning 230 confirmation that the file has been uploaded. The default handling of 231 timeouts in rclone is to assume a 5 minute pause is an error and close 232 the connection - you'll see `net/http: timeout awaiting response 233 headers` errors in the logs if this is happening. Setting the timeout 234 to twice the max size of file in GiB should be enough, so if you want 235 to upload a 30 GiB file set a timeout of `2 * 30 = 60m`, that is 236 `--timeout 60m`. 237 238 Having a Yandex Mail account is mandatory to use the Yandex.Disk subscription. 239 Token generation will work without a mail account, but Rclone won't be able to complete any actions. 240 ``` 241 [403 - DiskUnsupportedUserAccountTypeError] User account type is not supported. 242 ```