### [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate)

> Handle: `libretranslate`<br/>
> URL: [http://localhost:34411](http://localhost:34411)

![screenshot from harbor's libretranslate service](./harbor-libretranslate.png)

Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it doesn't rely on proprietary providers such as Google or Azure to perform translations. Instead, its translation engine is powered by the open source Argos Translate library.

#### Starting

```bash
# [Optional] pre-pull the image
harbor pull libretranslate

# Run the service
harbor up libretranslate
```

- It will take a while for initial download of the translate models, `harbor logs libretranslate` to see the progress
- There are community implementations for Filters/Functions/Pipes [for LibreTranslate in Open WebUI](https://docs.openwebui.com/tutorials/integrations/libre-translate#configuring-the-integration-in-open-webui)

#### Configuration

Following options can be set via [`harbor config`](./3.-Harbor-CLI-Reference.md#harbor-config):

```bash
# Port on the host where libretranslate endpoint will be available
HARBOR_LIBRETRANSLATE_HOST_PORT       34411

# Version of libretranslate to run (docker image tag)
HARBOR_LIBRETRANSLATE_VERSION         latest

# Image to use for libretranslate service
HARBOR_LIBRETRANSLATE_IMAGE           libretranslate/libretranslate

# Workspace directory for libretranslate
# This is where the service will store its data
# Either relative to $(harbor home) or an absolute path
HARBOR_LIBRETRANSLATE_WORKSPACE       ./services/libretranslate/data
```
