Toggle navigation

Weblate Image Guide

Version 2.16

Websoft9 Weblate is a pre-configured, ready to run image for running Weblate on Alibaba Cloud.

Weblate is a free web-based translation tool with tight version control integration. It features simple and clean user interface, propagation of translations across components within a project, quality checks and automatic linking to source files.

Application Software(Weblate2.16)
Weblate project directory: /data/wwwroot/weblate
Weblate application directory: /data/wwwroot/weblate/weblate
Weblate configuration file: /data/wwwroot/weblate/weblate/

Application Server(Python2.7,virtualenv 15.0.1,django 1.11.4,uwsgi 2.0.12,nginx 1.10.3)
Weblate for python Virtualenv directory: /data/wwwroot/weblate/env
Nginx configuration directory: /etc/nginx/
Nginx for Weblate configuration file: /etc/nginx/sites-enabled/weblate
uwsgi configuration directory: /etc/uwsgi
uwsgi for weblate configuration file: /etc/uwsgi/apps-enabled/weblate.ini

MySQL directory: /var/lib/mysql
The default database name for Weblate: weblate

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address/
  • If verify successfully,you can enter the Start Installation page of this Image
  • If no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Using Chrome or Firefox to visit: http://Internet IP Address/ to start using this application.Following is the steps:

  1. Visit http://Internet IP Address or http://yourdomain to enter the Administrator page,then click the “Login” link
  2. usename is “admin”,and the password is a random password generated by OS.You should use the Putty to run cat command to get the password of Weblate’s Administrator
    ~# cat /root/weblate_account.txt //get the password of Weblate’s Administrator
    ~# cat /root/mysql_root_password.txt //get the password of MySQL

  3. After the successful log in, you will see the interface below.You can mange your languages and project now

Three usernames and passwords are required for application installation, application using, and application maintenance:

1、Weblate:Username is admin and password is a random password generated by OS
Backend URL:http://Internet IP Address/accounts/login/
2、MySQL Database:Default username is root and password is a random password generated OS
3、Linux Server:Username is root,Password is set by yourself when buying.You can reset the password through console and restart the Server if you have forgotten it.Please Using the Putty for Remote and WinSCP for SFTP

How to get the random password?Use Putty to log in the Linux,and run the commands below:

~# cat /root/mysql_root_password.txt   //get the password of MySQL
~# cat /root/weblate_account.txt       //get the password of Weblate's Administrator 

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup and manual local backup in two ways, both of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Manual Backup

You can use Manual Backup as following steps:

  1. Download the entire software directory(/data/wwwroot/weblate) by SFTP or other tools
  2. Using the Putty to login MySQL, create a dump file using the mysqldump tool.
    MySQL [(none)]> mysqldump -u root -p weblate > backup.sql;              #create database backup
    MySQL [(none)]> exit;                             #quit mysql console,Notice the semicolon at the end
  3. Then download the SQL backup file from the directory /root

Before upgrade you should put the site down for maintenance and always Backup your code, data and config files.

It is highly recommended to temporarily disable any third party themes and user CSS customizations before upgrading. Don’t forget to empty your browser cache if you experience weird bugs right after upgrading.

Note that you should upgrade to the latest version available, installing intermediate releases sequentially is not needed.

Below are the main upgrade steps:

If you want use Domain for this application,you should complete below steps:

  • Domain resolution if you want to use (Add an A record to the Internet IP Address of Server from your Domain Control Panel)
  • Modity the Weblate configuration file: /data/wwwroot/weblate/weblate/,
    ALLOWED_HOSTS = ['','']  //Internet IP Address is OK,you should add your domain only
  • Restart the services

Login as Administrator,Weblate Admin->Authentication,you can find the “Change password” button below:

You can use the command to manage the services for Server.Please choose the corresponding command mode according to different types of operating system

Ubuntu Linux

Nginx Restart

~# systemctl restart nginx.service

uwsgi Restart

~# systemctl restart uwsgi.service

Activate Weblate for python Virtualenv

~# source /data/wwwroot/weblate/env/bin/activate

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644,folder 755 ,Permissions Users and groups www-data
If there is a file permissions problem, execute the following three commands:

chown -R www-data.www-data /data/wwwroot/weblate
find /data/wwwroot/default/weblate -type d -exec chmod 755 {} \;
find /data/wwwroot/default/weblate -type f -exec chmod 644 {} \;