Installing on Debian and Ubuntu
Weblate should run on any contemporary hardware without problems, the following is the minimal configuration required to run Weblate on a single host (Weblate, database and webserver):
2 GB RAM
2 CPU cores
1 GB of storage space
The more memory the better - it is used for caching on all levels (filesystem, database and Weblate).
Many concurrent users increases the amount of needed CPU cores. For hundreds of translation components at least 4 GB of RAM is recommended.
The typical database storage usage is around 300 MB per 1 million hosted words. Storage space needed for cloned repositories varies, but Weblate tries to keep their size minimal by doing shallow clones.
Actual requirements for your installation of Weblate vary heavily based on the size of the translations managed in it.
Install the dependencies needed to build the Python modules (see Domosdoshmëri software):
apt install \ libxml2-dev libxslt-dev libfreetype6-dev libjpeg-dev libz-dev libyaml-dev \ libffi-dev libcairo-dev gir1.2-pango-1.0 libgirepository1.0-dev \ libacl1-dev libssl-dev libpq-dev libjpeg62-turbo-dev build-essential \ python3-gdbm python3-dev python3-pip python3-virtualenv virtualenv git
Install wanted optional dependencies depending on features you intend to use (see Varësi opsionale):
apt install tesseract-ocr libtesseract-dev libleptonica-dev apt install libldap2-dev libldap-common libsasl2-dev apt install libxmlsec1-dev
Optionally install software for running production server, see Running server, Ujdisje baze të dhënash për Weblate, Background tasks using Celery. Depending on size of your installation you might want to run these components on dedicated servers.
The local installation instructions:
# Web server option 1: NGINX and uWSGI apt install nginx uwsgi uwsgi-plugin-python3 # Web server option 2: Apache with ``mod_wsgi`` apt install apache2 libapache2-mod-wsgi-py3 # Caching backend: Redis apt install redis-server # Database server: PostgreSQL apt install postgresql postgresql-contrib # SMTP server apt install exim4
We’re using virtualenv to install Weblate in a separate environment from your system. If you are not familiar with it, check virtualenv User Guide.
Create the virtualenv for Weblate:
virtualenv --python=python3 ~/weblate-env
Activate the virtualenv for Weblate:
Install Weblate including all optional dependencies:
# pkgconfig is needed to install borgbackup 1.2 pip install pkgconfig # Install Weblate with all optional dependencies pip install "Weblate[all]"
Please check Varësi opsionale for fine-tuning of optional dependencies.
On some Linux distributions running Weblate fails with libffi error:
ffi_prep_closure(): bad user_data (it seems that the version of the libffi library seen at runtime is different from the 'ffi.h' file seen at compile-time)
This is caused by incompatibility of binary packages distributed via PyPI with the distribution. To address this, you need to rebuild the package on your system:
pip install --force-reinstall --no-binary :all: cffi
Following steps assume virtualenv used by Weblate is active (what can be
. ~/weblate-env/bin/activate). In case this is not true, you will
have to specify full path to weblate command as
Copy the file
Adjust the values in the new
settings.pyfile to your liking. You will need to provide at least the database credentials and Django secret key, but you will want more changes for production setup, see Përshtatje formësimi.
Create the database and its structure for Weblate (the example settings use PostgreSQL, check Ujdisje baze të dhënash për Weblate for production ready setup):
Create the administrator user account and copy the password it outputs to the clipboard, and also save it for later use:
Start Celery workers. This is not necessary for development purposes, but strongly recommended otherwise. See Background tasks using Celery for more info:
Start the development server (see Running server for production setup):
Congratulations, your Weblate server is now running and you can start using it.
You can now access Weblate on
Sign in with admin credentials obtained during installation or register with new users.
You can now run Weblate commands using weblate command when Weblate virtualenv is active, see Management commands.
You can stop the test server with Ctrl+C.
Open the admin interface (
http://localhost:8000/create/project/) and create the project you want to translate. See Project configuration for more details.
All you need to specify here is the project name and its website.
Create a component which is the real object for translation - it points to the VCS repository, and selects which files to translate. See Component configuration for more details.
The important fields here are: Emër përbërësi, Depo kodi burim, and Maskë kartele for finding translatable files. Weblate supports a wide range of formats including GNU gettext, Burime vargjesh Android, Vargje Apple iOS, Veti Java, Stringsdict format or Fluent format, see Formate të mbuluar kartelash for more details.
Once the above is completed (it can be lengthy process depending on the size of your VCS repository, and number of messages to translate), you can start translating.