Installation instructions

Looking for quick installation instructions? See Quick setup guide.

Hardware requirements

Weblate should run on any contemporary hardware without problems, the following is the minimal configuration required to run Weblate on single host (Weblate, database and web server):

  • 2 GB of RAM memory
  • 2 CPU cores
  • 1 GB of storage space

The more memory you have, the better - it will be used for caching on all levels (file system, database and Weblate).

If you are going to have many concurrent users, you will need more CPU cores. For hundreds of translation components at least 4 GB of memory is recommended.


The actual requirements for your installation heavily vary based on the size of translations managed by Weblate.

Software requirements

Python dependencies

Weblate is written in Python and supports Python 2.7, 3.4 or newer. The following dependencies can be installed using pip or your distribution packages:

Django (>= 1.11)
Celery (>= 4.0)
celery-batches (>= 0.2)
siphashc (>= 0.8)
translate-toolkit (>= 2.3.1)
Six (>= 1.7.0)
filelock (>= 3.0.1)
Mercurial (>= 2.8) (optional for Mercurial repositories support)
social-auth-core (>= 1.3.0)
social-auth-app-django (>= 2.0.0)
django-appconf (>= 1.0)
Whoosh (>= 2.7.0)
PIL or Pillow library
lxml (>= 3.1.0)
defusedxml (>= 0.4)
django_compressor (>= 2.1.1)
django-crispy-forms (>= 1.6.1)
Django REST Framework (>=3.8)
user-agents (>= 1.1.0)
pyuca (>= 1.1) (optional for proper sorting of strings)
phply (optional for PHP support)
Database backend
Any database supported in Django will work, see Database setup for Weblate and backends documentation for more details.
pytz (optional, but recommended by Django)
python-bidi (optional for proper rendering of badges in RTL languages)
tesserocr (>= 2.0.0) (optional for screenshots OCR)
akismet (>= 1.0) (optional for suggestion spam protection)
PyYAML (>= 3.0) (optional for YAML files)
backports.csv (needed on Python 2.7)
jellyfish (>= 0.6.1)
openpyxl (>=2.5.0) (for XLSX export/import)
zeep (>=3.0.0) (optional for Microsoft Terminology Service)

Other system requirements

The following dependencies have to be installed on the system:

Git (>= 1.6)
hub (optional for sending pull requests to GitHub)
git-review (optional for Gerrit support)
git-svn (>= 2.10.0) (optional for Subversion support)
tesseract and it’s data (optional for screenshots OCR)

Compile time dependencies

To compile some of the Python dependencies you might need to install their dependencies. This depends on how you install them, so please consult individual packages for documentation. You won’t need those if using prebuilt Wheels while installing using pip or when you use distribution packages.

Installing Weblate

Choose an installation method that best fits your environment.

First choices include complete setup without relying on your system libraries:

You can also install Weblate directly on your system either fully using distribution packages (currently available for openSUSE only) or mixed setup.

Choose installation method:

And install dependencies according your platform:

Installing in virtualenv

This is recommended method if you don’t want to dig into details. This will create separate Python environment for Weblate, possibly duplicating some system Python libraries.

  1. Install development files for libraries we will use during building Python modules:

    # Debian/Ubuntu:
    apt install libxml2-dev libxslt-dev libfreetype6-dev libjpeg-dev libz-dev libyaml-dev python-dev
    # openSUSE/SLES:
    zypper install libxslt-devel libxml2-devel freetype-devel libjpeg-devel zlib-devel libyaml-devel python-devel
    # Fedora/RHEL/CentOS:
    dnf install libxslt-devel libxml2-devel freetype-devel libjpeg-devel zlib-devel libyaml-devel python-devel
  2. Install pip and virtualenv. Usually they are shipped by your distribution or with Python:

    # Debian/Ubuntu:
    apt-get install python-pip python-virtualenv
    # openSUSE/SLES:
    zypper install python-pip python-virtualenv
    # Fedora/RHEL/CentOS:
    dnf install python-pip python-virtualenv
  3. Create and activate virtualenv for Weblate:

    virtualenv ~/weblate-env
    . ~/weblate-env/bin/activate
  4. Install Weblate including all dependencies, you can also use pip to install optional dependencies:

    pip install Weblate
    # Optional deps
    pip install pytz python-bidi PyYAML pyuca
  5. Create your settings (in our example it would be in ~/weblate-env/lib/python2.7/site-packages/weblate/ based on the in same directory).

  6. You can now run Weblate commands using weblate command, see Management commands.

  7. To run webserver, use the wsgi wrapper installed with Weblate (in our case it is ~/weblate-env/lib/python2.7/site-packages/weblate/ Don’t forget to set Python search path to your virtualenv as well (for example using virtualenv = /home/user/weblate-env in uwsgi).

Installing Weblate from Git

You can also run the latest version from Git. It is maintained stable and production ready. You can usually find it running on Hosted Weblate.

To get latest sources using Git use:

git clone


If you are running a version from Git, you should also regenerate locale files every time you are upgrading. You can do this by invoking script ./scripts/generate-locales.

Installing Weblate by pip

If you decide to install Weblate using pip installer, you will notice some differences. Most importantly the command line interface is installed to the system path as weblate instead of ./ as used in this documentation. Also when invoking this command, you will have to specify settings, either by environment variable DJANGO_SETTINGS_MODULE on the command line, for example:

DJANGO_SETTINGS_MODULE=yourproject.settings weblate migrate

Requirements on Debian or Ubuntu

On recent Debian or Ubuntu, most of requirements are already packaged, to install them you can use apt-get:

apt-get install python-pip python-django translate-toolkit \
    python-whoosh python-pil \
    git mercurial \
    python-django-compressor python-django-crispy-forms \
    python-djangorestframework python-dateutil python-celery

# Optional packages for database backend:

# For PostgreSQL
apt-get install python-psycopg2
# For MySQL on Ubuntu (if using Ubuntu package for Django)
apt-get install python-pymysql
# For MySQL on Debian (or Ubuntu if using upstream Django packages)
apt-get install python-mysqldb

On older versions, some required dependencies are missing or outdated, so you need to install several Python modules manually using pip:

# Dependencies for python-social-auth
apt-get install python-requests-oauthlib python-six python-openid

# Social auth
pip install social-auth-core
pip install social-auth-app-django

# In case your distribution has python-django older than 1.9
pip install Django

# In case python-django-crispy-forms package is missing
pip install django-crispy-forms

# In case python-whoosh package is misssing or older than 2.7
pip install Whoosh

# In case your python-django-compressor package is missing,
# try installing it by older name or using pip:
apt-get install python-compressor
pip install django_compressor

# Optional for OCR support
apt-get install tesseract-ocr libtesseract-dev libleptonica-dev cython
pip install tesserocr

For proper sorting of a Unicode strings, it is recommended to install pyuca:

pip install pyuca

Depending on how you intend to run Weblate and what you already have installed, you might need additional components:

# Web server option 1: nginx and uwsgi
apt-get install nginx uwsgi uwsgi-plugin-python

# Web server option 2: Apache with mod_wsgi
apt-get install apache2 libapache2-mod-wsgi

# Caching backend: redis
apt-get install redis-server

# Database option 1: postgresql
apt-get install postgresql

# Database option 2: mariadb
apt-get install mariadb-server

# Database option 3: mysql
apt-get install mysql-server

# SMTP server
apt-get install exim4

# GitHub PR support: hub
# See

Requirements on openSUSE

Most of requirements are available either directly in openSUSE or in devel:languages:python repository:

zypper install python-Django translate-toolkit \
    python-Whoosh python-Pillow \
    python-social-auth-core python-social-auth-app-django \
    Git mercurial python-pyuca \
    python-dateutil python-celery

# Optional for database backend
zypper install python-psycopg2      # For PostgreSQL
zypper install python-MySQL-python  # For MySQL

Depending on how you intend to run Weblate and what you already have installed, you might need additional components:

# Web server option 1: nginx and uwsgi
zypper install nginx uwsgi uwsgi-plugin-python

# Web server option 2: Apache with mod_wsgi
zypper install apache2 apache2-mod_wsgi

# Caching backend: redis
zypper install redis-server

# Database option 1: postgresql
zypper install postgresql

# Database option 2: mariadb
zypper install mariadb

# Database option 3: mysql
zypper install mysql

# SMTP server
zypper install postfix

# GitHub PR support: hub
# See

Requirements on OSX

If your python was not installed using brew, make sure you have this in your .bash_profile file or executed somehow:

export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"

This configuration makes the installed libraries available to Python.

Requirements using pip installer

Most requirements can be also installed using pip installer:

pip install -r requirements.txt

For building some of the extensions development files for several libraries are required, see Installing in virtualenv for instructions how to install these.

All optional dependencies (see above) can be installed using:

pip install -r requirements-optional.txt

Filesystem permissions

The Weblate process needs to be able to read and write to the directory where it keeps data - DATA_DIR.

The default configuration places them in the same tree as Weblate sources, however you might prefer to move these to better location such as /var/lib/weblate.

Weblate tries to create these directories automatically, but it will fail when it does not have permissions to do so.

You should also take care when running Management commands, as they should be run under the same user as Weblate itself is running, otherwise permissions on some files might be wrong.

Database setup for Weblate

It is recommended to run Weblate on some database server. Using SQLite backend is really suitable only for testing purposes.


PostgreSQL is usually the best choice for Django based sites. It’s the reference database used for implementing Django database layer.

See also

PostgreSQL notes

Creating database in PostgreSQL

It is usually good idea to run Weblate in a separate database and separate user account:

# If PostgreSQL was not installed before, set the master password
sudo -u postgres psql postgres -c "\password postgres"

# Create database user called "weblate"
sudo -u postgres createuser -D -P weblate

# Create database "weblate" owned by "weblate"
sudo -u postgres createdb -O weblate weblate

Configuring Weblate to use PostgreSQL

The snippet for PostgreSQL:

    'default': {
        # Database engine
        'ENGINE': 'django.db.backends.postgresql',
        # Database name
        'NAME': 'weblate',
        # Database user
        'USER': 'weblate',
        # Database password
        'PASSWORD': 'password',
        # Set to empty string for localhost
        'HOST': '',
        # Set to empty string for default
        'PORT': '',

MySQL or MariaDB

MySQL or MariaDB are quite good choices to run Weblate. However when using MySQL you might hit some problems caused by it.

See also

MySQL notes

Unicode issues in MySQL

MySQL by default uses something called utf8, what can not store all Unicode characters, only those who fit into three bytes in utf-8 encoding. In case you’re using emojis or some other higher Unicode symbols you might hit errors when saving such data. Depending on MySQL and Python bindings version, the error might look like:

  • OperationalError: (1366, “Incorrect string value: ‘\xF0\xA8\xAB\xA1’ for column ‘target’ at row 1”)
  • UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-3: ordinal not in range(128)

To solve this, you need to change your database to use utf8mb4 (what is again subset of Unicode, but this time which can be stored in four bytes in utf-8 encoding, thus covering all chars currently defined in Unicode).

This can be achieved at database creation time by creating it with this character set (see Creating database in MySQL) and specifying the character set in connection settings (see Configuring Weblate to use MySQL).

In case you have existing database, you can change it to utf8mb4 by, but this won’t change collation of existing fields:


Using this charset might however lead to problems with default MySQL server settings as each character is now taking 4 bytest to store and MySQL has limit of 767 bytes for an index. In case this happens you will get one of following error messages:

  • 1071: Specified key was too long; max key length is 767 bytes
  • 1709: Index column size too large. The maximum column size is 767 bytes.

There are two ways to workaround this limitation. You can configure MySQL in a way to not have this limit, see Using Innodb_large_prefix to Avoid ERROR 1071. Alternatively you can also adjust several settings for social-auth in your (see Configuration):

# Limit some social-auth fields to 191 chars to fit
# them in 767 bytes


Transaction locking

MySQL by default uses has different transaction locking scheme than other databases and in case you see errors like Deadlock found when trying to get lock; try restarting transaction it might be good idea to enable STRICT_TRANS_TABLES mode in MySQL. This can be done in the server configuration file (usually /etc/mysql/my.cnf on Linux):


See also

Setting sql_mode

Creating database in MySQL

Create weblate user to access the weblate database:

# Grant all privileges to  weblate user
GRANT ALL PRIVILEGES ON weblate.* TO 'weblate'@'localhost'  IDENTIFIED BY 'password';

# Create database on MySQL >= 5.7.7

# Use utf8 for older versions

Configuring Weblate to use MySQL

The snippet for MySQL:

    'default': {
        # Database engine
        'ENGINE': 'django.db.backends.mysql',
        # Database name
        'NAME': 'weblate',
        # Database user
        'USER': 'weblate',
        # Database password
        'PASSWORD': 'password',
        # Set to empty string for localhost
        'HOST': '',
        # Set to empty string for default
        'PORT': '',
        # Additional database options
        'OPTIONS': {
            # In case of older MySQL server which has default MariaDB
            # 'init_command': 'SET storage_engine=INNODB',
            # If your server supports it, see Unicode issues above
           'charset': 'utf8mb4',


Other configurations

Configuring outgoing mail

Weblate sends out emails on various occasions - for account activation and on various notifications configured by users. For this it needs access to the SMTP server, which will handle this.

The mail server setup is configured using settings EMAIL_HOST, EMAIL_HOST_PASSWORD, EMAIL_HOST_USER and EMAIL_PORT. Their names are quite self-explanatory, but you can find out more information in the Django documentation.


You can verify whether outgoing mail is working correctly by using sendtestemail management command.

Background tasks using Celery

New in version 3.2.

Weblate uses Celery to process background tasks. The example settings come with eager configuration, which does process all tasks in place, but you want to change this to something more reasonable for production setup.

Typical setup using redis as a backend should look like:

CELERY_BROKER_URL = 'redis://localhost:6379'

You should also start the Celery worker to process the tasks and start scheduled tasks, this can be done directly on command line (what is mostly useful when debugging or developing):

celery worker --app weblate --loglevel info --beat

Most likely you will want to run Celery as a daemon and that is covered by Daemonization. For the most usual Linux setup using systemd you can use example files shipped in the examples folder and listed below.

Systemd unit to be placed as /etc/systemd/system/celery-weblate.service:

Description=Celery Service (Weblate)

ExecStartPre=/bin/mkdir -p /var/run/celery
ExecStartPre=/bin/chown -R weblate /var/run/celery/
ExecStartPre=/bin/mkdir -p /var/log/celery
ExecStartPre=/bin/chown -R weblate /var/log/celery/
ExecStart=/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES} \
  -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
  --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
ExecStop=/bin/sh -c '${CELERY_BIN} multi stopwait ${CELERYD_NODES} \
ExecReload=/bin/sh -c '${CELERY_BIN} multi restart ${CELERYD_NODES} \
  -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
  --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'


Environment configuration to be placed as /etc/default/celery-weblate:

# Name of nodes to start
# here we have a single node
# or we could have three nodes:
#CELERYD_NODES="w1 w2 w3"

# Absolute or relative path to the 'celery' command:

# App instance to use
# comment out this line if you don't use an app

# How to call

# Extra command-line arguments to the worker

# - %n will be replaced with the first part of the nodename.
# - %I will be replaced with the current child process index
#   and is important when using the prefork pool to avoid race conditions.


Logrotate configuration to be placed as /etc/logrotate.d/celery:

/var/log/celery/*.log {
        rotate 12

Weblate comes with built in setup for scheduled tasks. You can however define additional tasks in, for example:

    # Unconditionally commit all changes every 2 minutes
    'commit': {
        'task': 'weblate.trans.tasks.commit_pending',
        'kwargs': {'hours': 0},
        'schedule': 120,


The Celery process has to be executed under same user as Weblate wsgi process, otherwise files in the DATA_DIR will be stored with mixed ownership leading to runtime issues.


Copy weblate/ to weblate/ and adjust it to match your setup. You will probably want to adjust the following options:


List of site administrators to receive notifications when something goes wrong, for example notifications on failed merge or Django errors.

See also



If you are running Django 1.5 or newer, you need to set this to list of hosts your site is supposed to serve. For example:


See also



Configure how your sessions will be stored. In case you keep default database backed engine you should schedule ./ clearsessions to remove stale session data from the database.

If you are using redis as cache (see Enable caching) it is recommended to use it for sessions as well:

SESSION_ENGINE = 'django.contrib.sessions.backends.cache'


Connectivity to database server, please check Django’s documentation for more details.


Disable this for production server. With debug mode enabled, Django will show backtraces in case of error to users, when you disable it, errors will go by email to ADMINS (see above).

Debug mode also slows down Weblate as Django stores much more information internally in this case.

See also



Email sender address for outgoing email, for example registration emails.

See also



Key used by Django to sign some information in cookies, see Django secret key for more information.


Email used as sender address for sending emails to administrator, for example notifications on failed merge.

See also


Filling up the database

After your configuration is ready, you can run ./ migrate to create the database structure. Now you should be able to create translation projects using the admin interface.

In case you want to run installation non interactively, you can use ./ migrate --noinput and then create admin user using createadmin command.

You should also login to admin interface (on /admin/ URL) and adjust the default site name to match your domain by clicking on Sites and there changing the record to match your real domain name.

Once you are done, you should also check Performance report in the admin interface which will give you hints for non optimal configuration on your site.

Production setup

For production setup you should do adjustments described in following sections. The most critical settings will trigger warning which is indicated by red exclamation mark in the top bar if you are logged in as a superuser:


It is also recommended to inspect checks fired by Django (though you might not need to fix all of them):

./ check --deploy

Disable debug mode

Disable Django’s debug mode (DEBUG) by:

DEBUG = False

With debug mode Django stores all executed queries and shows users backtraces of errors which is not desired in production setup.

See also


Properly configure admins

Set correct admin addresses to ADMINS setting for defining who will receive mail in case something goes wrong on the server, for example:

    ('Your Name', ''),

See also


Set correct site name

Adjust site name in admin interface, otherwise links in RSS or registration emails will not work.

Please open the admin interface and edit default site name and domain under the Sites › Sites (or you can do that directly at /admin/sites/site/1/ URL under your Weblate installation). You have to change the Domain name to match your setup.


This setting should contain only the domain name. For configuring protocol (enabling HTTPS) use ENABLE_HTTPS and for changing URL use URL_PREFIX.

Alternatively, you can set the site name from command line using changesite. For example, when using built in server:

./ changesite --set-name

For production site, you want something like:

./ changesite --set-name

Correctly configure HTTPS

It is strongly recommended to run Weblate using encrypted HTTPS protocol. After enabling you shoud sed ENABLE_HTTPS settings which also adjusts several other related Django settings in the example configuration.

You might want to configure HSTS as well, see SSL/HTTPS for more details.

Use powerful database engine

Use a powerful database engine (SQLite is usually not good enough for production environment), see Database setup for Weblate for more information.

Enable caching

If possible, use redis from Django by adjusting CACHES configuration variable, for example:

    'default': {
        'BACKEND': 'django_redis.cache.RedisCache',
        'LOCATION': 'redis://',
        # If redis is running on same host as Weblate, you might
        # want to use unix sockets instead:
        # 'LOCATION': 'unix:///var/run/redis/redis.sock?db=0',
        'OPTIONS': {
            'CLIENT_CLASS': 'django_redis.client.DefaultClient',
            'PARSER_CLASS': 'redis.connection.HiredisParser',

Alternatively you can also use memcached:

    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '',

Avatar caching

In addition to caching of Django, Weblate performs caching of avatars. It is recommended to use separate, file backed cache for this purpose:

    'default': {
        # Default caching backend setup, see above
        'BACKEND': 'django_redis.cache.RedisCache',
        'LOCATION': 'unix:///var/run/redis/redis.sock?db=0',
        'OPTIONS': {
            'CLIENT_CLASS': 'django_redis.client.DefaultClient',
            'PARSER_CLASS': 'redis.connection.HiredisParser',
    'avatar': {
        'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
        'LOCATION': os.path.join(DATA_DIR, 'avatar-cache'),
        'TIMEOUT': 604800,
        'OPTIONS': {
            'MAX_ENTRIES': 1000,

Configure email addresses

Weblate needs to send out emails on several occasions and these emails should have correct sender address, please configure SERVER_EMAIL and DEFAULT_FROM_EMAIL to match your environment, for example:


Allowed hosts setup

Django 1.5 and newer require ALLOWED_HOSTS to hold a list of domain names your site is allowed to serve, having it empty will block any request.

See also


pyuca library

pyuca library is optionally used by Weblate to sort Unicode strings. This way language names are properly sorted even in non-ASCII languages like Japanese, Chinese or Arabic or for languages with accented letters.

Django secret key

The SECRET_KEY setting is used by Django to sign cookies and you should really generate your own value rather than using the one coming from example setup.

You can generate new key using examples/generate-secret-key shipped with Weblate.

See also


Static files

If you see purely designed admin interface, the CSS files required for it are not loaded. This is usually if you are running in non-debug mode and have not configured your web server to serve them. Recommended setup is described in the Serving static files chapter.

Home directory

Changed in version 2.1: This is no longer required, Weblate now stores all its data in DATA_DIR.

The home directory for the user which is running Weblate should be existing and writable by this user. This is especially needed if you want to use SSH to access private repositories, but Git might need to access this directory as well (depends on the Git version you use).

You can change the directory used by Weblate in, for example to set it to configuration directory under Weblate tree:

os.environ['HOME'] = os.path.join(BASE_DIR, 'configuration')


On Linux and other UNIX like systems, the path to user’s home directory is defined in /etc/passwd. Many distributions default to non writable directory for users used for serving web content (such as apache, www-data or wwwrun, so you either have to run Weblate under a different user or change this setting.

Template loading

It is recommended to use cached template loader for Django. It caches parsed templates and avoids the need to do the parsing with every single request. You can configure it using the following snippet (the loaders setting is important here):

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            os.path.join(BASE_DIR, 'templates'),
        'OPTIONS': {
            'context_processors': [
            'loaders': [
                ('django.template.loaders.cached.Loader', [

Running maintenance tasks

For optimal performance, it is good idea to run some maintenance tasks in the background.

Changed in version 3.2: Since version 3.2 the default way of executing these tasks is using Celery and Weblate already comes with proper configuration, see Background tasks using Celery.

Running server

Running Weblate is not different from running any other Django based application. Django is usually executed as uwsgi or fcgi (see examples for different webservers below).

For testing purposes, you can use the Django built-in web server:

./ runserver


Do not use this in production as this has severe performance limitations.

Serving static files

Changed in version 2.4: Prior to version 2.4 Weblate didn’t properly use Django static files framework and the setup was more complex.

Django needs to collect its static files to a single directory. To do so, execute ./ collectstatic --noinput. This will copy the static files into directory specified by STATIC_ROOT setting (this defaults to static directory inside DATA_DIR).

It is recommended to serve static files directly by your web server, you should use that for following paths:

Serves static files for Weblate and admin interface (from defined by STATIC_ROOT).
Used for user media uploads (eg. screenshots).
Should be rewritten to rewrite rule to serve /static/favicon.ico
Should be rewritten to rewrite rule to serve /static/robots.txt

Content security policy

Default Weblate configuration enables weblate.middleware.SecurityMiddleware middleware which sets security related HTTP headers like Content-Security-Policy or X-XSS-Protection. These are set to work with Weblate and it’s configuration, but this might clash with your customization. If that is your case, it is recommended to disable this middleware and set these headers manually.

Sample configuration for Apache

Following configuration runs Weblate as WSGI, you need to have enabled mod_wsgi (available as examples/apache.conf):

# VirtualHost for weblate
# This example assumes Weblate is installed in /usr/share/weblate
# If using virtualenv, you need to add it to search path as well:
# WSGIPythonPath /usr/share/weblate:/path/to/your/venv/lib/python2.7/site-packages
<VirtualHost *:80>

    # DATA_DIR/static/robots.txt
    Alias /robots.txt /var/lib/weblate/static/robots.txt
    # DATA_DIR/static/favicon.ico
    Alias /favicon.ico /var/lib/weblate/static/favicon.ico

    # DATA_DIR/static/
    Alias /static/ /var/lib/weblate/static/
    <Directory /var/lib/weblate/static/>
        Require all granted

    # DATA_DIR/media/
    Alias /media/ /var/lib/weblate/media/
    <Directory /var/lib/weblate/media/>
        Require all granted

    WSGIDaemonProcess python-path=/usr/share/weblate
    WSGIApplicationGroup %{GLOBAL}

    WSGIScriptAlias / /usr/share/weblate/weblate/
    WSGIPassAuthorization On

    <Directory /usr/share/weblate/weblate>
        Require all granted


This configuration is for Apache 2.4 and later. For earlier versions of Apache, replace Require all granted with Allow from all.

Sample configuration for Apache and gunicorn

Following configuration runs Weblate in gunicorn and Apache 2.4 (available as examples/apache.gunicorn.conf):

# VirtualHost for weblate using gunicorn on localhost:8000
# This example assumes Weblate is installed in /usr/share/weblate

<VirtualHost *:443>

    # DATA_DIR/static/robots.txt
    Alias /robots.txt /var/lib/weblate/static/robots.txt
    # DATA_DIR/static/favicon.ico
    Alias /favicon.ico /var/lib/weblate/static/favicon.ico

    # DATA_DIR/static/
    Alias /static/ /var/lib/weblate/static/
    <Directory /var/lib/weblate/static/>
        Require all granted

    # DATA_DIR/media/
    Alias /media/ /var/lib/weblate/media/
    <Directory /var/lib/weblate/media/>
        Require all granted

    SSLEngine on
    SSLCertificateFile /etc/apache2/ssl/https_cert.cert
    SSLCertificateKeyFile /etc/apache2/ssl/https_key.pem
    SSLProxyEngine On

    ProxyPass /robots.txt !
    ProxyPass /favicon.ico !
    ProxyPass /static/ !
    ProxyPass /media/ !

    ProxyPass / http://localhost:8000/
    ProxyPassReverse / http://localhost:8000/
    ProxyPreserveHost On

Sample configuration for nginx and uwsgi

The following configuration runs Weblate as uwsgi under nginx webserver.

Configuration for nginx (also available as examples/weblate.nginx.conf):

server {
    listen 80;
    server_name weblate;
    root /usr/share/weblate;

    location ~ ^/favicon.ico$ {
        # DATA_DIR/static/favicon.ico
        alias /var/lib/weblate/static/favicon.ico;
        expires 30d;

    location ~ ^/robots.txt$ {
        # DATA_DIR/static/robots.txt
        alias /var/lib/weblate/static/robots.txt;
        expires 30d;

    location /static/ {
        # DATA_DIR/static/
        alias /var/lib/weblate/static/;
        expires 30d;

    location /media/ {
        # DATA_DIR/media/
        alias /var/lib/weblate/media/;
        expires 30d;

    location / {
        include uwsgi_params;
        # Needed for long running operations in admin interface
        uwsgi_read_timeout 3600;
        # Adjust based to uwsgi configuration:
        uwsgi_pass unix:///run/uwsgi/app/weblate/socket;
        # uwsgi_pass;

Configuration for uwsgi (also available as examples/weblate.uwsgi.ini):

plugins       = python
master        = true
protocol      = uwsgi
socket        =
wsgi-file     = /usr/local/lib/python3.6/dist-packages/weblate/

# Add path to Weblate checkout if you did not install
# Weblate by pip
# python-path   = /path/to/weblate

# In case you're using virtualenv uncomment this:
# virtualenv = /path/to/weblate/virtualenv

# Needed for OAuth/OpenID
buffer-size   = 8192

# Increase number of workers for heavily loaded sites
# workers       = 6

# Child processes do not need file descriptors
close-on-exec = true

# Avoid default 0000 umask
umask = 0022

# Run as weblate user
uid = weblate
gid = weblate

# Enable harakiri mode (kill requests after some time)
# harakiri = 3600
# harakiri-verbose = true

# Enable uWSGI stats server
# stats = :1717
# stats-http = true

# Do not log some errors caused by client disconnects
ignore-sigpipe = true
ignore-write-errors = true
disable-write-exception = true

Running Weblate under path

Changed in version 1.3: This is supported since Weblate 1.3.

Sample Apache configuration to serve Weblate under /weblate. Again using mod_wsgi (also available as examples/apache-path.conf):

# Example Apache configuration for running Weblate under /weblate path

WSGIPythonPath /usr/share/weblate
# If using virtualenv, you need to add it to search path as well:
# WSGIPythonPath /usr/share/weblate:/path/to/your/venv/lib/python2.7/site-packages
<VirtualHost *:80>

    # DATA_DIR/static/robots.txt
    Alias /weblate/robots.txt /var/lib/weblate/static/robots.txt
    # DATA_DIR/static/favicon.ico
    Alias /weblate/favicon.ico /var/lib/weblate/static/favicon.ico

    # DATA_DIR/static/
    Alias /weblate/static/ /var/lib/weblate/static/
    <Directory /var/lib/weblate/static/>
        Require all granted

    # DATA_DIR/media/
    Alias /weblate/media/ /var/lib/weblate/media/
    <Directory /var/lib/weblate/media/>
        Require all granted

    WSGIScriptAlias /weblate /usr/share/weblate/weblate/
    WSGIPassAuthorization On

    <Directory /usr/share/weblate/weblate>
        Require all granted


Additionally, you will have to adjust weblate/

URL_PREFIX = '/weblate'

Monitoring Weblate

Weblate provides /healthz/ URL to be used in simple health checks, for example using Kubernetes.

Collecting error reports

It is good idea to collect errors from any Django application in structured way and Weblate is not an exception from this. You might find several services providing this, Weblate has basic support for following ones.


Weblate has built in support for Sentry. To use it it’s enough to follow instructions for Sentry for Python.

In short, you need to adjust

import raven

# Add raven to apps:
    # ... other app classes ...

    'dsn': '',
    # Setting public_dsn will allow collecting user feedback on errors
    'public_dsn': '',
    # If you are using git, you can also automatically configure the
    # release based on the git info.
    'release': raven.fetch_git_sha(BASE_DIR),


Weblate has built in support for Rollbar. To use it it’s enough to follow instructions for Rollbar notifier for Python.

In short, you need to adjust

# Add rollbar as last middleware:
    # ... other middleware classes ...

# Configure client access
    'access_token': 'POST_SERVER_ITEM_ACCESS_TOKEN',
    'client_token': 'POST_CLIENT_ITEM_ACCESS_TOKEN',
    'environment': 'development' if DEBUG else 'production',
    'branch': 'master',
    'root': '/absolute/path/to/code/root',

Everything else is integrated automatically, you will now collect both server and client side errors.

Migrating Weblate to another server

Migrating Weblate to another server should be pretty easy, however it stores data in few locations which you should migrate carefully. The best approach is to stop migrated Weblate for the migration.

Migrating database

Depending on your database backend, you might have several options to migrate the database. The most straightforward one is to dump the database on one server and import it on the new one. Alternatively you can use replication in case your database supports it.

The best approach is to use database native tools as they are usually the most effective (eg. mysqldump or pg_dump). If you want to migrate between different databases, the only option might be to use Django management to dump and import the database:

# Export current data
./ dumpdata > /tmp/weblate.dump
# Import dump
./ loaddata /tmp/weblate.dump

Migrating VCS repositories

The VCS repositories stored under DATA_DIR need to be migrated as well. You can simply copy them or use rsync to do the migration more effectively.

Migrating fulltext index

For the fulltext index (stored in DATA_DIR) it is better not to migrate it, but rather to generate a fresh one using rebuild_index.

Other notes

Don’t forget to move other services which Weblate might have been using like redis, memcached, cron jobs or custom authentication backends.