Is it possible to create i.e. cgi-bin files and serve those using --serve

I would like to add some sort of API functionality to my Rclone WebUI without installing a seperate server. I have taken a look at the Rclone source code, I am pretty sure the POST requests, are handled on here.

I suppose looking at this code would make it impossible to add additional API endpoints without modifying Rsync source. Meaning I would need a server like Nginx to serve cgi-bin, or I would probably go with PHP or JS because writing that is much easier ;). And use Nginx to proxy the other requests to Rclone rcd.

My ultimate goal is to edit the crontab of the user using an API without adding a seperate API next to Rclone.

That would be evolving rclone serve into a fully fledged web server...

What I've though is that people would proxy rclone via a fully fledged web server if they wanted this functionality.

If you want an easy to install webserver you can use https://caddyserver.com/ - it comes as a single binary and can proxy rclone and run cgi out of the box.

Thanks for your reply!

I will take a look at caddy, mainly if it is more lightweight than Nginx and smaller package even maybe? In the meantime I will enjoy your already pretty inclusive API!

Just found out how easy it is with --rc-web-fetch-url and --rc-web-gui-update to quickly get the new version without manually putting it in the container! (Took me nearly 3 hours to figure out automatic release versioning using github actions but I think it is totally worth it!)

Definitely looking forward to implementing the file browser and creating jobs from the UI instead of rc commands!

1 Like

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