главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
path: root/README.md
blob: e0802a142d87f998184508126d657027151f780f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# LibreTranslate-init

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 and Debian 12.

[Known Python version bug with Ubuntu 24.04](https://github.com/LibreTranslate/LibreTranslate/issues/611#issuecomment-2415239429) and Python 3.12.

## 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.

```
# 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 && 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 SSL after testing (powered by Certbot and Let's Encrypt)
./get-cert.sh
```

#### Tutorials
- [Video tutorial](https://www.youtube.com/watch?v=mwacU-yqJwc)
- [Video tutorial 2](https://www.youtube.com/watch?v=SJ8lNcn4cjE)
- [Video tutorial 3](https://www.youtube.com/watch?v=dKR28QaaWLo)

#### Configuration
1. Find the setting you would like to change in the [LibreTranslate settings](https://github.com/LibreTranslate/LibreTranslate#arguments)
2. Add the setting to the `.env` file