Commands and parameters


Use the following commands to work with the client:

  • token: Get an authorization key (OAuth token) for your Yandex username.
    When entering the command, you can specify the file name for the token and the path to it (FILE). If no additional options are specified, the file passwd will be created in the directory ~/.config/yandex-disk to store the token.
    $ yandex-disk token [FILE]
    You don't need to enter your username and password in the client. After calling the command, Yandex Disk will ask you to open a certain page in the browser and enter your unique code there.
    Note. Before entering the code, make sure you are logged in to the browser under the correct account.
  • start: Launch the daemon and sync all folders except those on the exclude-dirs exclusion list.
    $ yandex-disk start [OPTION]
  • status: Display the daemon's status (sync status, sync errors, list of synced files, and total and available space on Yandex Disk).
    $ yandex-disk status [OPTION]
  • stop: Stop the daemon.
    $ yandex-disk stop [OPTION]
  • sync: Sync all folders except those on the exclude-dirs exclusion list.
    $ yandex-disk sync [OPTION]
  • publish: Get a public link to the specified file or folder (FILE).
    $ yandex-disk publish [OPTION] FILE
  • unpublish: Unpublish the specified file or folder (FILE).
    $ yandex-disk unpublish FILE

Additional options [OPTION]

--config=FILE, -c FILE

Show the configuration file. The config.cfg file is used by default in ~/.config/yandex-disk.

--dir=DIR, -d DIR

Enter the folder where the local copy of Yandex Disk will be stored. If a name was not entered during the initial setup, ~/Yandex Disk will be used by default.

--auth=FILE, -a FILE

Enter the file containing authorization data. The default file is passwd, which was created using the token command or the setup wizard and is stored in ~/.config/yandex-disk.


Do not sync the specified directories. For these settings to always apply, these directories must be added to the exclude-dirs exclusion list in the config.cfg file. For settings to work correctly, the names of excluded directories should be separated with commas, not spaces.


Forbid changing files on the Yandex Disk server and only sync local copies. In the event of syncing conflicts, local files are renamed. If the --overwrite setting is also enabled, local files are overwritten.


Let changes made to the local copy of Yandex Disk be overwritten when syncing with the server. Used together with the --read-only option.

--no-daemon, -D

Launch the daemon without returning management to the console. To return management, the daemon must be stopped by launching the command yandex-disk stop in another console or by closing the current console.

--help, -h

Display help.


Configure a proxy server. Valid parameters:

  • auto: Use system proxy settings (used by default).
  • no: Do not use a proxy server.
  • protocol,address,port,login,password: Manually set up the server.

Examples of using commands

$ yandex-disk start -c ~/ydconfig/newconfig.cfg # launch the daemon and sync with the specified configuration file 
$ yandex-disk start --exclude-dirs=Foto # do not sync the Photo folder
$ yandex-disk sync --read-only # sync folders in read-only mode
$ yandex-disk publish Foto # get a public link to the Photo folder