How to Install Libre Translate on Debian Latest?

Libre Translate is a free and open-source online translation service that provides users the facility to translate text, websites, and documents across different languages. In this tutorial, we will guide you on how to install Libre Translate on Debian Latest.

Prerequisites:

Before starting the installation process, make sure your system is updated and meets the following requirements:

Step 1: Install Docker:

Libre Translate is built with Docker containers. First, you need to install Docker on your Debian system before installing Libre Translate. Follow these steps to install Docker:

  1. Update the package list:

    sudo apt update
    
  2. Install the required packages:

    sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
    
  3. Add Docker's official GPG key:

    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
    
  4. Add Docker's stable repository:

    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
    
  5. Update the package list:

    sudo apt update
    
  6. Install Docker:

    sudo apt install docker-ce docker-ce-cli containerd.io
    
  7. Verify the installation by running the following command:

    docker --version
    

Step 2: Install Libre Translate:

After installing Docker, follow these steps to install Libre Translate:

  1. Pull the Libre Translate image from Docker Hub:

    sudo docker pull libretranslate/libretranslate
    
  2. Create a directory to store Libre Translate files:

    sudo mkdir /usr/local/libretranslate
    
  3. Run the Docker container:

    sudo docker run -d --name libretranslate -v /usr/local/libretranslate:/models -p 5000:5000 libretranslate/libretranslate
    

    The -d flag runs the container in "detached" mode or background mode. The --name flag sets a name for the container. The -v flag mounts the local directory to the container to store models. The -p flag maps the container's port 5000 to the host's port 5000.

  4. Verify the container is running:

    sudo docker ps
    

    You should see the Libre Translate container listed.

Step 3: Test Libre Translate:

After installing Libre Translate, test it by sending a translation request:

  1. Open a web browser and go to http://localhost:5000/translate

  2. In the text box, enter the text you want to translate.

  3. Select the source language and target language from the drop-down menus.

  4. Click on the "Translate" button.

  5. The translated text will appear below the text box.

Congratulations! You have successfully installed Libre Translate on your Debian system.

Conclusion:

In this tutorial, we have shown you how to install Libre Translate on Debian latest by using Docker. If you have any queries or suggestions, feel free to comment below.

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!