File Browser, formerly known as filemanager, is an open-source web file manager and web-based graphical interface for managing files and directories on a server or computer. It allows users to navigate, upload, download, edit, and manage files and folders using a web browser, making it particularly useful for remote server administration and file sharing.
File Browser provides a file managing interface within a specified directory or you can assign your own directory. You can literally use it as the way you use your local file manager. The only difference is we use it on the web browser.
In this brief guide, we will discuss how to setup and use file browser in Linux.
Table of Contents
File Browser Features
Some key features of File Browser include:
- User Authentication: File Browser can be configured to require user authentication, allowing you to control who can access and manage files on your server.
- File and Folder Operations: Users can perform common file operations such as copying, moving, renaming, deleting, and creating files and directories.
- File Preview: File Browser provides a file preview feature, allowing users to view images, documents, and other file types directly within the web interface.
- Multi-Platform Support: It is written in Go and is designed to work on various operating systems, including Linux, macOS, and Windows.
- User and Group Management: Administrators can set up different users and groups with different levels of access and permissions.
- Access Control: You can configure access control rules to restrict or grant access to specific files and folders based on user roles.
- Shareable Links: Users can generate shareable links to specific files or folders, making it easy to share files with others.
- Integration with External Services: File Browser can be integrated with external storage providers such as Google Drive, Dropbox, and others.
Install File Browser in Linux
Method 1:
The easiest way to install is through curl.
$ curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
Sample Output:
Downloading File Browser for linux/amd64... https://github.com/filebrowser/filebrowser/releases/download/v1.9.0/linux-amd64-filebrowser.tar.gz Extracting... Putting filemanager in /usr/local/bin (may require password) [sudo] password for sk: Successfully installed
Method 2:
The another way to install it is download the latest file browser tarball, extract it, and put it in your $PATH.
Method 3:
The other way to install file browser is using Docker.
Install Docker as described in the following links.
Once the Docker installed, run the following command to install it:
$ docker run \ -v /path/to/root:/srv \ -v /path/to/filebrowser.db:/database/filebrowser.db \ -v /path/to/settings.json:/config/settings.json \ -e PUID=$(id -u) \ -e PGID=$(id -g) \ -p 8080:80 \ filebrowser/filebrowser:s6
How to use File Browser Web File Manager
Go to the directory you want to browse and start it using command:
$ filebrowser
Alternatively, you can serve the files directly by using actual path like below:
$ filebrowser -r /path/to/your/files
You will see the URL in which File Manager is running, like below.
2019/08/02 13:48:28 No config file used 2019/08/02 13:48:28 Listening on 127.0.0.1:8080
Now, you will see the address in which your instance is running in your Terminal. Just navigate to that address to access File browser login page.
By default, File Browser listens to all interfaces. Of course, You can make it to listen to a particular interface if you wish. We will see it in the configuration section below.
Please note that the port will change dynamically when start file browser each time. You need to enter the correct port number in the address bar to open it. Also, you need to open the port if you're behind a firewall/router.
If you don't want to use different port each time, you can assign a specific port, say 80, like below.
$ filebrowser --port 80
Now, you can access the file browser using URL - http://ip_address:80.
Log in to File browser
Once you started the file browser, navigate to the URL http://ip_address:80 from your web browser using the default credentials.
- Username: admin
- Password: admin
This is how file browser default interface looks like.
Change Admin User Password
The first thing to do is to change the admin user's password. To do so, click Settings link on the left menu. Update your your new password for the admin user.
Create a File or Directory
Click on "New folder" on the left side menu and enter a name for your new directory.
Similarly, you can create a new file from the main interface.
Once you have created the directory, you'll be redirected into that directory. If not, just double click on it to open. From there, you can upload files/folders or download the existing files.
Upload Files
To upload a new file, click on the Upload button (Up arrow) on the top and choose the files you want to upload.
The selected file will be uploaded in few seconds depending upon the size.
Download Files
Choose the file you want to download and hit download button (down arrow) on the top.
Single files can be downloaded directly. Also, you can download more than one files at a time. Multiple files can be downloaded as .zip, .tar, .tar.gz, .tar.bz2 or .tar.xz.
Similarly, you can remove, edit or copy your files.
Create a New User
File browser allows you to create new users and the users can have their own directories. To do so, go to click Settings -> User Management -> New.
Enter the new user details and click Save.
As you may noticed in the above screenshot, the scope is the directory you want to browse in.
Now, log out from the Admin user and log in back as new user. Please note that you can do all administrative tasks only from the admin user.
Configure File Browser
The File browser has many other useful flags. Like I said already, file browser listens to all IP addresses of your host by default. If you want to use a specific IP address, just use it using -a flag like below.
$ filebrowser -a 192.168.225.150
Likewise, you can use a dedicated port. By default, file browser uses a random port each time you open it.
To use a dedicated port, for example 80, use the following command:
$ filebrowser --port 80
Don't forget to open this port in firewall or router if you have any.
Another notable thing is it provides a file managing interface within a specified directory. We call it as scope. The default is current working directory. You can change it by specifying a different directory path using -s or --scope flag as shown below.
Say for example, if you wanted to run File browser on port 80
with the default scope to /home/sk/ostechnix
, you need to run:
$ filebrowser --port 80 ---scope /home/sk/ostechnix
For more details about, configuration flags and files, refer the file browser configuration link.
Suggested read:
Conclusion
File Browser is a versatile tool that can be useful in various scenarios, from personal file management to server administration and collaboration. Developers and system administrators often use File Browser to provide an easy-to-use web interface for managing files and directories on servers.
For those who wants to access their files or folders via a web browser in a Local area network, file browser might be a good choice. You can also use it to view the data of your remote network system. Just run it on your remote system, and access the files via a web browser from anywhere on your network.
Resource:
6 comments
Seems like the links are changed. Check this one: https://filebrowser.github.io/
Thanks. I updated the links.
This is a very useful program but with a significant flaw. While you can download a directory, you cannot upload a directory. It appears that you can only upload files selected individually making some tasks very laborious. If this could be addressed it would make a big difference.
It lacks basic futures, like sorting
You can send a feature request via its GitHub page.
Nice basic progrm. Maybe not the best pick for a name.