| | 1 | = Configuration File = |
| | 2 | |
| | 3 | This documents describes configuration file for aria2. |
| | 4 | |
| | 5 | == How It Works == |
| | 6 | Because aria2 is command-line program, you have to specify options in command-line every time you invoke aria2, which is tedious work and sometimes you forget to specify options. |
| | 7 | |
| | 8 | With configuration file, you can put frequently used options in it and aria2 parses the configuration file every time when it starts. The parse is done before parsing command-line options(there are some exceptions. --no-conf, --conf-path, -h are -v are processed before the configuration file). When there are same options in command-line and configuration file, then the value in command-line is used(there is exception. The value of --header option in configuration file is still used when it is in the command-line because you can provide multiple --header option). |
| | 9 | |
| | 10 | == Location == |
| | 11 | By default, aria2 searches configuration file in $HOME/.aria2/aria2.conf. You can specify your configuration file by --conf-path option. If you don't need configuration file, use --no-conf option, which may be useful for automated tasks. |
| | 12 | |
| | 13 | == Format == |
| | 14 | The configuration file is a text file and has 1 option per each line. |
| | 15 | In each line, you can specify name-value pair in the format: name=value, where name is the long command-line option name |
| | 16 | without -- prefix. You can use same syntax for the command-line option. |
| | 17 | The lines beginning # are treated as comments. |
| | 18 | |
| | 19 | Here is the example of the configuration file: |
| | 20 | |
| | 21 | {{{ |
| | 22 | # this is a comment |
| | 23 | file-allocation=none |
| | 24 | max-upload-limit=50K |
| | 25 | remote-time=true |
| | 26 | all-proxy=http://user:pass@proxy:8888 |
| | 27 | }}} |
| | 28 | |
| | 29 | This configuration has the same effect as you run aria2 in the following options: |
| | 30 | |
| | 31 | {{{ |
| | 32 | aria2c --file-allocation=none --max-upload-limit=50K --remote-time=true --all-proxy=http://user:pass@proxy:8888 .... |
| | 33 | }}} |
| | 34 | |
| | 35 | For the options that don't take argument, you can supply true/false where true means its option is specified and false means it is not specified. |
| | 36 | |
| | 37 | == Security Consideration == |
| | 38 | As you can see the above example, the confidential information such as user/password might be included in the configuration file. I recommend to set file mode bits of the configuration file to 600 or similar, so that other user cannot see the contents of the file. |