A download server for files with a simple folder ui and indices for downloading (e.g. via aria2)
6.3K
[ GitHub ] ā Ā Ā Ā Ā Ā [ DockerHub ]ā
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā
A docker container that provides a http download server for files, a simple folder ui and indices for downloading (via aria2ā or other download managers).
The container extends the official nginx docker containerā . Requests to folders are forwarded to the nodejsā indexserver. The container processes are managed with s6-overlayā .
?aria2 to any
folder url to get download instructions for aria2 (exampleā )?raw to any folder urldocker run -d \
-e BASEPATH=/ `#optional` \
-e BASIC_AUTH_ENABLED=false `#optional` \
-e BASIC_AUTH_USER=admin `#optional` \
-e BASIC_AUTH_PASSWORD=fileserver `#optional` \
-v /path/to/files:/public \
-p "80:80" \
--restart unless-stopped \
peterberweiler/fileserver
version: "3"
services:
fileserver:
image: peterberweiler/fileserver
container_name: fileserver
environment:
# all of these are optional
- BASEPATH=/
- BASIC_AUTH_ENABLED=false
- BASIC_AUTH_REALM=admin
- BASIC_AUTH_USER=admin
- BASIC_AUTH_PASSWORD=fileserver
volumes:
- /path/to/files:/public
ports:
- "80:80"
restart: unless-stopped
| Variable | Default | Function |
|---|---|---|
BASEPATH | / | if your file server is behind another reverse proxy you need to set this to the path where it is reachable (for example /myfiles) |
BASIC_AUTH_ENABLED | false | enables basic auth, for the indices and files (Reminder: when using http your username, password and traffic will not be encrypted) |
BASIC_AUTH_USER | admin | basic auth username |
BASIC_AUTH_PASSWORD | fileserver | basic auth password |
BASIC_AUTH_REALM | admin | basic auth realm, only needed if you have another basic auth server on the same url |
| Parameter | Function |
|---|---|
?raw | returns a list of absolute urls for all files in the current directory and all children |
?aria2 | returns download instructions for aria2c |
?depth=5 | limits how many levels of sub folders should be included (can be combined with aria2 and raw) |
| Query | Function |
|---|---|
/movies?aria2 | returns download instructions for the complete movies directory |
/documents/text?raw&depth=1 | returns a list of absolute paths for all files in /documents/text and their direct children |
You can use it with aria2 like so:
curl http://localhost/media/?aria2 | aria2c -c -i -
This would download the complete media folder into the current directory. For
more infos, check out the
aria2 documentationā
In these examples the following / folder is bound to /public
/
āā media/
āā movies/
| āā cool-movie.mkv
|
āā tv/
āā cool-series/
āā s01e01.mp4
āā s01e02.mp4
http://localhost/media?rawhttp://localhost/media/movies/cool-movie.mkv
http://localhost/media/tv/cool-series/s01e01.mp4
http://localhost/media/tv/cool-series/s01e02.mp4
http://localhost/media?raw&depth=1http://localhost/media/movies/cool-movie.mkv
http://localhost/media?aria2http://localhost/media/movies/cool-movie.mkv
dir=movies
out=cool-movie.mkv
http://localhost/media/tv/cool-series/s01e01.mp4
dir=tv/cool-series
out=s01e01.mp4
http://localhost/media/tv/cool-series/s01e02.mp4
dir=tv/cool-series
out=s01e02.mp4
Content type
Image
Digest
Size
113.3 MB
Last updated
almost 5 years ago
docker pull peterberweiler/fileserver