Mount cmd for web server

Thank you so much, so my new cmd only for server where i dont have to upload anything on remote and only have to view from remote is below, plz take a look and guide me further if necessary,

rclone serve http Dropbox: /www/wwwroot/videos/box --daemon --allow-other --dir-cache-time 5000h --vfs-cache-mode full --vfs-cache-max-age 150h --vfs-cache-max-size 300G --cache-dir /www/wwwroot/cache --log-file /www/wwwroot/rclone.log

Thanks a lot

That serves the files over http directly. You'd need to remove --daemon and --allow-other since these are mount only, but otherwise that looks fine

rclone serve http Dropbox: --dir-cache-time 5000h --vfs-cache-mode full --vfs-cache-max-age 150h --vfs-cache-max-size 300G --cache-dir /www/wwwroot/cache --log-file /www/wwwroot/rclone.log

That will serve the files on http://127.0.0.1:8080/ - proxy this with your webserver, or use it directly.

using same cmd

rclone serve http Dropbox:/www/wwwroot/videos/box --dir-cache-time 5000h --vfs-cache-mode full --vfs-cache-max-age 150h --vfs-cache-max-size 300G --cache-dir /www/wwwroot/cache --log-file /www/wwwroot/rclone.log 

also pointed domain at 127.0.01.:8080 but still not working,
Log file

2022/02/20 13:26:45 DEBUG : rclone: Version "v1.57.0" starting with parameters ["rclone" "serve" "http" "Dropbox:/www/wwwroot/videos/box" "--dir-cache-time" "5000h" "--vfs-cache-mode" "full" "--vfs-cache-max-age" "150h" "--vfs-cache-max-size" "300G" "--cache-dir" "/www/wwwroot/cache" "--log-file" "/www/wwwroot/rclone.log" "-vv"]
2022/02/20 13:26:45 DEBUG : Creating backend with remote "Dropbox:/www/wwwroot/videos/box"
2022/02/20 13:26:45 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/02/20 13:26:46 DEBUG : Dropbox root '': Using root namespace "10117126128"
2022/02/20 13:26:47 DEBUG : fs cache: renaming cache item "Dropbox:/www/wwwroot/videos/box" to be canonical "Dropbox:www/wwwroot/videos/box"
2022/02/20 13:26:47 INFO  : Dropbox root 'www/wwwroot/videos/box': Failed to get StartCursor: path/not_found/..
2022/02/20 13:26:47 DEBUG : vfs cache: root is "/www/wwwroot/cache"
2022/02/20 13:26:47 DEBUG : vfs cache: data root is "/www/wwwroot/cache/vfs/Dropbox/www/wwwroot/videos/box"
2022/02/20 13:26:47 DEBUG : vfs cache: metadata root is "/www/wwwroot/cache/vfsMeta/Dropbox/www/wwwroot/videos/box"
2022/02/20 13:26:47 DEBUG : Creating backend with remote "/www/wwwroot/cache/vfs/Dropbox/www/wwwroot/videos/box"
2022/02/20 13:26:47 DEBUG : Creating backend with remote "/www/wwwroot/cache/vfsMeta/Dropbox/www/wwwroot/videos/box"
2022/02/20 13:26:47 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)

Please

ops changed with root path and its working now
Thanks

now facing another issue, using rclone serve http i cannot open a php file from Dropbox, with mount cmd its working perfect, example domain.com/file.php
any clue?
Thanks

Are you trying to run PHP files from Dropbox?

I think you will need a mount for that as serve http will just send the PHP files not run them.

that is only a player file in php extension, trying to run videos in my own player, is there any other way to play videos in my own player using serve http?
Thanks

If you serve the videos with the right mime type, then the browser should just play them. That is what I see anyway.

What type of videos?

Videos are mp4 type but i want to play them inside my own player,
server http cmd close when i close terminal and we cannot use daemon with server http, so i need to run cmd inside screen or tmux etc ?
you think is it possible to use http password with rclone and a external hosted player?
Thanks

rclone serve http won't run PHP files. However if you can make your player in javascript that will work fine.

screen, tmux or use systemd to run it as a system service.

I don't know!

finally able to play video from serve httpwith my own player
its good enough, but question is how to prevent user to browse my dropbox?
https://d.bollyfun.net/silip.html?v=test
if user only open domain it hit on my dropbox and use can see every thing, is there any way to prohibited this?
Thanks

Make sure all the video files are in a subdirectory and serve that - then the user will only be able to browse the video files.

If you don't want the user to browse at all then disable that by setting a new template like this

echo "Browsing disabled" > templatefile
rclone -vv serve http --template templatefile dropbox:Video

where i have to add this line?
Thanks

  1. run that command on the command line.
    it will create a new file named templatefile
  2. add --template templatefile to your rclone serve http command,.

@asdffdsa thanks for you quick reply, im really sorry but i have no idea where to run this

please explain me bit more where to run this step by step, i will really appreciated this help

run that command on the bash command line.

you means in terminal where we run rclone config?

correct, that is what i means

@asdffdsa and which directory/location have to run this cmd line?

any directory that you choose.
perhaps run it from your home dir.