Weblate deployments

Weblate comes with support for deployment using several technologies. This section is overview of them.

Running Weblate in the Docker

With dockerized weblate deployment you can get your personal weblate instance up an running in seconds. All of Weblate’s dependencies are already included. PostgreSQL is configured as the default database.


The following examples assume you have a working Docker environment, with docker-compose installed. Please check Docker documentation for instructions on this.

  1. Clone weblate-docker repo:

    git clone https://github.com/WeblateOrg/docker-compose.git weblate-docker
    cd weblate-docker
  2. Create a docker-compose.override.yml file with your settings. See Docker environment variables full list of environment vars

    version: '3'
          - WEBLATE_EMAIL_HOST=smtp.example.com
          - WEBLATE_EMAIL_HOST_USER=user
          - WEBLATE_SERVER_EMAIL=weblate@example.com
          - WEBLATE_DEFAULT_FROM_EMAIL=weblate@example.com
          - WEBLATE_ALLOWED_HOSTS=weblate.example.com
          - WEBLATE_ADMIN_PASSWORD=password for admin user


    If WEBLATE_ADMIN_PASSWORD is not set, admin user is created with random password printed out on first startup.

  3. Start Weblate containers:

    docker-compose up

Enjoy your Weblate deployment, it’s accessible on port 80 of the weblate container.

Changed in version 2.15-2: The setup has changed recently, prior there was separate web server container, since 2.15-2 the web server is embedded in weblate container.

Docker container with https support

Please see Deployment for generic deployment instructions. To add HTTPS reverse proxy additional Docker container is required, we will use https-portal. This is used in the docker-compose-https.yml file. Then you just need to create a docker-compose-https.override.yml file with your settings:

version: '3'
      - WEBLATE_EMAIL_HOST=smtp.example.com
      - WEBLATE_ALLOWED_HOSTS=weblate.example.com
      - WEBLATE_ADMIN_PASSWORD=password for admin user
      DOMAINS: 'weblate.example.com -> http://weblate'

Whenever invoking docker-compose you need to pass both files to it then:

docker-compose -f docker-compose-https.yml -f docker-compose-https.override.yml build
docker-compose -f docker-compose-https.yml -f docker-compose-https.override.yml up

Upgrading Docker container

Usually it is good idea to update the weblate container only and keep the PostgreSQL container at version you have as upgrading PostgreSQL is quite painful and in most cases it does not bring many benefits.

You can do this by sticking with existing docker-compose and just pulling latest images and restarting:

docker-compose stop
docker-compose pull
docker-compose up

The Weblate database should be automatically migrated on first start and there should be no need for additional manual actions.


Upgrades across 3.0 are not supported by Weblate. If you are on 2.x series and want to upgrade to 3.x, first upgrade to latest 3.0.1-x (at time of writing this it is 3.0.1-7) image which will do the migration and then continue in upgrading to newer versions.

Docker environment variables

Many of Weblate Configuration can be set in Docker container using environment variables:

Generic settings


Configures Django debug mode using DEBUG.



See also

Disable debug mode.


Configures verbosity of logging.


Configures site title shown on headings of all pages.


Configures site admins name and email.


  - WEBLATE_ADMIN_NAME=Weblate Admin
  - WEBLATE_ADMIN_EMAIL=noreply@example.com

Sets password for admin user. If not set, admin user is created with random password printed out on first startup.

Changed in version 2.9: Since version 2.9, the admin user is adjusted on every container startup to match WEBLATE_ADMIN_PASSWORD, WEBLATE_ADMIN_NAME and WEBLATE_ADMIN_EMAIL.


Configures address for outgoing mails.


Configures allowed HTTP hostnames using ALLOWED_HOSTS and sets site name to first one.


  - WEBLATE_ALLOWED_HOSTS=weblate.example.com,example.com

Configures secret used for Django for cookies signing.

Deprecated since version 2.9: The secret is now generated automatically on first startup, there is no need to set it manually.


Configures whether registrations are open by toggling REGISTRATION_OPEN.



Configures time zone used.


Makes Weblate assume it is operated behind HTTPS reverse proxy, it makes Weblate use https in email and API links or set secure flags on cookies.


This does not make the Weblate container accept https connections, you need to use a standalone HTTPS reverse proxy, see Docker container with https support for example.



Enables Weblate fetching IP address from given HTTP header. Use this when using reverse proxy in front of Weblate container.




Configures login required for whole Weblate using LOGIN_REQUIRED_URLS.



Adds URL exceptions for login required for whole Weblate using LOGIN_REQUIRED_URLS_EXCEPTIONS.


Configures ID for Google Analytics by changing GOOGLE_ANALYTICS_ID.


Configures github username for GitHub pull requests by changing GITHUB_USERNAME.


Configures language simplification policy, see SIMPLIFY_LANGUAGES.


Configures Akismet API key, see AKISMET_API_KEY.

Machine translation settings


Enables DeepL machine translation and sets MT_DEEPL_KEY


Enables Google Translate and sets MT_GOOGLE_KEY


Enables Microsoft Cognitive Services Translator and sets MT_MICROSOFT_COGNITIVE_KEY


Enables MyMemory machine translation and sets MT_MYMEMORY_EMAIL to WEBLATE_ADMIN_EMAIL.


Enables Glosbe machine translation.

Authentication settings


LDAP authentication configuration.


  - WEBLATE_AUTH_LDAP_SERVER_URI=ldap://ldap.example.org
  - WEBLATE_AUTH_LDAP_USER_DN_TEMPLATE=uid=%(user)s,ou=People,dc=example,dc=net
  # map weblate 'full_name' to ldap 'name' and weblate 'email' attribute to 'mail' ldap attribute.
  # another example that can be used with OpenLDAP: 'full_name:cn,email:mail'
  - WEBLATE_AUTH_LDAP_USER_ATTR_MAP=full_name:name,email:mail

Enables GitHub authentication.


Enables Bitbucket authentication.


Enables Facebook OAuth2.


Enables Google OAuth2.


Enables GitLab OAuth2.


Disabled email authentication when set to any value.

PostgreSQL database setup

The database is created by docker-compose.yml, so this settings affects both Weblate and PostgreSQL containers.


PostgreSQL password.


PostgreSQL username.


PostgreSQL database name.


PostgreSQL server hostname or IP address. Defaults to database.


PostgreSQL server port. Default to empty (use default value).

Caching server setup

Using redis is strongly recommended by Weblate and you have to provide redis instance when running Weblate in Docker. Additionally memcached is supported for compatibility with older deployments.

See also

Enable caching


The memcached server hostname or IP address. Defaults to cache.


The memcached server port. Defaults to 6379.


The memcached server hostname or IP address. Defaults to cache.


The memcached server port. Defaults to 11211.

Email server setup

To make outgoing email work, you need to provide mail server.


Mail server, the server has to listen on port 587 and understand TLS.

See also



Mail server port, use if your cloud provider or ISP blocks outgoing connections on port 587.

See also



Email authentication user, do NOT use quotes here.

See also



Email authentication password, do NOT use quotes here.


Whether to use an implicit TLS (secure) connection when talking to the SMTP server. In most email documentation this type of TLS connection is referred to as SSL. It is generally used on port 465. If you are experiencing problems, see the explicit TLS setting WEBLATE_EMAIL_USE_TLS.

See also



Whether to use a TLS (secure) connection when talking to the SMTP server. This is used for explicit TLS connections, generally on port 587. If you are experiencing hanging connections, see the implicit TLS setting WEBLATE_EMAIL_USE_SSL.

See also


Error reporting

It is recommended to collect errors from the installation in systematic way, see Collecting error reports.

To enable support for Rollbar, set following:


Your Rollbar post server access token.


Your Rollbar environment, defaults to production.

To enable support for Sentry, set following:


Your Sentry DSN.


Your Sentry public DSN.


Your Sentry environment, defaults to production.

Further configuration customization

You can additionally override the configuration by /app/data/settings-override.py. This is executed after all environment settings are loaded, so it gets complete setup and can be used to customize anything.

Hub setup

In order to use the Github pull requests feature, you must initialize hub configuration by entering the weblate container and executing an arbitrary hub command. For example:

docker-compose exec weblate bash
HOME=/app/data/home hub clone octocat/Spoon-Knife

The username passed for credentials must be the same as GITHUB_USERNAME.

Select your machine - local or cloud providers

With docker-machine you can create your Weblate deployment either on your local machine or on any large number of cloud-based deployments on e.g. Amazon AWS, Digitalocean and many more providers.

Running Weblate on OpenShift 2

This repository contains a configuration for the OpenShift platform as a service product, which facilitates easy installation of Weblate on OpenShift variants (see https://www.openshift.com/ and https://www.okd.io/).


  1. OpenShift Account

    You need an account for OpenShift Online (https://www.openshift.com/) or another OpenShift installation you have access to.

    You can register a free account on OpenShift Online, which allows you to host up to 3 applications free of charge.

  2. OpenShift Client Tools

    In order to follow the examples given in this documentation you need to have the OpenShift Client Tools (RHC) installed: https://docs.openshift.com/online/cli_reference/get_started_cli.html

    While there are other possibilities to create and configure OpenShift applications, this documentation is based on the OpenShift Client Tools (RHC) because they provide a consistent interface for all described operations.


You can install Weblate on OpenShift directly from Weblate’s Github repository with the following command:

# Install Git HEAD
rhc -aweblate app create -t python-2.7 --from-code https://github.com/WeblateOrg/weblate.git --no-git

# Install Weblate 2.10
rhc -aweblate app create -t python-2.7 --from-code https://github.com/WeblateOrg/weblate.git#weblate-2.10 --no-git

The -a option defines the name of your weblate installation, weblate in this instance. You are free to specify a different name.

The above example installs latest development version, you can optionally specify tag identifier right of the # sign to identify the version of Weblate to install. For a list of available versions see here: https://github.com/WeblateOrg/weblate/tags.

The --no-git option skips the creation of a local git repository.

You can also specify which database you want to use:

# For MySQL
rhc -aweblate app create -t python-2.7 -t mysql-5.5 --from-code https://github.com/WeblateOrg/weblate.git --no-git

# For PostgreSQL
rhc -aweblate app create -t python-2.7 -t postgresql-9.2 --from-code https://github.com/WeblateOrg/weblate.git --no-git

Default Configuration

After installation on OpenShift Weblate is ready to use and preconfigured as follows:

  • SQLite embedded database (DATABASES)
  • Random admin password
  • Random Django secret key (SECRET_KEY)
  • Committing of pending changes if the cron cartridge is installed (commit_pending)
  • Weblate machine translations for suggestions bases on previous translations (MT_SERVICES)
  • Weblate directories (STATIC_ROOT, DATA_DIR, TTF_PATH, Avatar cache) set according to OpenShift requirements/conventions
  • Django site name and ALLOWED_HOSTS set to DNS name of your OpenShift application
  • Email sender addresses set to no-reply@<OPENSHIFT_CLOUD_DOMAIN>, where <OPENSHIFT_CLOUD_DOMAIN> is the domain OpenShift runs under. In case of OpenShift Online it’s rhcloud.com.

Retrieve Admin Password

You can retrieve the generated admin password with the following command:

rhc -aweblate ssh credentials

Indexing Offloading

To enable the preconfigured indexing offloading you need to add the cron cartridge to your application and restart it:

rhc -aweblate add-cartridge cron
rhc -aweblate app stop
rhc -aweblate app start

The fulltext search index will then be updated every 5 minutes. Restarting with rhc restart instead will not enable indexing offloading in Weblate. You can verify that indexing offloading is indeed enabled by visiting the URL /admin/performance/ of your application.

Pending Changes

Weblate’s OpenShift configuration contains a cron job which periodically commits pending changes older than a certain age (24h by default). To enable the cron job you need to add the cron cartridge and restart Weblate as described in the previous section. You can change the age parameter by setting the environment variable WEBLATE_PENDING_AGE to the desired number of hours, e.g.:

rhc -aweblate env set WEBLATE_PENDING_AGE=48

Customize Weblate Configuration

You can customize the configuration of your Weblate installation on OpenShift through environment variables. Override any of Weblate’s setting documented under Configuration using rhc env set by prepending the settings name with WEBLATE_. The variable content is put verbatim to the configuration file, so it is parsed as Python string, after replacing environment variables in it (eg. $PATH). To put literal $ you need to escape it as $$.

For example override the ADMINS setting like this:

rhc -aweblate env set WEBLATE_ADMINS='(("John Doe", "jdoe@example.org"),)'

To change site title, do not forget to include additional quotes:

rhc -aweblate env set WEBLATE_SITE_TITLE='"Custom Title"'

New settings will only take effect after restarting Weblate:

rhc -aweblate app stop
rhc -aweblate app start

Restarting using rhc -aweblate app restart does not work. For security reasons only constant expressions are allowed as values. With the exception of environment variables which can be referenced using ${ENV_VAR}. For example:

rhc -aweblate env set WEBLATE_SCRIPTS='("${OPENSHIFT_DATA_DIR}/examples/hook-unwrap-po",)'

You can check the effective settings Weblate is using by running:

rhc -aweblate ssh settings

This will also print syntax errors in your expressions. To reset a setting to its preconfigured value just delete the corresponding environment variable:

rhc -aweblate env unset WEBLATE_ADMINS

See also



It is recommended that you try updates on a clone of your Weblate installation before running the actual update. To create such a clone run:

rhc -aweblate2 app create --from-app weblate

Visit the newly given URL with a browser and wait for the install/update page to disappear.

You can update your Weblate installation on OpenShift directly from Weblate’s github repository by executing:

rhc -aweblate2 ssh update https://github.com/WeblateOrg/weblate.git

The identifier right of the # sign identifies the version of Weblate to install. For a list of available versions see here: https://github.com/WeblateOrg/weblate/tags. Please note that the update process will not work if you modified the git repository of you weblate installation. You can force an update by specifying the --force option to the update script. However any changes you made to the git repository of your installation will be discarded:

rhc -aweblate2 ssh update --force https://github.com/WeblateOrg/weblate.git

The --force option is also needed when downgrading to an older version. Please note that only version 2.0 and newer can be installed on OpenShift, as older versions don’t include the necessary configuration files.

The update script takes care of the following update steps as described under Generic upgrade instructions.

  • Install any new requirements
  • manage.py migrate
  • manage.py setupgroups –move
  • manage.py setuplang
  • manage.py rebuild_index –all
  • manage.py collectstatic –noinput

Bitnami Weblate stack

Bitnami provides Weblate stack for many platforms at <https://bitnami.com/stack/weblate>. The setup will be adjusted during installation, see <https://bitnami.com/stack/weblate/README.txt> for more documentation.

Weblate in YunoHost

The self-hosting project YunoHost provides a package for Weblate. Once you have your YunoHost installation, you may install Weblate as any other application. It will provide you a fully working stack with backup and restoration, but you may still have to edit your settings file for specific usages.

You may use your administration interface or this button (it will bring you to your server):

Install Weblate with YunoHost

It also is possible to use the command line interface:

yunohost app install https://github.com/YunoHost-Apps/weblate_ynh