github.com/10XDev/rclone@v1.52.3-0.20200626220027-16af9ab76b2a/docs/content/commands/rclone_serve_dlna.md (about) 1 --- 2 title: "rclone serve dlna" 3 description: "Serve remote:path over DLNA" 4 slug: rclone_serve_dlna 5 url: /commands/rclone_serve_dlna/ 6 # autogenerated - DO NOT EDIT, instead edit the source code in cmd/serve/dlna/ and as part of making a release run "make commanddocs" 7 --- 8 # rclone serve dlna 9 10 Serve remote:path over DLNA 11 12 ## Synopsis 13 14 rclone serve dlna is a DLNA media server for media stored in an rclone remote. Many 15 devices, such as the Xbox and PlayStation, can automatically discover this server in the LAN 16 and play audio/video from it. VLC is also supported. Service discovery uses UDP multicast 17 packets (SSDP) and will thus only work on LANs. 18 19 Rclone will list all files present in the remote, without filtering based on media formats or 20 file extensions. Additionally, there is no media transcoding support. This means that some 21 players might show files that they are not able to play back correctly. 22 23 24 ## Server options 25 26 Use --addr to specify which IP address and port the server should 27 listen on, eg --addr 1.2.3.4:8000 or --addr :8080 to listen to all 28 IPs. 29 30 Use --name to choose the friendly server name, which is by 31 default "rclone (hostname)". 32 33 Use --log-trace in conjunction with -vv to enable additional debug 34 logging of all UPNP traffic. 35 36 ## Directory Cache 37 38 Using the `--dir-cache-time` flag, you can set how long a 39 directory should be considered up to date and not refreshed from the 40 backend. Changes made locally in the mount may appear immediately or 41 invalidate the cache. However, changes done on the remote will only 42 be picked up once the cache expires if the backend configured does not 43 support polling for changes. If the backend supports polling, changes 44 will be picked up on within the polling interval. 45 46 Alternatively, you can send a `SIGHUP` signal to rclone for 47 it to flush all directory caches, regardless of how old they are. 48 Assuming only one rclone instance is running, you can reset the cache 49 like this: 50 51 kill -SIGHUP $(pidof rclone) 52 53 If you configure rclone with a [remote control](/rc) then you can use 54 rclone rc to flush the whole directory cache: 55 56 rclone rc vfs/forget 57 58 Or individual files or directories: 59 60 rclone rc vfs/forget file=path/to/file dir=path/to/dir 61 62 ## File Buffering 63 64 The `--buffer-size` flag determines the amount of memory, 65 that will be used to buffer data in advance. 66 67 Each open file descriptor will try to keep the specified amount of 68 data in memory at all times. The buffered data is bound to one file 69 descriptor and won't be shared between multiple open file descriptors 70 of the same file. 71 72 This flag is a upper limit for the used memory per file descriptor. 73 The buffer will only use memory for data that is downloaded but not 74 not yet read. If the buffer is empty, only a small amount of memory 75 will be used. 76 The maximum memory used by rclone for buffering can be up to 77 `--buffer-size * open files`. 78 79 ## File Caching 80 81 These flags control the VFS file caching options. The VFS layer is 82 used by rclone mount to make a cloud storage system work more like a 83 normal file system. 84 85 You'll need to enable VFS caching if you want, for example, to read 86 and write simultaneously to a file. See below for more details. 87 88 Note that the VFS cache works in addition to the cache backend and you 89 may find that you need one or the other or both. 90 91 --cache-dir string Directory rclone will use for caching. 92 --vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s) 93 --vfs-cache-mode string Cache mode off|minimal|writes|full (default "off") 94 --vfs-cache-poll-interval duration Interval to poll the cache for stale objects. (default 1m0s) 95 --vfs-cache-max-size int Max total size of objects in the cache. (default off) 96 97 If run with `-vv` rclone will print the location of the file cache. The 98 files are stored in the user cache file area which is OS dependent but 99 can be controlled with `--cache-dir` or setting the appropriate 100 environment variable. 101 102 The cache has 4 different modes selected by `--vfs-cache-mode`. 103 The higher the cache mode the more compatible rclone becomes at the 104 cost of using disk space. 105 106 Note that files are written back to the remote only when they are 107 closed so if rclone is quit or dies with open files then these won't 108 get written back to the remote. However they will still be in the on 109 disk cache. 110 111 If using --vfs-cache-max-size note that the cache may exceed this size 112 for two reasons. Firstly because it is only checked every 113 --vfs-cache-poll-interval. Secondly because open files cannot be 114 evicted from the cache. 115 116 ### --vfs-cache-mode off 117 118 In this mode the cache will read directly from the remote and write 119 directly to the remote without caching anything on disk. 120 121 This will mean some operations are not possible 122 123 * Files can't be opened for both read AND write 124 * Files opened for write can't be seeked 125 * Existing files opened for write must have O_TRUNC set 126 * Files open for read with O_TRUNC will be opened write only 127 * Files open for write only will behave as if O_TRUNC was supplied 128 * Open modes O_APPEND, O_TRUNC are ignored 129 * If an upload fails it can't be retried 130 131 ### --vfs-cache-mode minimal 132 133 This is very similar to "off" except that files opened for read AND 134 write will be buffered to disks. This means that files opened for 135 write will be a lot more compatible, but uses the minimal disk space. 136 137 These operations are not possible 138 139 * Files opened for write only can't be seeked 140 * Existing files opened for write must have O_TRUNC set 141 * Files opened for write only will ignore O_APPEND, O_TRUNC 142 * If an upload fails it can't be retried 143 144 ### --vfs-cache-mode writes 145 146 In this mode files opened for read only are still read directly from 147 the remote, write only and read/write files are buffered to disk 148 first. 149 150 This mode should support all normal file system operations. 151 152 If an upload fails it will be retried up to --low-level-retries times. 153 154 ### --vfs-cache-mode full 155 156 In this mode all reads and writes are buffered to and from disk. When 157 a file is opened for read it will be downloaded in its entirety first. 158 159 This may be appropriate for your needs, or you may prefer to look at 160 the cache backend which does a much more sophisticated job of caching, 161 including caching directory hierarchies and chunks of files. 162 163 In this mode, unlike the others, when a file is written to the disk, 164 it will be kept on the disk after it is written to the remote. It 165 will be purged on a schedule according to `--vfs-cache-max-age`. 166 167 This mode should support all normal file system operations. 168 169 If an upload or download fails it will be retried up to 170 --low-level-retries times. 171 172 ## Case Sensitivity 173 174 Linux file systems are case-sensitive: two files can differ only 175 by case, and the exact case must be used when opening a file. 176 177 Windows is not like most other operating systems supported by rclone. 178 File systems in modern Windows are case-insensitive but case-preserving: 179 although existing files can be opened using any case, the exact case used 180 to create the file is preserved and available for programs to query. 181 It is not allowed for two files in the same directory to differ only by case. 182 183 Usually file systems on macOS are case-insensitive. It is possible to make macOS 184 file systems case-sensitive but that is not the default 185 186 The "--vfs-case-insensitive" mount flag controls how rclone handles these 187 two cases. If its value is "false", rclone passes file names to the mounted 188 file system as is. If the flag is "true" (or appears without a value on 189 command line), rclone may perform a "fixup" as explained below. 190 191 The user may specify a file name to open/delete/rename/etc with a case 192 different than what is stored on mounted file system. If an argument refers 193 to an existing file with exactly the same name, then the case of the existing 194 file on the disk will be used. However, if a file name with exactly the same 195 name is not found but a name differing only by case exists, rclone will 196 transparently fixup the name. This fixup happens only when an existing file 197 is requested. Case sensitivity of file names created anew by rclone is 198 controlled by an underlying mounted file system. 199 200 Note that case sensitivity of the operating system running rclone (the target) 201 may differ from case sensitivity of a file system mounted by rclone (the source). 202 The flag controls whether "fixup" is performed to satisfy the target. 203 204 If the flag is not provided on command line, then its default value depends 205 on the operating system where rclone runs: "true" on Windows and macOS, "false" 206 otherwise. If the flag is provided without a value, then it is "true". 207 208 209 ``` 210 rclone serve dlna remote:path [flags] 211 ``` 212 213 ## Options 214 215 ``` 216 --addr string ip:port or :port to bind the DLNA http server to. (default ":7879") 217 --dir-cache-time duration Time to cache directory entries for. (default 5m0s) 218 --dir-perms FileMode Directory permissions (default 0777) 219 --file-perms FileMode File permissions (default 0666) 220 --gid uint32 Override the gid field set by the filesystem. (default 1000) 221 -h, --help help for dlna 222 --log-trace enable trace logging of SOAP traffic 223 --name string name of DLNA server 224 --no-checksum Don't compare checksums on up/download. 225 --no-modtime Don't read/write the modification time (can speed things up). 226 --no-seek Don't allow seeking in files. 227 --poll-interval duration Time to wait between polling for changes. Must be smaller than dir-cache-time. Only on supported remotes. Set to 0 to disable. (default 1m0s) 228 --read-only Mount read-only. 229 --uid uint32 Override the uid field set by the filesystem. (default 1000) 230 --umask int Override the permission bits set by the filesystem. (default 2) 231 --vfs-cache-max-age duration Max age of objects in the cache. (default 1h0m0s) 232 --vfs-cache-max-size SizeSuffix Max total size of objects in the cache. (default off) 233 --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off) 234 --vfs-cache-poll-interval duration Interval to poll the cache for stale objects. (default 1m0s) 235 --vfs-case-insensitive If a file name not found, find a case insensitive match. 236 --vfs-read-chunk-size SizeSuffix Read the source objects in chunks. (default 128M) 237 --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached. 'off' is unlimited. (default off) 238 --vfs-read-wait duration Time to wait for in-sequence read before seeking. (default 20ms) 239 --vfs-write-wait duration Time to wait for in-sequence write before giving error. (default 1s) 240 ``` 241 242 See the [global flags page](/flags/) for global options not listed here. 243 244 ## SEE ALSO 245 246 * [rclone serve](/commands/rclone_serve/) - Serve a remote over a protocol. 247