Password protection
info
While there is no built-in password protection currently, you can use your reverse proxy to add it easily. A built-in authentication feature is planned for a future release.
You can restrict access to the dir-browser with a password. This is useful if you want to share your files with others but don't want to make them public.
- Generate a
.htpasswd
file with the following command. You may need to install theapache2-utils
package first.
htpasswd -c .htpasswd <username>
Make sure to enter a password.
- Modify your reverse proxy.
Apache
<VirtualHost *:443>
AuthType Basic
AuthName "Authentication required"
AuthUserFile /path/to/.htpasswd
Require valid-user
</VirtualHost>
nginx
location / {
auth_basic "Authentication required";
auth_basic_user_file /path/to/.htpasswd;
}
- Now your browser will ask for a username and password.