Weblate is an open-source web-based translation platform that allows you to manage and translate various projects; it also supports different file formats, such as gettext PO files, XLIFF, and Android XML files. In this guide, we will show you how to install Weblate on a Fedora server latest.
Before installing Weblate, make sure that you have:
Update the system packages to the latest version before installing any new packages by running the command below.
$ sudo dnf update
Weblate requires several dependencies to be installed on our Fedora server. Use the following command to install them all.
$ sudo dnf install postgresql postgresql-server memcached redis-devel redis gettext redis-doc nginx uwsgi uwsgi-plugin-common uwsgi-plugin-python3
Weblate requires PostgreSQL as its backend database. Install PostgreSQL by running the following command:
$ sudo dnf install postgresql-server postgresql-contrib
Create a new PostgreSQL database and user for Weblate:
$ sudo -u postgres createuser -P weblateuser
$ sudo -u postgres createdb -O weblateuser weblate
Install Weblate by running the following command:
$ sudo dnf install weblate
The installation command will install Weblate and configure it to use the PostgreSQL database.
Now it's time to configure Weblate using the provided configuration file. By default, the configuration file is located at /etc/weblate/settings.py
.
For security reasons, it is recommended to generate a new secret key to encrypt user passwords and other sensitive data. Run the following command to generate a new secret key:
$ sudo python3 /usr/share/weblate/manage.py generate_secret_key
Then, copy the generated secret key to the SECRET_KEY
section of the Weblate config file.
Next, configure the database settings for Weblate. Edit the DATABASES
section in /etc/weblate/settings.py
file to match the database and user you created earlier.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'weblate',
'USER': 'weblateuser',
'PASSWORD': 'yourpassword',
'HOST': 'localhost',
'PORT': '',
}
}
Make sure you replace yourpassword
with the actual password you created for the PostgreSQL weblateuser
.
Weblate requires a web server to serve its contents. In this case, we will use NGINX. Edit the default NGINX config file at /etc/nginx/nginx.conf
.
$ sudo nano /etc/nginx/nginx.conf
And paste the following configuration into the file.
server {
listen 80 ;
server_name weblate.example.com;
access_log /var/log/nginx/weblate_access.log;
error_log /var/log/nginx/weblate_error.log;
location / {
uwsgi_pass unix:///run/uwsgi/app/weblate/socket;
include uwsgi_params;
}
}
Replace weblate.example.com
with your domain name.
Reload the NGINX configuration:
$ sudo systemctl reload nginx
Start Weblate by running the following command:
$ sudo systemctl start weblate
Make sure that Weblate is running by checking its status using:
$ sudo systemctl status weblate
You should see the status as active
.
Congratulations! You have successfully installed Weblate on your Fedora server. You can now log in to your Weblate instance at http://yourdomain.com:8000.
We hope this guide has helped you in your installation process, and you can start using Weblate by managing your translation projects with it.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!