diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 51 |
1 files changed, 24 insertions, 27 deletions
@@ -4,42 +4,39 @@ Shell scripts to install [LibreTranslate](https://libretranslate.com) Uses WSGI with [Gunicorn and Nginx](https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04). -Tested on Ubuntu 20.04. +Tested on Ubuntu 20.04 and Debian 12. [Known Python version bug with Ubuntu 24.04](https://github.com/LibreTranslate/LibreTranslate/issues/611#issuecomment-2415239429) and Python 3.12. -## Install +## Installation +Please note that you should run these commands as root by adding `sudo` before every command or by entering the root shell using the `sudo su -` command. ``` -# Create libretranslate user -useradd libretranslate -mkdir /home/libretranslate -chown libretranslate:libretranslate /home/libretranslate -usermod -aG sudo libretranslate -passwd -d libretranslate -su libretranslate +# First of all, update the package cache & upgrade the system +apt update +apt dist-upgrade # Download LibreTranslate-init -git clone https://github.com/argosopentech/LibreTranslate-init.git ~/LibreTranslate-init - -# Download dependencies and run LibreTranslate on port 5000 -~/LibreTranslate-init/setup.sh - -# Add your hostname or IP address to this command -# When you run LibreTranslate for the first time it will download all of the language model packages -~/LibreTranslate/env/bin/libretranslate --host <your hostname or IP address> - -# Set server_name to your domain name in ~/LibreTranslate-init/nginx - -# Run LibreTranslate WSGI with nginx and systemd -~/LibreTranslate-init/run.sh - -# Check LibreTranslate status +git clone https://github.com/argosopentech/LibreTranslate-init.git ~/LibreTranslate-init && cd LibreTranslate-init + +# Fill up the .env file with settings +cat > .env <<EOF +# The directory where LibreTranslate will be located +LT_DIR="/var/lib/libretranslate" +# The user LibreTranslate will run under +LT_USER="libretranslate" +# The domain name LibreTranslate will be accessible on +LT_DOMAIN="lt.example.com" +EOF + +# Use the automated install +./setup.sh + +# Ensure that LibreTranslate runs sudo systemctl status libretranslate -# Enable https -~/LibreTranslate-init/get-cert.sh - +# Enable SSL after testing (powered by Certbot and Let's Encrypt) +./get-cert.sh ``` #### Tutorials |