Filebrowser is a simple web-based file management tool that allows users to manage files and folders through a graphical web interface. In this tutorial, we will explain how to install Filebrowser on Debian Latest.
Before you start, you need to have the following:
Before installing any new packages, it's important to update your system to the latest version.
sudo apt update
sudo apt upgrade
Filebrowser requires some dependencies to be installed. To install these dependencies, run the following command:
sudo apt install curl wget apt-transport-https gnupg2 software-properties-common
Next, we need to install Nginx web server to host the Filebrowser. Run the following command to install Nginx:
sudo apt install nginx
Once installation is complete, start the Nginx service:
sudo systemctl start nginx
To install Filebrowser, first download the latest release of Filebrowser using the following command:
wget https://github.com/filebrowser/filebrowser/releases/download/v2.15.0/linux-amd64-filebrowser.tar.gz
Next, extract the downloaded file using the following command:
tar -xvf linux-amd64-filebrowser.tar.gz
Next, move the extracted file to the /usr/bin
directory using the following command:
sudo mv filebrowser /usr/bin
Next, we need to create a systemd service file to configure Filebrowser. Create a new file with the following command:
sudo nano /etc/systemd/system/filebrowser.service
Paste the following contents into the file:
[Unit]
Description=File Browser
After=syslog.target network.target
[Service]
User=root
Group=root
Environment=FB_ROOT=/home/user/files
ExecStart=/usr/bin/filebrowser -c /home/user/.filebrowser.json
[Install]
WantedBy=multi-user.target
Make sure to change the following variables:
User
and Group
to the user and group you want to run Filebrowser as.FB_ROOT
to the path of the directory you want to serve files from.ExecStart
to the path of the configuration file you want to use.Save the file and close it.
Then, reload the systemd service with the following command:
sudo systemctl daemon-reload
Enable the Filebrowser service to start at boot:
sudo systemctl enable filebrowser.service
Finally, start the Filebrowser service:
sudo systemctl start filebrowser.service
Next, we need to configure Nginx to work with Filebrowser. Create a new Nginx configuration file with the following command:
sudo nano /etc/nginx/conf.d/filebrowser.conf
Paste the following contents into the file:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Make sure to replace example.com
with your domain name.
Save and close the file.
Then, test Nginx configuration and restart Nginx with the following commands:
sudo nginx -t
sudo systemctl restart nginx
Finally, we can access Filebrowser through a web browser. Open your web browser and navigate to http://example.com
. You should see the Filebrowser login page.
Log in with a user account that has access to the directories specified in the configuration file.
Congratulations! You have successfully installed Filebrowser on Debian Latest.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!