rClone Mount Vs Http Serve

Im using rclone http serve, but facing some security issue like people are flooding on my rclone http serve domain and i cant do nothing because i cant use any PHP function to make some restrictions,
My first question is, can we restrict rclone http serve with my server IP where im hosting my website and linking with rclone http server? or any other restriction that nobody can open rclone http domain directly?
My second question is if i fail to secure my rclone http serve i have to move on rclone mount and use PHP function to secure my rclone server, question is there any big performance difference between mount and http serve?

Thanks a lot

Authentication is documented here:

rclone serve http

this is only user level authentication not server level, means user have to enter user n pass to access file, is there anyway we can authenticate server level authentication?

I have no idea what server level authentication means.

The rclone methods are documented there.

You'd have to describe what you are asking about and how it works.

I have a server A where my all apps are hosted and a server B where rclone is working, my user join server A and when hit some video server A send that user to sever B where rclone play that video, issue is people are flooding on server B, so im looking for any authentication that user came from sever A only can join server B, i can acchive that easily with mounted rclone but with server http im very limited with html/java files, if this is not possible i asked u above is there any big performance difference between monut and http server?

There's no big performance differences to my knowledge.

Best way is to test as every use case is very unique.

I'm not sure what you mean with Server A and Server B as rclone serve http is a very basic implementation with a limited set of use cases as the goal for rclone is dealing with cloud storage.

You can always try something else like Caddy/NGinx or something else to meet your needs but that's well beyond the scope of the rclone forums.

The way to do this is to proxy rclone serve behind nginx/caddy then you can run your PHP scripts too.

1 Like

i cant see any documentation for rclone serve only,

Please guide me bit further

Nick is saying you run rclone serve or http as an example and put a proxy server in front of it as that can control access much better as it's meant to do that.

Google Caddy or NGinx and look for some examples on how to front end proxy a web service.

PHP player file not working with rclone serve http behind the proxy and hrml player is working fine
https://dd.humtv.net/hum.php?v=2022/04/05/85f91a13d21c9f0003fa960a5ded69fa PHP Player file
Play Tv5 HTML Player file

Sorry I meant to write rclone serve http but you seen to have figured that out.

It looks like it could not fetch this file


Is it supposed to be reading that from the rclone serve http? How did you set up the proxying and rclone serve http?

@ncw thanks for your reply

This was your reply on my other thread when i start using rclone serve http

my rclone serve http cmd is below

rclone serve http --template templatefile web:web --dir-cache-time 5000h --vfs-cache-mode full --vfs-cache-max-age 150h --vfs-cache-max-size 200G --cache-dir /www/wwwroot/cache --log-file /www/wwwroot/rclone.log --no-seek --tpslimit 12 --tpslimit-burst 12

and for proxy as im using nginx, i added these lines in my nginx config

        location / {
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;

disabled main config file and only using these line in my nginx config file
Thanks again

You need to work out why that file didn't get fetched. Does it exist on the cloud storage?

ok i prepared 1 cloud video file with both HTML and PHP player files,
html is working and php giving error,
HTML Player
PHP Player

so you sure that PHP player file will work on rclone http serve ?

You need to make sure the PHP is executed by nginx. You do this with location directives I think (its been a long time since I used nginx!).

So you need location directives for the PHP to be served by nginx and the video files via rclone serve.

im trying like this way, but still no sucess

        location ~ ^/php/ {
        root /www/wwwroot/videos/web/;
        autoindex on;
        location / {
        proxy_set_header X-Real-IP  $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header Host $host;

this is dropbox path


how to hit folder? im running rclone http server path web:videos


This needs to be a local directory with the things that you want in the /php/ path.

I think you are on the right track - keep trying!

tried but no success, now giving up, spent 2 days on this without any luck

You can do everything you want using heroku

There are a few different scripts out there to auto deploy.

Here are 2:

For security you have 2 options:
these scripts allow setting 1 username and password (not very secure)

The other option is creating a FREE SSO (Single Sign On)

Allows you to have up to 7,000 Members free. No CC needed

The best way is to manually add peoples email addies to the oauth and disable "Sign Up" option.

Option 3 is setup your server with open source SSO

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.