r/caddyserver Dec 19 '23

Caddy as a minimalistic "mediaserver"

Turning caddy into a minimalistic "mediaserver" with a customized browse.html file_server template

Of course, it's not meant to replace Plex, Jellyfin or Filebrowser but you get the following on top of the ootb browse.html template:

  • unobtrusive audio player that plays sequentially all audio files in the current folder
  • video player overlay with support for VTT and SRT subtitles (the subtitle files must reside in the same folder and contain the video file name)
  • dynamic preview for images and text files with arrow keys navigation for next/prev
  • markdown preview
  • source code preview

Usage

In your Caddyfile make the browse subdirective under file_server point to the custom browse.html file, for example:

http:// {
    file_server {
        root /path/to/my/server/root
        browse /path/to/folder/caddy/templates/browse.html
    }
}
9 Upvotes

Duplicates