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.
Before starting the installation process, make sure your system is updated and meets the following requirements:
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:
Update the package list:
sudo apt update
Install the required packages:
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Add Docker's stable repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Update the package list:
sudo apt update
Install Docker:
sudo apt install docker-ce docker-ce-cli containerd.io
Verify the installation by running the following command:
docker --version
After installing Docker, follow these steps to install Libre Translate:
Pull the Libre Translate image from Docker Hub:
sudo docker pull libretranslate/libretranslate
Create a directory to store Libre Translate files:
sudo mkdir /usr/local/libretranslate
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.
Verify the container is running:
sudo docker ps
You should see the Libre Translate container listed.
After installing Libre Translate, test it by sending a translation request:
Open a web browser and go to http://localhost:5000/translate
In the text box, enter the text you want to translate.
Select the source language and target language from the drop-down menus.
Click on the "Translate" button.
The translated text will appear below the text box.
Congratulations! You have successfully installed Libre Translate on your Debian system.
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!