Replacing Restic's REST Server with Nginx for Backups

2025-06-08

The author cleverly uses Nginx to replace Restic's REST server backup solution, creating two Nginx virtual hosts: append-only and admin. The append-only host prevents data deletion, while the admin host allows management operations. The configuration uses Nginx's DAV and LUA modules, employing several tricks to handle HTTP methods and response codes, and using regexes to modify the autoindex's JSON output. While the approach is somewhat hacky, it's effective and efficient. The author also discusses security concerns and mentions plans to simplify the configuration in the future.

Read more
Development