Skip to content

Deploying Weblate

Introduction

Weblate is a powerful, self-hosted web-based translation management system designed for software localization. It integrates tightly with version control systems, allowing translators to work directly with your codebase while developers can easily pull in new translations.

Built with Python and Django, Weblate provides a comprehensive platform for managing translations across multiple projects and languages, with features that support both individual translators and large translation teams.

Key features of Weblate include:

  • Version Control Integration: Native support for Git, Mercurial, and Subversion
  • Translation Memory: Share translations across projects to improve consistency
  • Machine Translation: Integration with DeepL, Google Translate, and other MT services
  • Quality Checks: Automatic quality assurance for translations
  • Glossary Support: Maintain terminology consistency across projects
  • File Format Support: Support for PO, XLIFF, JSON, Android, iOS, and many more
  • Collaborative Workflow: Review, approval, and commenting features
  • Automatic Translation: Propagate translations across similar strings
  • Statistics and Reports: Track translation progress and contributor activity
  • API Access: Comprehensive REST API for automation
  • SSO Support: LDAP, SAML, and OAuth authentication

This guide walks you through deploying Weblate on Klutch.sh using Docker for translation management.

Prerequisites

Before deploying Weblate on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your configuration
  • A PostgreSQL database (managed or deployed separately)
  • A Redis instance (for caching and background tasks)
  • Basic familiarity with Docker and localization concepts

Repository Structure

Create a GitHub repository with the following structure:

weblate-deploy/
├── Dockerfile
└── .dockerignore

Dockerfile

Create a Dockerfile in your repository:

FROM weblate/weblate:latest
# Web interface port
EXPOSE 8080
# The base image handles the entrypoint

Environment Variables

VariableRequiredDefaultDescription
WEBLATE_SITE_DOMAINYes-Your Weblate domain
WEBLATE_SITE_TITLENoWeblateSite title
POSTGRES_HOSTYes-PostgreSQL host
POSTGRES_PORTNo5432PostgreSQL port
POSTGRES_DATABASEYes-Database name
POSTGRES_USERYes-Database user
POSTGRES_PASSWORDYes-Database password
REDIS_HOSTYes-Redis host
REDIS_PORTNo6379Redis port
WEBLATE_ADMIN_EMAILYes-Admin email
WEBLATE_ADMIN_PASSWORDYes-Initial admin password
WEBLATE_EMAIL_HOSTNo-SMTP host for notifications
WEBLATE_SECRET_KEYYes-Django secret key

Deployment on Klutch.sh

  1. Push your Dockerfile to your GitHub repository.
  2. Log in to Klutch.sh and create a new project.
  3. Create a new app within your project and connect your GitHub repository containing the Dockerfile.
  4. Configure the deployment settings: - Select **HTTP** as the traffic type - Set the internal port to **8080**
  5. Add environment variables: - `WEBLATE_SITE_DOMAIN`: Your app domain - `POSTGRES_HOST`, `POSTGRES_DATABASE`, `POSTGRES_USER`, `POSTGRES_PASSWORD`: Database credentials - `REDIS_HOST`: Redis server address - `WEBLATE_ADMIN_EMAIL`, `WEBLATE_ADMIN_PASSWORD`: Admin credentials - `WEBLATE_SECRET_KEY`: A secure random string
  6. Attach persistent volumes: - Mount path: `/app/data` - Recommended size: 20 GB - Purpose: Git repositories and uploaded files
  7. Click **Deploy** and wait for the build to complete.
  8. Access your Weblate instance and log in with your admin credentials.

Post-Deployment Configuration

After deployment:

  1. Log in with your admin credentials
  2. Create your first project
  3. Add components (translation files from repositories)
  4. Configure machine translation services if desired
  5. Invite translators and set up access control

Troubleshooting

Database Connection Issues

Verify PostgreSQL credentials and ensure the database is accessible from Klutch.sh.

Background Tasks Not Running

Ensure Redis is properly configured and accessible.

Git Operations Failing

Check that SSH keys are configured if using private repositories.

Additional Resources