Today, we will be discussing about an useful application named File Browser (Formerly known as filemanager). It provides a file managing interface within a specified directory or you can assign your own directory. You can use it as the way you use your local file manager. The only difference is we use it on the web browser.
Concerning about the features of file browser, we can list the following:
- Create, delete, rename, preview, and edit files and folders.
- Upload and download files and folders.
- Create multiple users with their own directories. Each user can have a distinctive directory to keep his data.
- We can use it either standalone application or a middleware.
- Cross-platform. Works well on GNU/Linux, Windows and Mac OS X.
- Free and open source.
In this brief guide, I will show you how to setup and use file browser in Linux.
File Browser - A Cross-platform Stylish Web File Manager
Install File Browser
The easiest way to install is through curl.
$ curl -fsSL https://filebrowser.xyz/get.sh | bash
Sample output would be:
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
After installing it, skip the following methods and go to the usage section to start using it right away.
The fastest way to install it is download the latest file browser and put it in your PATH. Once you put it to your PATH, go to the usage section below and start using file browser.
Of course, there are other ways to install it. One of them is using Docker. Install Docker as described in the following links.
Once the Docker installed, run the following command to install it:
$ docker pull hacdias/filebrowser
Now, go to the usage section to know how to use file browser.
Go to the directory you want to browse and start it using command:
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 on your Terminal the address in which your instance is running. Just navigate to that address to access Filebrowser 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.
Once you started the file browser, open the URL (http://ip_address:port) 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/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.
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.
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 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 this link.
And, that's all for now folks. 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.