Nomploy Nomad Packs

← All packs

libretranslate v0.1.0

AI

LibreTranslate — a free and open-source machine-translation API that runs entirely on your own hardware (no external calls), powered by Argos Translate. A self-hosted Google Translate / DeepL alternative with a simple web UI and REST API. Deployed as a host-networked Nomad service with a persistent models volume.

nomad-pack run libretranslate --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- libretranslate

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 5000 1 volume image libretranslate/libretranslate:latest tracks :latest image bumped today
Variables 10
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run libretranslate -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "libretranslate"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The LibreTranslate container image. Pin a tag in production.
image = "libretranslate/libretranslate:latest"

# Host port for the LibreTranslate web UI / API. The container listens on 5000.
port = 5000

# Comma-separated language codes to load (LT_LOAD_ONLY). Fewer languages = faster startup and less disk. Empty = download all languages (large).
load_only = "en,es,de,fr,sk,cs"

# Require API keys for requests (LT_API_KEYS). When true, add keys with `ltmanage keys add` inside the container.
api_keys_enabled = false

# Named volume for downloaded language models (/home/libretranslate/.local).
models_volume = "libretranslate_models"

# Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the LibreTranslate task. Translation is CPU-bound; give it more CPU for throughput.
resources = {
    cpu    = 1000
    memory = 1024
  }
NameTypeDefaultDescription
job_name string
"libretranslate"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"libretranslate/libretranslate:latest"
The LibreTranslate container image. Pin a tag in production.
port number
5000
Host port for the LibreTranslate web UI / API. The container listens on 5000.
load_only string
"en,es,de,fr,sk,cs"
Comma-separated language codes to load (LT_LOAD_ONLY). Fewer languages = faster startup and less disk. Empty = download all languages (large).
api_keys_enabled key bool
false
Require API keys for requests (LT_API_KEYS). When true, add keys with `ltmanage keys add` inside the container.
models_volume string
"libretranslate_models"
Named volume for downloaded language models (/home/libretranslate/.local).
constraints list
[]
Placement constraints. Pin to the node holding the volume. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 1000
    memory = 1024
  }
Resources for the LibreTranslate task. Translation is CPU-bound; give it more CPU for throughput.
Back up this pack

This pack stores data in one Docker named volume: libretranslate_models

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/libretranslate_models/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/libretranslate_models/_data backup:<bucket>/libretranslate_models

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

libretranslate

LibreTranslate — a free, open-source machine-translation API that runs entirely on your own hardware (no calls to any cloud). Powered by Argos Translate, it offers a simple web UI and a REST API — a self-hosted Google Translate / DeepL alternative that keeps your text private.

Single host-networked Nomad service with a persistent models volume.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run libretranslate --registry=nomploy

Configure

Variable Default Description
port 5000 Web UI / API port.
load_only en,es,de,fr,sk,cs Languages to load (LT_LOAD_ONLY). Fewer = faster start, less disk. Empty = all (large).
api_keys_enabled false Require API keys (LT_API_KEYS); add them with ltmanage keys add in the container.
models_volume libretranslate_models /home/libretranslate/.local — downloaded language models.
image libretranslate/libretranslate:latest Container image. Pin a tag in production.
resources { cpu = 1000, memory = 1024 } Task resources. Translation is CPU-bound.

Translate via the UI or POST /translate with q, source, target. First boot downloads the models named in load_only (needs internet, can take a while); everything runs locally afterward. Great as a backend for the open-webui pack or your own apps. Serves plain HTTP — front it with a reverse proxy for TLS. Pin the job to the node holding the volume with constraints.