FileBrowser provides a minimal CLI for setup and user management.
Available Commands link
Start Server link
Default command - runs the server:
With custom config:
1
| ./filebrowser -c /path/to/config.yaml
|
Create new configuration file:
Generates config.yaml with defaults.
Check version information:
User Management link
Add or update user:
1
| ./filebrowser set -u username,password
|
With custom config:
1
| ./filebrowser set -u username,password -c config.yaml
|
Create admin user:
1
| ./filebrowser set -u username,password -a
|
Important Notes link
Always shut down the server before CLI operations
Only one process can access the database at once.
1
2
3
4
5
6
7
8
| # Stop service first
systemctl stop filebrowser
# Run CLI command
./filebrowser set -u admin,newpass -c config.yaml
# Start service
systemctl start filebrowser
|
Docker Usage link
Stop Running Container link
Run CLI in Container link
1
2
3
4
5
| docker run -it \
-v $(pwd)/database.db:/home/filebrowser/database.db \
-v $(pwd)/config.yaml:/home/filebrowser/config.yaml \
--entrypoint="" \
gtstef/filebrowser sh
|
Inside container:
1
2
| ./filebrowser set -u admin,newpass -c config.yaml
exit
|
One-Line Docker Commands link
Password reset:
1
2
3
4
5
6
| docker run -it --rm \
-v $(pwd)/database.db:/home/filebrowser/database.db \
-v $(pwd)/config.yaml:/home/filebrowser/config.yaml \
--entrypoint="" \
gtstef/filebrowser \
./filebrowser set -u admin,newpassword -c config.yaml
|
Create user:
1
2
3
4
5
6
| docker run -it --rm \
-v $(pwd)/database.db:/home/filebrowser/database.db \
-v $(pwd)/config.yaml:/home/filebrowser/config.yaml \
--entrypoint="" \
gtstef/filebrowser \
./filebrowser set -u newuser,password -c config.yaml
|
Common Operations link
Password Reset link
warning
Password reset also disables 2FA for the user.
1
| ./filebrowser set -u admin,newpassword -c config.yaml
|
Create New User link
1
| ./filebrowser set -u joe,password -c config.yaml
|
info
Always include config path so user defaults are applied.
1
| ./filebrowser set -u joe,newpassword -a -c config.yaml
|
info
Promoting also resets password.
Initial Admin Setup link
After first install:
1
2
3
4
5
6
| # Option 1: Use CLI
./filebrowser set -u admin,secure-password -a -c config.yaml
# Option 2: Use environment variable
export FILEBROWSER_ADMIN_PASSWORD="secure-password"
./filebrowser -c config.yaml
|
Command Reference link
filebrowser link
Start server with optional config.
Syntax:
1
| ./filebrowser [-c config.yaml]
|
Options:
-c - Config file path (default: config.yaml)
Examples:
1
2
| ./filebrowser
./filebrowser -c /etc/filebrowser/config.yaml
|
filebrowser setup link
Create default configuration file.
Syntax:
Output: Creates config.yaml in current directory.
filebrowser version link
Display version information.
Syntax:
Output:
1
2
3
| FileBrowser version: v0.10.0
Built: 2025-01-15
Go version: go1.23
|
filebrowser set link
Add or update users.
Syntax:
1
| ./filebrowser set -u username,password [-a] [-c config.yaml]
|
Options:
-u - Username and password (comma-separated)-a - Make user admin-c - Config file path
Examples:
1
2
3
4
5
6
7
8
| # Create user
./filebrowser set -u john,pass123 -c config.yaml
# Create admin
./filebrowser set -u admin,secure-pass -a -c config.yaml
# Reset password
./filebrowser set -u john,newpass -c config.yaml
|
Troubleshooting link
For common issues and solutions, see the Troubleshooting guide.
Next Steps link