Navidrome FileBrowser Password Not Shown Troubleshooting Guide

by StackCamp Team 63 views

This article provides a comprehensive guide to troubleshooting the issue where the automatically generated password for the FileBrowser extension in Navidrome is not shown after installation. This issue can be frustrating, especially when you're eager to access your files through the web interface. We will delve into the potential causes and provide step-by-step solutions to resolve this problem.

Understanding the Issue

The issue at hand is that after installing Navidrome with the FileBrowser extension, the automatically generated password for FileBrowser is not displayed or stored correctly. This prevents users from logging into the FileBrowser interface, rendering it inaccessible. This problem has been observed specifically on Debian 12, but the solutions provided here can be adapted for other Linux distributions as well.

Prerequisites

Before we dive into troubleshooting, ensure you have the following:

  1. Navidrome and FileBrowser installed using the community script.
  2. Access to the command line or terminal of your server.
  3. Basic understanding of Linux commands.

Steps to Reproduce the Issue

To better understand the problem, let’s outline the steps that lead to this issue:

  1. Install Navidrome using the provided script.
  2. Opt for advanced mode during the installation.
  3. Configure custom IP and gateway settings.
  4. Set up custom DNS.
  5. Choose to not configure search domain, IPv6, MTU, or VLAN.
  6. Decline root access and SSH key installation.
  7. Select a custom installation location.
  8. Use default CPU and RAM settings.
  9. Choose to install FileBrowser with default parameters.

Following these steps, the password is often not shown, making FileBrowser inaccessible.

Potential Causes

Several factors might contribute to this issue:

  1. Script Errors: The installation script might have bugs that prevent the password from being displayed or saved.
  2. Configuration Issues: Incorrect configuration settings during the installation process can lead to this problem.
  3. File Permissions: File permission issues can prevent the script from writing the password to the appropriate file.
  4. Installation Interruptions: Any interruption during the installation process can result in incomplete setup.

Troubleshooting Steps

Now, let’s explore the solutions to resolve the issue.

1. Verify FileBrowser Installation

First, ensure that FileBrowser is correctly installed. You can check this by running the following command:

systemctl status filebrowser

If FileBrowser is installed and running, you should see an output indicating that the service is active. If it’s not running, start the service using:

sudo systemctl start filebrowser

2. Check FileBrowser Configuration File

The FileBrowser configuration file typically stores the admin password. The location of this file can vary, but it is often found in /etc/filebrowser.db or ~/.filebrowser.db. Use the following steps to check the configuration file:

  1. Locate the Configuration File: Use the find command to locate the FileBrowser database file:

sudo find / -name filebrowser.db 2>/dev/null ```

  1. Read the Configuration File: Once you’ve located the file, you can use sqlite3 to inspect its contents. If sqlite3 is not installed, install it using:

sudo apt update sudo apt install sqlite3 ```

Then, open the database:

```bash

sqlite3 /path/to/filebrowser.db ```

  1. Query the Users Table: Inside the sqlite3 prompt, query the users table to find the admin user and its password hash:

SELECT username, password FROM users WHERE username = 'admin'; ```

This command should display the username (admin) and the password hash. Note that the password is not stored in plain text, but as a hash. You can use this hash to log in or reset the password.

3. Reset FileBrowser Password

If you cannot retrieve the password or prefer to reset it, you can use the FileBrowser command-line tool. First, stop the FileBrowser service:

sudo systemctl stop filebrowser

Then, use the filebrowser users update command to reset the password. You’ll need to specify the username and the new password:

filebrowser users update admin --password 'YourNewPassword'

Replace YourNewPassword with your desired password. After resetting the password, start the FileBrowser service:

sudo systemctl start filebrowser

4. Review Installation Logs

The installation script might have logged the password somewhere. Check the script output and any log files created during the installation. The logs might contain the auto-generated password or clues about why it wasn't displayed.

5. Reinstall Navidrome and FileBrowser

If the previous steps didn't resolve the issue, try reinstalling Navidrome and FileBrowser. Before reinstalling, make sure to remove the existing installations completely. Here’s how you can do it:

  1. Stop Navidrome and FileBrowser services:

sudo systemctl stop navidrome sudo systemctl stop filebrowser ```

  1. Remove Navidrome and FileBrowser:

sudo rm -rf /opt/navidrome sudo rm -rf /opt/filebrowser ```

  1. Remove the configuration files:

sudo rm /etc/systemd/system/navidrome.service sudo rm /etc/systemd/system/filebrowser.service sudo rm /etc/filebrowser.db ```

  1. Reinstall Navidrome using the community script:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/navidrome.sh)" ```

During the reinstallation, pay close attention to the output. Ensure that there are no errors and that the password is displayed at the end of the installation process.

6. Check File Permissions

Incorrect file permissions can prevent the script from writing the password. Ensure that the user running the script has the necessary permissions to write to the FileBrowser configuration file and the installation directory.

  1. Verify User Permissions: Identify the user running the FileBrowser service:

ps aux | grep filebrowser ```

  1. Check Directory Permissions: Ensure that the user has write permissions to the FileBrowser installation directory and configuration file:

ls -l /opt/filebrowser ls -l /path/to/filebrowser.db ```

If the permissions are incorrect, change them using the `chown` command:

```bash

sudo chown -R user:user /opt/filebrowser sudo chown user:user /path/to/filebrowser.db ```

Replace `user` with the actual username and `/path/to/filebrowser.db` with the correct path to the configuration file.

7. Review and Modify the Installation Script

If the issue persists, the problem might lie within the installation script itself. Download the script and review it for any potential bugs or misconfigurations.

  1. Download the Script:

wget https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/navidrome.sh ```

  1. Review the Script: Open the script in a text editor and look for sections related to FileBrowser installation and password generation. Pay special attention to how the password is being generated, stored, and displayed.

  2. Modify the Script (if necessary): If you find any issues, you can modify the script. For example, you might want to add a command to explicitly display the password after it’s generated or save it to a file. Make sure to back up the original script before making changes.

8. Manual FileBrowser Installation

As a last resort, consider installing FileBrowser manually. This will give you more control over the installation process and might help you identify any issues. Here’s a general outline of how to install FileBrowser manually:

  1. Download FileBrowser: Download the latest FileBrowser release from the official GitHub repository.

  2. Extract the Archive: Extract the downloaded archive to a directory of your choice (e.g., /opt/filebrowser).

  3. Create a Configuration File: Create a FileBrowser configuration file (e.g., filebrowser.db) and set the initial admin password using the filebrowser command:

filebrowser config init --database /opt/filebrowser/filebrowser.db filebrowser users add admin 'YourNewPassword' ```

  1. Create a Systemd Service File: Create a systemd service file for FileBrowser (e.g., /etc/systemd/system/filebrowser.service) with the following content:

    [Unit]
    Description=FileBrowser
    After=network.target
    
    [Service]
    WorkingDirectory=/opt/filebrowser
    ExecStart=/opt/filebrowser/filebrowser -c /opt/filebrowser/filebrowser.db --port 8080
    User=youruser
    Group=youruser
    
    [Install]
    WantedBy=multi-user.target
    

    Replace /opt/filebrowser with the actual installation directory and youruser with the appropriate user.

  2. Enable and Start the Service:

sudo systemctl enable filebrowser sudo systemctl start filebrowser ```

Example Error Output

Here’s an example of the error output provided by the user:

_______ __ ____
/ ____(_) /__ / __ )_________ _ __________ _____ 
/ /_ / / / _ \/ __ / ___/ __ \ | /| / / ___/ _ \/ ___/
/ __/ / / / __/ /_/ / / / /_/ / |/ |/ (__ ) __/ /
/_/ /_/_/\___/_____/_/ \____/|__/|__/____/\___/_/
⚠️ FileBrowser is not installed.
Enter port number (Default 8080)
Would you like to install FileBrowser? (y/n) y
ℹ️ Installing FileBrowser on Debian...
✔️ Installed FileBrowser
ℹ️ Creating FileBrowser directory...
✔️ Directory created successfully
Would you like to use No Authentication? (y/N)
ℹ️ Setting up default authentication...
✔️ Default authentication configured (adminhelper-scripts.com)
ℹ️ Creating service...
✔️ Service created successfully
✔️ FileBrowser is reachable at http192.168.1.728080
 ✔️ Cleaned
 ✔️ Completed Successfully!

 🚀 Navidrome setup has been successfully initialized!
 💡 Access it using the following URL
 🌐 http192.168.1.724533
root@intel-pve~ clear

The output shows that FileBrowser was installed, and default authentication was configured, but the password was not displayed. The steps outlined above should help resolve this issue.

Conclusion

The issue of the FileBrowser password not being shown after Navidrome installation can be addressed through systematic troubleshooting. By verifying the installation, checking configuration files, resetting the password, reviewing logs, and, if necessary, reinstalling or manually installing FileBrowser, you can regain access to your files. Always ensure proper file permissions and consider reviewing the installation script for potential issues. By following these steps, you can effectively resolve the problem and enjoy the benefits of Navidrome and FileBrowser integration.

SEO Keywords

  • Navidrome FileBrowser password
  • FileBrowser password reset
  • Navidrome FileBrowser troubleshooting
  • FileBrowser installation issues
  • Linux server administration
  • Proxmox VE community scripts
  • Debian 12 FileBrowser