Configuração¶
Todas as configurações estão armazenadas em settings.py (como é habitual no Django).
Nota
Após alterar qualquer uma dessas configurações, você precisa reiniciar o Weblate — tanto os processos WSGI quanto os Celery.
Caso seja executado como mod_wsgi:, você precisa reiniciar o Apache para recarregar a configuração.
Ver também
Please also check Django’s documentation for parameters configuring Django itself.
ADMINS_CONTACT¶
Configura para onde o formulário de contato envia e-mails. Se não estiver configurado, os endereços de e-mail de ADMINS serão usados.
Configure isso como uma lista de endereços de e-mail:
ADMINS_CONTACT = ["admin@example.com", "support@example.com"]
Ver também
ALLOWED_ASSET_DOMAINS¶
Adicionado na versão 5.14.
Configures which domains are allowed for fetching assets in Weblate.
This enhances security by preventing loading assets from untrusted sources. Assets are downloaded once by the Weblate server and stored locally, rather than being served directly from external domains to users.
The allowlist is applied to the initial URL and to every HTTP redirect target before Weblate follows it. Redirects to hosts outside of this allowlist are rejected.
It expects a list of host/domain names. You can use fully qualified names
(e.g www.example.com) or prepend with a period as a wildcard to match
all subdomains (e.g .example.com will match cdn.example.com or static.example.com).
Defaults to ["*"], which allows all domains.
Example
ALLOWED_ASSET_DOMAINS = [
# Allows only cdn.anotherdomain.org
"cdn.anotherdomain.org",
# Allows example.com and all its subdomains
".example.com",
]
This is currently used in the following places:
Envios de capturas de tela, consulte Screenshots and visual context
Remote HTML downloads for the CDN de localização do JavaScript add-on
ALLOWED_MACHINERY_DOMAINS¶
Configures which custom translation service domains are explicitly allowed in project-level translation service configuration.
This setting applies only to translation services and does not affect
ALLOWED_ASSET_DOMAINS.
It expects a list of host/domain names. You can use fully qualified names or prepend with a period as a wildcard to match all subdomains.
Defaults to [].
The allowlist affects project-managed translation services in two ways: it permits the configured endpoint during outbound validation, and it marks matching hosts as trusted when deciding whether remote provider error details or response bodies can be shown to the user. Matching hosts are also exempt from private-target restrictions. For direct connections, Weblate does not resolve, pin, or verify the peer address of matching hosts. Only add hosts or domains whose network destinations are trusted. When a configured Proxy HTTP is used, the proxy is trusted to resolve the destination hostname.
ALLOWED_ASSET_SIZE¶
Adicionado na versão 5.14.
Configures size limit in bytes for fetching or uploading assets into Weblate. Defaults to 10 MB.
For screenshot URL uploads and remote CDN add-on HTML, the limit counts response bytes after decompression, before the complete body is buffered. See HTTP response limits for other HTTP response limits.
ASSET_PRIVATE_ALLOWLIST¶
Adicionado na versão 2025.5.
Defines hostnames or domains exempt from ASSET_RESTRICT_PRIVATE
for remote asset downloads that enforce private-target checks. Entries follow
Django host matching semantics, so values such as assets.internal.example
or .internal.example can be used.
This does not replace ALLOWED_ASSET_DOMAINS; remote assets must
still match the asset domain allowlist.
Configuração padrão:
ASSET_PRIVATE_ALLOWLIST = []
Ver também
ASSET_RESTRICT_PRIVATE¶
Adicionado na versão 2025.5.
Reject remote asset URLs pointing to internal or non-public addresses unless
the target host is included in ASSET_PRIVATE_ALLOWLIST. On by
default.
When enabled, hostnames that cannot be resolved during validation are rejected
unless they are explicitly included in ASSET_PRIVATE_ALLOWLIST.
This currently applies to screenshot URL uploads and remote HTML downloads for
the CDN de localização do JavaScript add-on.
ALTCHA_COST¶
Adicionado na versão 2025.5.
Argon2id time cost for the ALTCHA proof-of-work challenge. Defaults to 3.
Replaces ALTCHA_MAX_NUMBER, which applied to the removed ALTCHA widget v2.
ALTCHA_MEMORY_COST¶
Adicionado na versão 2025.5.
Argon2id memory cost in KiB. Defaults to 65536.
ALTCHA_PARALLELISM¶
Adicionado na versão 2025.5.
Argon2id parallelism factor. Defaults to 1.
Ver também
ANONYMOUS_USER_NAME¶
O nome de usuário dos usuários não autenticados.
Ver também
AUDITLOG_EXPIRY¶
O número máximo de dias que o Weblate manterá registros de auditoria contendo informações sobre a atividade da conta.
O padrão é 180 dias.
Ver também
AUTH_LOCK_ATTEMPTS¶
Número máximo de tentativas de autenticação com falha antes da aplicação da limitação de taxa.
Atualmente, isso é aplicado nos seguintes locais:
Login. Exclui a senha da conta, impedindo que o usuário entre sem solicitar uma nova senha.
Second-factor sign in. Deletes the account password after this many rejected second-factor submissions since the last successful second-factor sign in. This also invalidates pending password sign-ins. Other authentication methods and API tokens remain usable.
Redefinição de senha. Impede que novos e-mails sejam enviados, evitando o envio de spam aos usuários com muitas tentativas de redefinição de senha.
O padrão é 10.
Ver também
AUTO_UPDATE¶
Atualiza todos repositórios diariamente.
Every hour, Weblate queues updates for repositories whose component ID modulo 24
matches the current UTC hour. This distributes updates throughout the day. For
example, component ID 25 is selected during the hour from 01:00 to 01:59 UTC.
Linked components use the schedule of the component that owns their shared
repository.
The assigned hour determines when updates are queued, not when they finish. Execution can be delayed by queued tasks or repository operations. Restarting Celery does not change the assigned hour. This setting does not provide a configurable update time window.
Dica
Útil se você não estiver usando Ganchos de notificação para atualizar automaticamente os repositórios do Weblate.
Nota
Existem opções de ligar/desligar, além da seleção de textos para compatibilidade com versões anteriores.
As opções são:
"none"Sem atualizações diárias.
"remote"e tambémFalseFetch remote changes without merging them into the working copy. This is the default;
Falsedoes not disable daily updates."full"e tambémTrueFetch remote changes and merge them into the working copy.
Nota
Automatic updates require that Tarefas de fundo usando Celery is working. Restart Celery after changing this setting for the new value to take effect.
AVATAR_URL_PREFIX¶
Prefixo para construção de URLs de avatars: ${AVATAR_URL_PREFIX}/avatar/${MAIL_HASH}?${PARAMS}. Os seguintes serviços funcionam:
- Gravatar (padrão), conforme https://gravatar.com/
AVATAR_URL_PREFIX = 'https://www.gravatar.com/'- Libravatar, conforme https://www.libravatar.org/
AVATAR_URL_PREFIX = 'https://www.libravatar.org/'
AVATAR_URL_TEMPLATE¶
Adicionado na versão 2026.10.
Template to generate avatar URLs. Defaults to "{AVATAR_URL_PREFIX}avatar/{mail_hash}?{querystring}".
It can contain {AVATAR_URL_PREFIX}, {mail_hash}, {querystring}, {username}, and {size}.
For example, to fetch avatars by username instead of e-mail hash (as needed by Codeberg’s Forgejo-backed avatar service):
AVATAR_URL_TEMPLATE = "{AVATAR_URL_PREFIX}avatar/{username}/{size}"
AUTH_TOKEN_VALID¶
How long the authentication token and temporary password from password reset e-mails is valid for. Set in number of seconds, defaulting to 172800 (2 days). E-mail validation codes are checked against this lifetime when used, even if scheduled cleanup has not yet removed them. This does not set a deadline for other authentication pipeline steps.
AUTH_PASSWORD_DAYS¶
Quantos dias o Weblate rejeita a reutilização de uma senha usada anteriormente para um usuário.
A verificação é baseada no log de auditoria, AUDITLOG_EXPIRY precisa ser pelo menos igual a este.
Nota
Mudanças de senha feitas anteriormente ao Weblate 2.15 não serão consideradas para essa política.
O padrão é 180 dias.
AUTOFIX_LIST¶
Lista de correções automáticas para aplicar ao salvar um texto.
Nota
Forneça um caminho totalmente qualificado para a classe Python que implementa a interface de correção automática.
Correções disponíveis são descritas em Correções automáticas.
Você pode selecionar quais usar:
AUTOFIX_LIST = (
"weblate.trans.autofixes.whitespace.SameBookendingWhitespace",
"weblate.trans.autofixes.chars.ReplaceTrailingDotsWithEllipsis",
)
BACKGROUND_TASKS¶
Adicionado na versão 4.5.2.
Define com que frequência as tarefas de manutenção demoradas devem ser acionadas para um componente.
No momento, isso controla:
Extensão Tradução automática
Recálculo de Verificações e correções
Escolhas possíveis:
monthly(este é o padrão)weeklydailynever
Nota
O aumento da frequência não é recomendado quando o Weblate contém milhares de componentes.
BASIC_LANGUAGES¶
Adicionado na versão 4.4.
Lista de idiomas para oferecer aos usuários para iniciar uma nova tradução. Quando não especificado, a lista embutida é usada, o que inclui todos os idiomas comumente usados, mas sem variantes específicas de país.
Isso só limita usuários não privilegiados a adicionar idiomas indesejados. Os administradores do projeto ainda são apresentados com seleção completa de idiomas definidos no Weblate.
Nota
Isso não define novos idiomas para o Weblate — apenas filtra os existentes no banco de dados.
Exemplo:
BASIC_LANGUAGES = {"cs", "it", "ja", "en"}
Ver também
BORG_EXTRA_ARGS¶
Adicionado na versão 4.9.
Você pode passar argumentos adicionais para borg create quando backups embutidos forem acionados.
Exemplo:
BORG_EXTRA_ARGS = ["--exclude", "vcs/"]
Ver também
CACHE_DIR¶
Adicionado na versão 4.16.
Diretório onde o Weblate armazena arquivos de cache. O padrão é a subpasta cache em DATA_DIR.
Altere isso para o sistema de arquivos local ou temporário se DATA_DIR estiver em um sistema de arquivos de rede.
Weblate stores generated helper files here and executes some of them, so
CACHE_DIR has to be writable and mounted on a filesystem that allows
execution. Avoid using noexec mount options for this directory.
O contêiner do Docker usa um volume separado para isso, consulte Volumes de contêiner Docker.
Os seguintes subdiretórios geralmente existem:
sshGenerated helper files used for VCS access.
fontsfont-config cache para Gerenciando fontes.
avatarAvatares de usuário em cache, consulte Avatares.
staticLocal padrão para arquivos Django estáticos, especificados por
STATIC_ROOT. Consulte Servindo arquivos estáticos.tesseractDados treinados em OCR para Screenshots and visual context.
CSP_SCRIPT_SRC, CSP_IMG_SRC, CSP_CONNECT_SRC, CSP_STYLE_SRC, CSP_FONT_SRC, CSP_FORM_SRC¶
Customize the Content-Security-Policy header for Weblate. The header is automatically generated based on enabled integrations with third-party services (Matomo, Google Analytics, Sentry, …).
All these default to an empty list.
Exemplo:
# Enable Cloudflare Javascript optimizations
CSP_SCRIPT_SRC = ["ajax.cloudflare.com"]
CHECK_LIST¶
Lista de verificações de qualidade para realizar em uma tradução.
Nota
Forneça um caminho totalmente qualificado para a classe Python implementando a interface de verificação.
Ajuste a lista de verificações para incluir as relevantes para você.
Todas as Verificações de qualidade embutidas estão ativadas por padrão, de onde você pode alterar essas configurações. Por padrão, eles são comentados em Amostra de configuração para que os valores padrão sejam usados. Novas verificações são então realizadas para cada nova versão do Weblate.
Você pode desativar todas as verificações:
CHECK_LIST = ()
Você pode ativar apenas algumas:
CHECK_LIST = (
"weblate.checks.chars.BeginNewlineCheck",
"weblate.checks.chars.EndNewlineCheck",
"weblate.checks.chars.MaxLengthCheck",
)
Nota
Alterar essa configuração afeta apenas as traduções recém alteradas. As verificações existentes ainda serão armazenadas no banco de dados. Para aplicar as alterações também às traduções armazenadas, execute: updatechecks.
COMMIT_PENDING_HOURS¶
Quantidade total em horas entre fazer o commit de alterações pendentes por meio da tarefa em segundo plano.
COMPONENT_ZIP_UPLOAD_MAX_SIZE¶
Adicionado na versão 5.17.1.
Configures the maximum size, in bytes, for uploaded component ZIP files. Defaults to 50 MB.
In Docker, configure this using the WEBLATE_COMPONENT_ZIP_UPLOAD_MAX_SIZE
environment variable.
Ver também
CONTACT_FORM¶
Adicionado na versão 4.6.
Configura como o e-mail do formulário de contato está sendo enviado. Escolha uma configuração que corresponda à configuração do seu servidor de e-mail.
"reply-to"The sender is used as Reply-To, this is the default behaviour.
"from"The sender is used as From. Your mail server needs to allow sending such e-mails.
"disabled"Disables the contact form entirely.
Adicionado na versão 5.15.
Ver também
DATA_DIR¶
A pasta na qual Weblate armazena todos os dados. Ela contém links para repositórios VCS, um índice de texto completo e vários arquivos de configuração para ferramentas externas.
Os seguintes subdiretórios geralmente existem:
homeDiretório pessoal usado para invocar scripts.
sshChaves e configuração de SSH.
mediaLocal padrão para arquivos de mídia Django, especificado por
MEDIA_ROOT. Contém capturas de tela enviadas, consulte Screenshots and visual context.vcsRepositórios de controle de versão para traduções.
translation-uploadsPrivate temporary files for background translation uploads. Share this directory between web and Celery worker processes, with read/write access only for Weblate. Jobs expire after six hours; hourly cleanup removes abandoned files older than 24 hours while leaving active uploads intact.
backupsBackup diário de dados. Por favor, verifique Dados despejados para os backups para detalhes.
fonts:Fontes enviadas pelo usuário, consulte Gerenciando fontes.
cacheVários caches. Pode ser colocado em outro lugar usando
CACHE_DIR.O contêiner do Docker usa um volume separado para isso, consulte Volumes de contêiner Docker.
Nota
Este diretório tem que ser escrito pelo Weblate. Executá-lo como WSGI significa que o usuário www-data deve ter acesso de escrita.
A maneira mais fácil de conseguir isso é fazer do usuário o proprietário do diretório:
sudo chown www-data:www-data -R $DATA_DIR
O padrão é /home/weblate/data, mas espera-se que seja configurado.
DATABASE_BACKUP¶
Se os backups de banco de dados devem ser armazenados como texto simples, compactado ou ignorado. Os valores autorizados são:
"plain""compressed""none"
Ver também
DEFAULT_ACCESS_CONTROL¶
A configuração padrão de controle de acesso para novos projetos:
0Público
1Protegido
100Particular
200Personalizado
Use Personalizado se você está gerenciando a ACL manualmente, o que significa não confiar no gerenciamento interno do Weblate.
DEFAULT_AUTO_WATCH¶
Adicionado na versão 4.5.
Configura se Monitoramento automático de projetos por contribuição deve ser habilitada para novos usuários. O padrão é True.
Ver também
DEFAULT_RESTRICTED_COMPONENT¶
Adicionado na versão 4.1.
O valor padrão para restrição de componentes.
Ver também
DEFAULT_ADD_MESSAGE, DEFAULT_ADDON_MESSAGE, DEFAULT_COMMIT_MESSAGE, DEFAULT_DELETE_MESSAGE, DEFAULT_MERGE_MESSAGE¶
Enviar mensagens padrão para diferentes operações, consulte Configuração de componente para detalhes.
The built-in defaults follow Conventional Commits and include Weblate links where available. Changing these settings affects newly created defaults; existing message templates can be reset in the settings forms with Restore site default. For inherited values, restoring the site default also disables inheritance for that message.
DEFAULT_ADDONS¶
Complementos padrão para instalar em cada componente criado.
Nota
Essa configuração afeta apenas componentes recém-criados.
Exemplo:
DEFAULT_ADDONS = {
# Add-on with no parameters
"weblate.flags.target_edit": {},
# Add-on with parameters
"weblate.autotranslate.autotranslate": {
"mode": "suggest",
"filter_type": "todo",
"auto_source": "mt",
"component": "",
"engines": ["weblate-translation-memory"],
"threshold": "80",
},
}
Ver também
DEFAULT_COMMITER_EMAIL¶
Endereço de e-mail do committer, padrão para noreply@weblate.org.
This identifies Weblate as the committer, separately from the translator recorded
as the author. To make translators’ author e-mail addresses private by default,
set PRIVATE_COMMIT_EMAIL_OPT_IN to False.
Ver também
DEFAULT_COMMITER_NAME¶
Nome do committer, padrão para Weblate.
This identifies Weblate as the committer, separately from the translator recorded
as the author. To make translators’ author names private by default, set
PRIVATE_COMMIT_NAME_OPT_IN to False.
Ver também
DEFAULT_LANGUAGE¶
Adicionado na versão 4.3.2.
Idioma fonte para quaisquer novos componentes.
O padrão é en. O objeto de idioma correspondente precisa existir no banco de dados.
Ver também
DEFAULT_MERGE_STYLE¶
Estilo de mesclagem para quaisquer novos componentes.
rebase - padrão
merge
Ver também
DEFAULT_NOTIFICATIONS¶
Adicionado na versão 2026.10.1.
Default notification settings for every newly created user.
A list of 3-tuples consisting of notification scope, notification frequency and notification handler.
Scopes:
0All
10Watched
20Administered
Frequencies:
0No notification
1Instant notification
2Daily digest
3Weekly digest
4Monthly digest
Handlers:
ApprovedStringNotificatonString was approved
ChangedStringNotificatonString was changed
ComponentTranslatedNotificatonComponent was translated
LanguageTranslatedNotificatonLanguage was translated
LastAuthorCommentNotificatonString you contributed to received a comment
LicenseNotificationLicense was changed
LockNotificationComponent was locked or unlocked
MentionCommentNotificatonYou were mentioned in a comment
MergeFailureNotificationRepository operation failed
NewAlertNotificatonNew alert emerged in a component
NewAnnouncementNotificatonAnnouncement was published
NewCommentNotificatonComment was added
NewComponentNotificatonNew translation component was created
NewContributorNotificatonContributor made their first translation
NewStringNotificatonString is available for translation
NewSuggestionNotificatonSuggestion was added
NewTranslationNotificatonNew language was added or requested
ParseErrorNotificationParse error occurred
PendingSuggestionsNotificationPending suggestions exist
RepositoryNotificationOperation was performed in the repository
ToDoStringsNotificationUnfinished strings exist
TranslatedStringNotificatonString was edited by user
TranslationActivitySummaryNotificationTranslation activity summary
Nota
This setting affects only newly created users.
Exemplo:
DEFAULT_NOTIFICATIONS = [
(0, 1, "MentionCommentNotificaton"),
(10, 1, "LastAuthorCommentNotificaton"),
]
Ver também
DEFAULT_WORKSPACE_TM¶
Adicionado na versão 2026.11.2.
Configures the default value of Use workspace translation memory and Contribute to workspace translation memory.
DEFAULT_TRANSLATION_REVIEW¶
Adicionado na versão 5.16.
Configures the default value for Habilitar revisões, turned off by default.
DEFAULT_SOURCE_REVIEW¶
Adicionado na versão 5.16.
Configures the default value for Habilitar revisões de fontes, turned off by default.
DEFAULT_AUTOCLEAN_TM¶
Adicionado na versão 5.13.
Configures the default value of Limpar memória de tradução automaticamente.
DEFAULT_TRANSLATION_PROPAGATION¶
Configuração padrão para propagação de tradução, sendo o padrão True.
DEFAULT_PULL_MESSAGE¶
Configura o título e a mensagem padrão para pull requests.
The built-in default follows Conventional Commits and includes Weblate links and translation status.
ENABLE_AVATARS¶
Se deve ativar os avatares baseados em Gravatar para os usuários. Ativado por padrão.
Avatares são buscados e armazenados em cache no servidor, diminuindo o risco de vazamento de informações privadas, acelerando a experiência do usuário.
ENABLE_HOOKS¶
Se deve ativar os ganchos remotos anônimos.
Ver também
ENABLE_HTTPS¶
Alterado na versão 5.7: Weblate agora requer https para suporte ao WebAuthn.
Se deve-se enviar links para Weblate como HTTPS ou HTTP. Esta configuração afeta os e-mails enviados e as URLs absolutas geradas.
Na configuração padrão, este também é usado para várias configurações de Django relacionadas ao HTTPS — ele habilita cookies seguros, ativa/desativa HSTS ou habilita redirecionamento para um URL HTTPS .
O redirecionamento HTTPS pode ser problemático em alguns casos e você pode encontrar um problema com o redirecionamento infinito caso esteja usando um proxy reverso fazendo uma terminação SSL que não passa corretamente os cabeçalhos de protocolo para o Django. Por favor ajuste sua configuração de proxy reverso para emitir X-Forwarded-Proto ou Forwarded cabeçalhos ou configure SECURE_PROXY_SSL_HEADER para permitir que o Django detecte corretamente o status SSL.
Caso isso esteja desativado, o Weblate falhará ao iniciar com um erro otp_webauthn.E031. Você pode silenciar esse erro adicionando-o a SILENCED_SYSTEM_CHECKS, mas mesmo assim o WebAuthn não funcionará para sites sem HTTPS.
ENABLE_SHARING¶
Turn on/off the Community menu so users can share translation progress on social networks.
Ver também
EXTRA_HTML_HEAD¶
Adicionado na versão 4.15.
Insira marcação adicional no cabeçalho HTML. Pode ser usado para verificação da propriedade do site, por exemplo:
EXTRA_HTML_HEAD = '<link href="https://fosstodon.org/@weblate" rel="me">'
Aviso
Nenhuma sanitização é executada no texto, ele é inserido como está no cabeçalho HTML.
GET_HELP_URL¶
Adicionado na versão 4.5.2.
URL onde o suporte para sua instância do Weblate pode ser encontrado.
GITEA_CREDENTIALS¶
Adicionado na versão 4.12.
Lista para credenciais para servidores Gitea.
GITEA_CREDENTIALS = {
"try.gitea.io": {
"username": "weblate",
"token": "your-api-token",
},
}
O dicionário de configuração consiste em credenciais definidas para cada host de API. O layout é o mesmo para quase todas as integrações de controle de versão e é descrito em Configurando credenciais para controle de versão.
GITLAB_CREDENTIALS¶
Adicionado na versão 4.3.
Lista para credenciais para servidores GitLab.
GITLAB_CREDENTIALS = {
"gitlab.com": {
"username": "weblate",
"token": "your-api-token",
},
}
Nota
The personal access token needs the api scope to be able to use the API.
O dicionário de configuração consiste em credenciais definidas para cada host de API. O layout é o mesmo para quase todas as integrações de controle de versão e é descrito em Configurando credenciais para controle de versão.
GITHUB_CREDENTIALS¶
Adicionado na versão 4.3.
Lista para credenciais para servidores GitHub.
GITHUB_CREDENTIALS = {
"api.github.com": {
"username": "weblate",
"token": "your-api-token",
},
}
Nota
É possível usar tanto os tokens de acesso pessoal refinado quanto os tokens de acesso pessoal clássico. Os tokens refinados são limitados a uma única organização, portanto, não funcionarão se você quiser que o Weblate faça o fork de um repositório fora da organização (normalmente para o espaço de nomes do usuário).
Para clonar, fazer push ou criar pull requests, é necessário ter o acesso de leitura e escrita para Contents e Pull requests.
Administração também pode ser necessário para fazer fork de um repositório se você pretende usar fork e o repositório original não for público.
Dica
Use api.github.com as an API host for https://github.com/.
O dicionário de configuração consiste em credenciais definidas para cada host de API. O layout é o mesmo para quase todas as integrações de controle de versão e é descrito em Configurando credenciais para controle de versão.
GITHUB_LEGACY_APP_WEBHOOK_SECRET¶
Adicionado na versão 2026.8.
Webhook secret for a legacy GitHub App which delivers events to the generic
GitHub webhook URL, /hooks/github/.
App webhook deliveries to the generic URL are rejected when this setting is
empty or their X-Hub-Signature-256 does not match. Ordinary repository
webhooks are unaffected. GitHub Apps registered through Weblate use their
per-App webhook URLs and do not use this setting.
GITHUB_LEGACY_APP_WEBHOOK_SECRET = "your-webhook-secret"
Ver também
BITBUCKETSERVER_CREDENTIALS¶
Adicionado na versão 4.16.
Lista de credenciais para Bitbucket Data Center.
BITBUCKETSERVER_CREDENTIALS = {
"git.self-hosted.com": {
"username": "weblate",
"token": "http-access-token",
},
}
O dicionário de configuração consiste em credenciais definidas para cada host de API. O layout é o mesmo para quase todas as integrações de controle de versão e é descrito em Configurando credenciais para controle de versão.
BITBUCKETCLOUD_CREDENTIALS¶
Adicionado na versão 5.8.
Lista de credenciais para servidores do Bitbucket Cloud.
BITBUCKETCLOUD_CREDENTIALS = {
"bitbucket.org": {
"username": "your-email",
"workspace": "your-workspace-slug",
"token": "your-api-token",
},
}
O dicionário de configuração consiste em credenciais definidas para cada host de API. O host da API pode ser diferente do que você usa no navegador web, por exemplo, a API do GitHub é acessada como api.github.com.
A seguinte configuração está disponível para cada host:
usernameAPI do usuário.
workspaceO slug do espaço de trabalho do usuário.
tokenThe API token with pullrequest:write permission.
Configurações adicionais não descritas aqui podem ser encontradas em Configurando credenciais para controle de versão.
AZURE_DEVOPS_CREDENTIALS¶
Adicionado na versão 5.2.
Lista de credenciais para servidores do Azure DevOps.
AZURE_DEVOPS_CREDENTIALS = {
"dev.azure.com": {
"username": "project-name",
"token": "your-api-token",
"organization": "organization-name",
},
}
O dicionário de configuração consiste em credenciais definidas para cada host de API. O host da API pode ser diferente do que você usa no navegador web, por exemplo, a API do GitHub é acessada como api.github.com.
A seguinte configuração está disponível para cada host:
usernameO nome do projeto Azure DevOps. Este não é o nome do repositório.
organizationO nome da organização do projeto.
workItemIdsUma lista opcional de IDs de itens de trabalho da sua organização. Quando fornecida, novos pull requests terão esses itens anexados.
tokenToken de API para o usuário da API, obrigatório.
Configurações adicionais não descritas aqui podem ser encontradas em Configurando credenciais para controle de versão.
GOOGLE_ANALYTICS_ID¶
ID do Google Analytics para ativar o monitoramento do Weblate usando o Google Universal Analytics.
Nota
No momento, a integração com o Google Analytics 4 não está disponível para o Weblate; consulte https://github.com/WeblateOrg/weblate/issues/14015.
HIDE_REPO_CREDENTIALS¶
Oculta credenciais de repositório da interface web. No caso de você ter URL do repositório com usuário e senha, o Weblate irá ocultá-la quando as informações relacionadas são mostradas aos usuários.
For example instead of https://user:password@git.example.com/repo.git it
will show just https://git.example.com/repo.git. It tries to clean up VCS
error messages too in a similar manner.
Nota
Ativado por padrão.
VERSION_DISPLAY¶
Adicionado na versão 5.17.
Controls how prominently Weblate exposes its own version.
Supported values are:
showShow the version in shared UI such as the footer and expose it in
GET /api/metrics/.softHide the version from prominent shared UI, while keeping it discoverable on the About page and in
GET /api/metrics/.hideHide the version from shared UI and
GET /api/metrics/. This also makes anonymous documentation links point to the latest documentation instead of the version matching the installed release.
Hiding the version is a recommended security practice in some corporations, but it does not prevent an attacker from inferring the version by probing behavior.
Nota
The default is show.
HIDE_VERSION¶
Adicionado na versão 4.3.1.
Descontinuado desde a versão 5.17.
Compatibility alias for VERSION_DISPLAY. Set this to True to
get the same behavior as VERSION_DISPLAY = "hide".
INTERNAL_BOT_EMAIL_TEMPLATE¶
Adicionado na versão 2026.7.1.
Template used to generate e-mail addresses for internal Weblate bot accounts.
Defaults to "noreply-{scope}-{name}@weblate.org".
It can contain {scope}, {name}, {username}, {site_title}, and
{site_domain}.
Use {scope} and {name} when generating the e-mail local part. The
{username} value contains the internal scope:name username.
Existing internal bot accounts are updated when migrate is run.
Project API token accounts are not affected.
IP_BEHIND_REVERSE_PROXY¶
Indica se o Weblate está sendo usado atrás de um proxy reverso.
Se definido como True, o Weblate obtém endereço IP de um cabeçalho definido por IP_PROXY_HEADER.
Aviso
The reverse proxy which connects to Weblate must overwrite the configured
header or append a verified peer address at the position selected by
IP_PROXY_OFFSET. Weblate does not verify which peer supplied the
header, so trusting a client-controlled value allows IP address spoofing.
Ensure that untrusted clients cannot reach Weblate without passing through the trusted proxy.
Nota
Isso não está ativado por padrão.
IP_PROXY_HEADER¶
Indica de qual cabeçalho o Weblate deve obter o endereço IP quando IP_BEHIND_REVERSE_PROXY está ativado.
Padrão é HTTP_X_FORWARDED_FOR.
IP_PROXY_OFFSET¶
Alterado na versão 5.0.1: O padrão mudou de 1 para -1.
Indica qual parte de IP_PROXY_HEADER é usada como endereço IP do cliente.
Dependendo de sua configuração, esse cabeçalho pode consistir em vários endereços IP (por exemplo, X-Forwarded-For: client-ip, proxy-a, proxy-b) e você pode configurar qual endereço do cabeçalho é usado como endereço IP do cliente aqui.
Aviso
Setting this affects the security of your installation. Select only an address added or verified by a proxy under your control. Addresses supplied by the client are untrusted. Ensure that the selected offset matches how your proxies construct the header.
See <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Forwarded-For#security_and_privacy_concerns> for more details.
O padrão é -1.
LEGAL_DOCUMENT_CSS_CLASS¶
Adicionado na versão 2026.7.
CSS class added to the wrappers around legal document templates.
Defaults to "tos". Weblate does not attach styling to this class; custom
legal styles can use it to target document wrappers. Set this to an empty
string to render legal documents without a wrapper class.
LEGAL_DOCUMENT_CSS_CLASS = ""
LEGAL_TOS_DATE¶
Adicionado na versão 4.15.
Nota
Você precisa de Legal module instalado para fazer isso funcionar.
Date of the legal documents users last agreed to. Whenever the date changes, users are required to agree with the current terms of service and, when a privacy policy link is available, the privacy policy.
from datetime import date
LEGAL_TOS_DATE = date(2022, 2, 2)
LEGAL_URL¶
URL onde sua instância de Weblate mostra seus documentos legais.
Dica
When the Legal module module is enabled, this URL takes priority over its internal terms page in document links. The default terms template links to this URL when visited directly.
Exemplo:
LEGAL_URL = "https://weblate.org/terms/"
Ver também
LICENSE_EXTRA¶
Licenças adicionais para incluir nas opções de licença.
Nota
Each license definition should be a tuple of its short name, a long name, a URL and a boolean, indicating whether it is a libre license.
Por exemplo:
LICENSE_EXTRA = [
(
"AGPL-3.0",
"GNU Affero General Public License v3.0",
"https://www.gnu.org/licenses/agpl-3.0-standalone.html",
True,
),
]
LICENSE_FILTER¶
Alterado na versão 4.3: Configurando este para valor em branco agora desabilita o alerta de licença.
Filtrar licenças da lista para mostrar. Isto também desabilita o alerta de licença quando configurado para vazio.
Nota
Este filtro usa os nomes de licença curtos.
Por exemplo:
LICENSE_FILTER = {"AGPL-3.0", "GPL-3.0-or-later"}
A seguir, desativa o alerta de licença:
LICENSE_FILTER = set()
Ver também
LICENSE_REQUIRED¶
Define se o atributo de licença em Configuração de componente é necessário.
Nota
Isso está desativado por padrão.
LIMIT_TRANSLATION_LENGTH_BY_SOURCE_LENGTH¶
Se o comprimento de uma determinada tradução deve ser limitado. A restrição é o comprimento do texto fonte × 10 caracteres.
Dica
Defina isso como False para permitir traduções mais longas (até 10.000 caracteres) independentemente do comprimento do texto fonte.
Nota
O padrão é True.
LOCALIZE_CDN_URL e LOCALIZE_CDN_PATH¶
These settings configure the CDN add-ons, including
CDN de localização do JavaScript, CDN de arquivos de tradução, and
CDN do SDK Kotlin.
LOCALIZE_CDN_URL defines root URL where the localization CDN is
available and LOCALIZE_CDN_PATH defines path where Weblate should
store generated files which will be served at the LOCALIZE_CDN_URL.
The files are served by your web server or CDN, not by Weblate; see
CDN de localização for secure serving guidance.
Dica
No Hosted Weblate, é usada com https://weblate-cdn.com/.
MATOMO_SITE_ID¶
ID do site no Matomo (antigo Piwik) que você deseja usar para rastrear o Weblate.
Nota
Essa integração não tem suporte ao Matomo Tag Manager.
Ver também
MATOMO_URL¶
URL completa (incluindo barra ao final) de uma instalação Matomo (anteriormente Piwik) que você deseja usar para rastrear o uso do Weblate. Por favor, consulte <https://matomo.org/> para mais detalhes.
Dica
Essa integração não tem suporte ao Matomo Tag Manager.
Por exemplo:
MATOMO_SITE_ID = 1
MATOMO_URL = "https://example.matomo.cloud/"
Ver também
NEARBY_MESSAGES¶
Quantidade total de textos próximos para mostrar em cada direção no editor completo.
Este é apenas um valor padrão, os usuários podem ajustar isso em Perfil do usuário.
DEFAULT_PAGE_LIMIT¶
Adicionado na versão 4.7.
Número padrão de elementos a serem exibidos quando a paginação está ativa.
PAGURE_CREDENTIALS¶
Adicionado na versão 4.3.2.
Lista para credenciais para servidores Pagure.
PAGURE_CREDENTIALS = {
"pagure.io": {
"username": "weblate",
"token": "your-api-token",
},
}
O dicionário de configuração consiste em credenciais definidas para cada host de API. O layout é o mesmo para quase todas as integrações de controle de versão e é descrito em Configurando credenciais para controle de versão.
Ver também
PASSWORD_MINIMAL_STRENGTH¶
Adicionado na versão 5.10.2.
Pontuação mínima da senha conforme avaliada pelo estimador que verifica a força da senha zxcvbn.
O padrão é 0, o que significa que a verificação para força de senha está desabilitada.
Ver também
PASSWORD_RESET_URL¶
Adicionado na versão 5.17.
URL for password reset when authentication is handled by an external identity provider, such as LDAP, SAML, or OAuth.
When set, Forgot your password? on the sign-in page links to this URL instead of Weblate’s built-in password reset page.
PRIVACY_URL¶
Adicionado na versão 4.8.1.
URL onde sua instância de Weblate mostra sua política de privacidade.
Dica
When the Legal module module is enabled, this URL takes priority over its internal privacy page in document links. The default privacy template links to this URL when visited directly.
Exemplo:
PRIVACY_URL = "https://weblate.org/terms/"
Ver também
PRIVATE_COMMIT_EMAIL_OPT_IN¶
Adicionado na versão 4.15.
Configures whether the private commit e-mail is opt-in or opt-out.
With True (the default), users use their account e-mail unless they choose a
private commit e-mail. Set to False to use
PRIVATE_COMMIT_EMAIL_TEMPLATE by default.
Dica
This setting applies to new and existing users who have not explicitly chosen a commit e-mail. Users can still choose their account e-mail in the Conta settings. Bot accounts do not use the private default.
PRIVATE_COMMIT_EMAIL_TEMPLATE¶
Adicionado na versão 4.15.
Template to generate a private commit e-mail for a user. Defaults to "user-{user_id}@users.noreply.{site_domain}".
It can contain {user_id}, {username}, {site_title}, and {site_domain}.
Set to a blank string to disable private commit e-mails and use the account e-mail when no commit e-mail has been explicitly chosen.
The default template uses the user ID rather than the username. Changing the template alone does not make private commit e-mails the default.
Alterado na versão 2026.11: The default previously used "{username}@users.noreply.{site_domain}".
Configure that template explicitly to retain the previous generated addresses.
Explicitly selected commit e-mail addresses are not changed.
Nota
Using a different commit e-mail is opt-in for users unless configured by
PRIVATE_COMMIT_EMAIL_OPT_IN. Users can configure their commit e-mail in
the Perfil público.
Ver também
PRIVATE_COMMIT_NAME_OPT_IN¶
Adicionado na versão 5.16.
Configures whether the private commit name is opt-in or opt-out.
With True (the default), users use their account name unless they choose a
private commit name. Set to False to use
PRIVATE_COMMIT_NAME_TEMPLATE by default.
Dica
This setting applies to new and existing users who have not explicitly chosen a commit name. Users can still choose their account name in the Conta settings. Bot accounts use their account name.
PRIVATE_COMMIT_NAME_TEMPLATE¶
Adicionado na versão 5.16.
Template to generate a private commit name for a user. Defaults to "{site_title} user {user_id}".
It can contain {user_id}, {username}, {site_title}, and {site_domain}.
Set to a blank string to disable private commit names and use the account name. Changing the template alone does not make private commit names the default.
Nota
Using a different commit name is opt-in for users unless configured by
PRIVATE_COMMIT_NAME_OPT_IN. Users can configure their commit name in
the Perfil público.
Ver também
PROJECT_BACKUP_KEEP_COUNT¶
Adicionado na versão 4.14.
Define quantos backups por projeto são mantidos no servidor. O padrão é 3.
Ver também
PROJECT_BACKUP_KEEP_DAYS¶
Adicionado na versão 4.14.
Define por quanto tempo os backups do projeto serão mantidos no servidor. O tempo padrão é de 30 dias.
Ver também
PROJECT_BACKUP_UPLOAD_MAX_SIZE¶
Adicionado na versão 5.17.1.
Configures the maximum size, in bytes, for uploaded project backup ZIP files. Defaults to 536870912 bytes (512 MiB).
In Docker, configure this using the WEBLATE_PROJECT_BACKUP_UPLOAD_MAX_SIZE
environment variable. Docker setups can also be constrained by
CLIENT_MAX_BODY_SIZE; other deployments can be constrained by their
reverse proxy request body-size limit.
Ver também
PROJECT_BACKUP_IMPORT_MAX_MEMBERS¶
Adicionado na versão 5.17.
Defines the maximum number of ZIP entries allowed when importing a project backup.
This is a safeguard against malformed or intentionally fragmented archives. Defaults to 100000 entries.
In Docker, configure this using the
WEBLATE_PROJECT_BACKUP_IMPORT_MAX_MEMBERS environment variable.
Ver também
PROJECT_BACKUP_IMPORT_MAX_TOTAL_UNCOMPRESSED_SIZE¶
Adicionado na versão 5.17.1.
Defines the maximum total uncompressed size, in bytes, for ZIP entries in an imported project backup. Defaults to 536870912 bytes (512 MiB).
This limits archives that are small when uploaded but expand to much more data during validation or restore.
In Docker, configure this using the
WEBLATE_PROJECT_BACKUP_IMPORT_MAX_TOTAL_UNCOMPRESSED_SIZE environment
variable.
Ver também
PROJECT_BACKUP_IMPORT_MAX_COMPRESSED_ENTRY_SIZE¶
Adicionado na versão 5.17.
Defines the maximum uncompressed size, in bytes, for a single highly compressed ZIP entry in an imported project backup.
This limit is only applied to entries that are large enough and compress enough to look suspicious. Large low-compression files are intentionally allowed here and are expected to be constrained by the HTTP upload limit. Defaults to 262144000 bytes (250 MiB).
In Docker, configure this using the
WEBLATE_PROJECT_BACKUP_IMPORT_MAX_COMPRESSED_ENTRY_SIZE environment
variable.
Ver também
PROJECT_BACKUP_IMPORT_MIN_RATIO_SIZE¶
Adicionado na versão 5.17.
Defines the minimum uncompressed size, in bytes, at which Weblate starts considering the ZIP compression ratio during project backup import.
Smaller files are ignored for the compression-ratio-based validation to avoid rejecting reasonably sized files that compress well. Defaults to 1048576 bytes (1 MiB).
In Docker, configure this using the
WEBLATE_PROJECT_BACKUP_IMPORT_MIN_RATIO_SIZE environment variable.
Ver também
PROJECT_BACKUP_IMPORT_MAX_COMPRESSED_ENTRY_RATIO¶
Adicionado na versão 5.17.
Defines the maximum allowed ratio between the uncompressed and compressed size for a large ZIP entry during project backup import.
This is used together with
PROJECT_BACKUP_IMPORT_MAX_COMPRESSED_ENTRY_SIZE and
PROJECT_BACKUP_IMPORT_MIN_RATIO_SIZE to detect suspiciously
compressed entries while still allowing large repository pack files and other
low-compression content. Defaults to 250.
In Docker, configure this using the
WEBLATE_PROJECT_BACKUP_IMPORT_MAX_COMPRESSED_ENTRY_RATIO environment
variable.
Ver também
PROJECT_NAME_RESTRICT_RE¶
Adicionado na versão 4.15.
Define uma expressão regular para restringir a nomenclatura do projeto. Quaisquer nomes correspondentes serão rejeitados.
Ver também
PROJECT_WEB_RESTRICT_HOST¶
Adicionado na versão 4.16.2.
Rejeitar o uso de determinados hosts no site do projeto. Qualquer subdomínio é correspondido, então incluir example.com bloqueará também test.example.com. A lista deve conter apenas textos em minúsculas, o domínio analisado é convertido para minúsculas antes da correspondência.
Configuração padrão:
PROJECT_WEB_RESTRICT_HOST = {"localhost"}
PROJECT_WEB_RESTRICT_ALLOWLIST¶
Adicionado na versão 5.17.
Defines a set of project slugs exempt from
PROJECT_WEB_RESTRICT_HOST, PROJECT_WEB_RESTRICT_NUMERIC,
PROJECT_WEB_RESTRICT_PRIVATE, and
PROJECT_WEB_RESTRICT_RE when validating the project website.
Project slugs are matched case-insensitively.
Cuidado
This exemption weakens outbound URL protections for matching projects,
including the private-target restriction enforced by
PROJECT_WEB_RESTRICT_PRIVATE. Use it only for trusted,
administrator-managed projects where bypassing these checks is intentional.
Configuração padrão:
PROJECT_WEB_RESTRICT_ALLOWLIST = set()
PROJECT_WEB_RESTRICT_NUMERIC¶
Adicionado na versão 4.16.2.
Rejeite o uso de endereço IP numérico no site do projeto. Ativado por padrão.
PROJECT_WEB_RESTRICT_PRIVATE¶
Adicionado na versão 5.17.
Reject using project website and repository browser URLs pointing to internal or non-public addresses. On by default.
PROJECT_WEB_RESTRICT_RE¶
Adicionado na versão 4.15.
Define uma expressão regular para limitar o qua pode ser inserido como Site do projeto. Quaisquer URLs correspondentes serão rejeitadas.
WEBHOOK_PRIVATE_ALLOWLIST¶
Adicionado na versão 5.17.
Defines hostnames or domains exempt from WEBHOOK_RESTRICT_PRIVATE
for outbound webhook delivery. Entries follow Django host matching semantics,
so values such as hooks.internal.example or .internal.example can be
used.
Configuração padrão:
WEBHOOK_PRIVATE_ALLOWLIST = []
Ver também
WEBHOOK_RESTRICT_PRIVATE¶
Adicionado na versão 5.17.
Reject webhook URLs pointing to internal or non-public addresses unless the
target host is included in WEBHOOK_PRIVATE_ALLOWLIST. On by default.
When enabled, hostnames that cannot be resolved during validation are rejected
unless they are explicitly included in WEBHOOK_PRIVATE_ALLOWLIST.
Ver também
PUBLIC_ENGAGE¶
Adicionado na versão 5.16.2.
Allows public engage page even with REQUIRE_LOGIN.
Ver também
REPORT_EXPIRY¶
Defines how many days generated translation reports are retained. Defaults to 90 days. Changing the value also changes when existing reports become eligible for removal by the daily cleanup task.
RATELIMIT_NOTIFICATION_LIMITS¶
Adicionado na versão 5.14.
Limits how many notifications for a single user will be sent out.
A configuração padrão é:
# Multi-level rate limiting for email notifications
# Each tuple contains (max_emails, time_window_seconds)
RATELIMIT_NOTIFICATION_LIMITS = [
# Prevent burst sends - 3 emails per 2 minutes
(3, 120),
# Equalize to avoid getting blocked for too long - 10 emails per hour
(10, 3600),
# Daily limit: 50 emails per day
(50, 86400),
]
API_RATELIMIT_ANON¶
Adicionado na versão 2026.10.
Default anonymous API rate limit. Defaults to "100/day".
Rates use a request count and a period of seconds, minutes, hours, or days, for
example "100/hour". A zero count rejects every request covered by this
throttle; None disables this throttle. Anonymous requests without an IP
override are also subject to API_RATELIMIT_USER.
API_RATELIMIT_USER¶
Adicionado na versão 2026.10.
Default authenticated API rate limit. Defaults to
"5000/hour". Uses the same rate syntax as API_RATELIMIT_ANON.
Authenticated requests are counted per user; anonymous requests are counted
per client IP. Set None to disable this throttle.
API_RATELIMIT_USER_OVERRIDES¶
Adicionado na versão 2026.10.
Mapping of exact usernames to API rate limits. Defaults to an empty dictionary.
Override rates require a positive request count, or None for an exemption.
These rules take precedence over API_RATELIMIT_IP_OVERRIDES.
API_RATELIMIT_USER_OVERRIDES = {"automation": "20000/hour"}
API_RATELIMIT_IP_OVERRIDES¶
Adicionado na versão 2026.10.
Mapping of IPv4 or IPv6 addresses and CIDR networks to API rate limits. Defaults
to an empty dictionary. The most specific matching network applies to both
anonymous and authenticated requests, unless a username override matches.
CIDRs must specify network addresses; duplicate normalized networks are rejected.
Override rates require a positive request count, or None for an exemption.
API_RATELIMIT_IP_OVERRIDES = {
"192.0.2.42": None,
"198.51.100.0/24": "10000/hour",
"2001:db8::/48": "10000/hour",
}
See Limitação de taxa da API for counting behavior and trusted proxy requirements.
RATELIMIT_ATTEMPTS¶
O número máximo de tentativas de autenticação antes da limitação da taxa ser aplicada.
O padrão é 5.
Ver também
RATELIMIT_WINDOW¶
Por quanto tempo a autenticação é aceita após a limitação da taxa ser aplicada.
Uma quantidade de segundos, padrão para 300 (5 minutos).
Ver também
RATELIMIT_LOCKOUT¶
Por quanto tempo a autenticação é bloqueada após a limitação da taxa ser aplicada.
Uma quantidade de segundos tendo como padrão 600 (10 minutos).
Ver também
RATELIMIT_BULK_EDIT_ATTEMPTS¶
Maximum browser bulk-edit submissions per user during
RATELIMIT_BULK_EDIT_WINDOW. Defaults to 10. Preview requests count
toward this limit.
RATELIMIT_BULK_EDIT_WINDOW¶
Window for browser bulk-edit rate limiting, in seconds. Defaults to 60.
RATELIMIT_BULK_EDIT_LOCKOUT¶
Lockout after exceeding the browser bulk-edit rate limit, in seconds. Defaults to 60.
RATELIMIT_UPLOAD_ATTEMPTS¶
Maximum translation and translation-memory upload attempts per user during
RATELIMIT_UPLOAD_WINDOW. Defaults to 10. Browser and API uploads share
this budget with browser translation-memory uploads, including synchronous and
background API translation uploads. Superusers are exempt. Uploads rejected
before the upload permission check do not count.
RATELIMIT_UPLOAD_WINDOW¶
Window for translation upload rate limiting, in seconds. Defaults to 60.
RATELIMIT_UPLOAD_LOCKOUT¶
Lockout after exceeding the translation upload rate limit, in seconds. Defaults to 60.
RATELIMIT_MACHINERY_ATTEMPTS¶
Maximum interactive machine-translation requests per user during
RATELIMIT_MACHINERY_WINDOW. Defaults to 30. The usual superuser
rate-limit exemption applies.
Interactive requests also allow at most two concurrent calls per user per configured service installation. Other installations remain available. Excess requests return HTTP 429. Slots are released on completion or failure. Disconnected requests retain their slots until the provider work finishes, including synchronous calls already running in executor threads. Abandoned distributed locks expire after one hour.
RATELIMIT_MACHINERY_WINDOW¶
Window for interactive machine-translation rate limiting, in seconds. Defaults to 60.
RATELIMIT_MACHINERY_LOCKOUT¶
Lockout after exceeding the interactive machine-translation rate limit, in seconds. Defaults to 60.
RATELIMIT_OCR_ATTEMPTS¶
Maximum screenshot image text searches per signed-in session during
RATELIMIT_OCR_WINDOW. Defaults to 6.
RATELIMIT_OCR_WINDOW¶
Window for screenshot image text search rate limiting, in seconds. Defaults to 60.
RATELIMIT_OCR_LOCKOUT¶
Lockout after exceeding the screenshot image text search rate limit, in seconds. Defaults to 60.
REGISTRATION_ALLOW_BACKENDS¶
Adicionado na versão 4.1.
A lista de backends de autenticação de onde permite o registro. Isso só limita novos registros, os usuários ainda podem autenticar e adicionar autenticação usando todos os backends de autenticação configurados.
É recomendado para manter REGISTRATION_OPEN habilitado enquanto limita os backends de registro, caso contrário, os usuários poderão se registrar, mas o Weblate não mostrará links para se registrar na interface do usuário.
Exemplo:
REGISTRATION_ALLOW_BACKENDS = ["azuread-oauth2", "azuread-tenant-oauth2"]
Dica
Os nomes de backend correspondem aos nomes usados na URL para autenticação.
Ver também
REGISTRATION_CAPTCHA¶
Se o registo de novas contas está protegido por CAPTCHA. O padrão é habilitado.
If turned on, a CAPTCHA is added to all pages where a user enters their e-mail address:
Cadastro de nova conta.
Recuperação de senha.
Adição de e-mail a uma conta.
Formulário de contato para usuários que não estão autenticados.
A proteção atualmente consiste nas seguintes etapas:
Captcha matemático a ser resolvido pelo usuário.
Proof of work challenge calculated by the browser. The difficulty can be adjusted using
ALTCHA_COST,ALTCHA_MEMORY_COST, andALTCHA_PARALLELISM.
REGISTRATION_EMAIL_MATCH¶
Permite filtrar quais endereços de e-mail podem ser registrados.
The restriction also applies to addresses imported from authentication
providers and addresses selected as public or commit e-mail addresses.
Provider addresses that do not match are skipped. This includes GitHub
noreply addresses: to use them for commits, explicitly allow
users.noreply.github.com in the expression.
O padrão e .*, que permite que qualquer endereço de e-mail seja registrado.
Você pode usá-lo para restringir o registro a um único domínio de e-mail:
REGISTRATION_EMAIL_MATCH = r"^.*@weblate\.org$"
REGISTRATION_ALLOW_DISPOSABLE_EMAILS¶
Adicionado na versão 5.16.1.
Allow registration with disposable e-mail domains. When enabled, the
disposable domain blocklist is bypassed. Default is False.
This also applies to addresses imported from authentication providers and addresses selected as public or commit e-mail addresses.
REGISTRATION_OPEN¶
Se o registro de novas contas é permitido atualmente. O padrão é habilitado.
Essa configuração afeta a autenticação embutida por endereço de e-mail ou através do Python Social Auth (você pode permitir certos back-ends usando REGISTRATION_ALLOW_BACKENDS).
Nota
Se estiver usando métodos de autenticação de terceiros, como Autenticação por LDAP, ele apenas oculta o formulário de registro, mas novos usuários ainda conseguem se autenticar e criar contas.
REGISTRATION_REBIND¶
Adicionado na versão 4.16.
Allow signed-out users to link a new third-party authentication provider to an existing account when its e-mail address matches. Turn this on when migrating between trusted authentication providers. Existing users can add a provider while signed in regardless of this setting. E-mail registration and password reset use their own confirmation flow and are not affected.
Nota
Off by default. When enabled, Weblate trusts configured providers’ e-mail claims for account matching. Use only providers that verify these addresses; otherwise another person could link an identity to an existing account.
REPOSITORY_ALERT_THRESHOLD¶
Adicionado na versão 4.0.2.
Limiar para acionar um alerta para repositórios desatualizados ou aqueles que contenham muitas alterações. O padrão é 25.
Ver também
OIDC_PROVIDER_ENABLED¶
Adicionado na versão 2026.11.
Enable Weblate’s optional OpenID Connect identity provider. Defaults to False.
Install the oidc extra, add weblate.oidc and oauth2_provider to
INSTALLED_APPS, and configure signing keys before enabling it.
OAUTH2_PROVIDER¶
Adicionado na versão 2026.11.
Configuration dictionary for the optional OpenID Connect identity provider, using
Django OAuth Toolkit settings.
OIDC_RSA_PRIVATE_KEY must contain an unencrypted RSA private key of at
least 2048 bits. OIDC_RSA_PRIVATE_KEYS_INACTIVE can contain previous keys
for rotation. Load keys from protected files rather than storing them in
version control.
Weblate supplies identity scopes, its claim validator, the canonical issuer, HTTPS redirect requirements, S256 PKCE, one-hour access and ID token lifetimes, and rotating refresh tokens with a 30-day idle expiry. Entries in this dictionary override these defaults. Keep the Weblate claim validator to preserve account eligibility checks and identity claim mapping. The provider accepts RS256 authorization-code clients and refresh tokens. Public clients authenticate using S256 PKCE without a client secret.
Weblate enables the toolkit’s RFC 9700 protections by default. Authorization
responses include the iss issuer parameter, and newly issued access and
refresh tokens are stored as hashes. Enabling hashed storage does not erase
plaintext token values already present in the database.
REFRESH_TOKEN_GRACE_PERIOD_SECONDS defaults to 0. A client that loses a
refresh response may need the user to sign in again. A nonzero grace period
requires setting COMPLIANT_BCP_RFC9700_TOKEN_STORAGE to False, which stores
usable token values in the database. The toolkit’s deployment checks reject
combining hashed storage with a nonzero grace period. They also reject disabling
refresh-token replay protection or PKCE, allowing HTTP callbacks, or enabling
wildcard redirect matching while the corresponding compliance gates are enabled.
REQUIRE_LOGIN¶
Adicionado na versão 4.1.
This enables django.contrib.auth.middleware.LoginRequiredMiddleware
and configures REST framework to require authentication for all API endpoints.
Alterado na versão 5.15: Weblate now relies on Django built-in middleware.
Nota
Isto é implementado no Amostra de configuração. Para Docker, use WEBLATE_REQUIRE_LOGIN.
Ver também
GOOGLE_CLOUD_ERROR_REPORTING¶
Configuration for Coletando relatórios de erros e monitoramento do desempenho using Google Cloud Error Reporting.
Set to None to disable the integration, or set to a dictionary of keyword
arguments for the Google Cloud Error Reporting client.
Weblate automatically supplies service as weblate and version as
the current Weblate version or Git revision. Explicit values in the dictionary
override these defaults.
OPENTELEMETRY_ENABLED¶
Adicionado na versão 2026.6.
Enable backend tracing using OpenTelemetry. Disabled by default.
Traces are exported only when this is enabled and
OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT is configured.
OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT¶
OTLP HTTP traces endpoint for OpenTelemetry, for example
https://collector.example.com/v1/traces.
OPENTELEMETRY_EXPORTER_OTLP_HEADERS¶
Additional HTTP headers for the OpenTelemetry OTLP exporter. Defaults to an empty dictionary.
OPENTELEMETRY_EXTRA_RESOURCE_ATTRIBUTES¶
Additional OpenTelemetry resource attributes. Defaults to an empty dictionary.
OPENTELEMETRY_SERVICE_NAME¶
OpenTelemetry service name. Defaults to weblate.
OPENTELEMETRY_TRACES_SAMPLE_RATE¶
Configure sampling rate for OpenTelemetry traces. Set to 1 to trace all events, 0 (the default) disables tracing.
SENTRY_DSN¶
DSN do Sentry para usar para Coletando relatórios de erros e monitoramento do desempenho.
Ver também
SENTRY_ENVIRONMENT¶
Configura o ambiente para o Sentry. O padrão é devel.
SENTRY_MONITOR_BEAT_TASKS¶
Adicionado na versão 5.13.
Configure whether to monitor Celery Beat tasks with Sentry. Defaults to True.
SENTRY_PROFILES_SAMPLE_RATE¶
Configure sampling rate for performance monitoring. Set to 1 to profile all traced events (the default), 0 disables profiling.
Ver também
SENTRY_SEND_PII¶
Permite que o Sentry colete determinadas informações de identificação pessoal. Desativado por padrão.
Alterado na versão 5.7: Isso está desativado por padrão agora, costumava estar ativado por padrão.
SENTRY_TRACES_SAMPLE_RATE¶
Configure a taxa de amostragem para monitoramento de perfil. Defina como 1 para rastrear todos os eventos, 0 (o padrão) desativa o rastreamento.
Ver também
SIMPLIFY_LANGUAGES¶
Usa códigos de idioma simples para combinações padrão de idioma/país. Por exemplo, uma tradução de fr_FR usará o código de idioma fr. Este é geralmente o comportamento desejado, pois simplifica a lista de idiomas para essas combinações padrão.
Desative isso se quiser traduções diferentes para cada variante.
SITE_DOMAIN¶
Configura o domínio do site. Necessário para produzir links absolutos corretos em muitos escopos (por exemplo, ativação de e-mails, notificações ou feeds RSS).
Se o Weblate estiver sendo executado em uma porta fora do padrão, inclua-a aqui também.
Exemplos:
# Production site with domain name
SITE_DOMAIN = "weblate.example.com"
# Local development with IP address and port
SITE_DOMAIN = "127.0.0.1:8000"
Nota
Esta configuração deve conter apenas o nome de domínio. Para configurar o protocolo (habilitar e aplicar HTTPS), use ENABLE_HTTPS e para alterar o URL, use URL_PREFIX.
Dica
Em um contêiner Docker, o domínio do site é configurado através de WEBLATE_ALLOWED_HOSTS.
SITE_TITLE¶
Título do site a ser usado para o site e e-mails enviados.
SPECIAL_CHARS¶
Caracteres adicionais para incluir no teclado visual, Teclado visual.
O valor padrão é:
SPECIAL_CHARS = ("\t", "\n", "\u00a0", "…")
SINGLE_PROJECT¶
Redireciona os usuários diretamente para um projeto ou componente em vez de mostrar o painel. Você pode configurá-lo como True para que funcione apenas se houver um único projeto no Weblate. Alternativamente, defina o projeto, e ele redirecionará incondicionalmente para este projeto.
Exemplo:
SINGLE_PROJECT = "test"
SSH_EXTRA_ARGS¶
Adicionado na versão 4.9.
Permite adicionar parâmetros personalizados quando o Weblate está chamando SSH. Útil ao se conectar a servidores usando criptografia legada ou outros recursos não padrão.
Por exemplo, quando a conexão SSH em Weblate falha com Unable to negotiate with legacyhost: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1, você pode habilitar isso usando:
SSH_EXTRA_ARGS = "-oKexAlgorithms=+diffie-hellman-group1-sha1"
Dica
O texto é avaliado pelo shell, portanto, certifique-se de que todos os espaços em branco e caracteres especiais estejam entre aspas.
Aviso
This is trusted administrator-controlled configuration. Arbitrary SSH
options can alter connection routing and override the address pinning
provided by VCS_RESTRICT_PRIVATE. Administrators are responsible
for the security and compatibility impact of all configured arguments.
Ver também
STATUS_URL¶
A URL onde sua instância de Weblate relata seu status.
SUPPORT_STATUS_CHECK¶
Adicionado na versão 5.5.
Defaults to True. When enabled, superusers without integrated support are
redirected after login to a page offering professional support, at most once
every 180 days per account. The reminder starts once the installation has a
change older than 14 days and waits for an HTML page navigation. A
Continue to Weblate action returns to the intended page.
Set this to False to disable the redirect. This does not hide support or
donation links elsewhere in the interface.
Dica
Melhore sua experiência com o Weblate comprando uma assinatura de suporte e impulsionando o progresso do Weblate, em vez de desativá-lo.
TRANSLATION_MAX_SIZE¶
Adicionado na versão 2026.11.2.
Maximum size, in bytes, of a translation file before parsing. Applies to all
formats and to repository files as well as uploads and translation-memory
imports, including source templates and intermediate files. For directory-based
formats, the limit applies to each metadata file. When unset or None, uses
TRANSLATION_UPLOAD_MAX_SIZE
(50 MB by default). An explicit value overrides this fallback.
Uploads must also satisfy TRANSLATION_UPLOAD_MAX_SIZE, even when
TRANSLATION_MAX_SIZE is higher. This byte limit does not bound decompression
or other expansion performed by a parser.
Translation files are also limited to 100,000 logical content strings per file before database synchronization or import. Existing tighter limits for compressed formats remain in effect.
In Docker, configure this using WEBLATE_TRANSLATION_MAX_SIZE.
TRANSLATION_UPLOAD_MAX_SIZE¶
Adicionado na versão 5.17.1.
Configures the maximum size, in bytes, for uploaded translation files. Defaults to 50 MB.
Uploads must also satisfy TRANSLATION_MAX_SIZE.
Suggestion uploads are additionally limited to 20,000 content strings. See Enviando traduções for upload processing and rate limits.
In Docker, configure this using the WEBLATE_TRANSLATION_UPLOAD_MAX_SIZE
environment variable.
UNUSED_ALERT_DAYS¶
Adicionado na versão 4.17.
Configura quando o alerta de Componente parece não utilizado é acionado.
O padrão é 365 dias, defina como 0 para desativar.
UPDATE_LANGUAGES¶
Adicionado na versão 4.3.2.
Controla se o banco de dados de idiomas deve ser atualizado ao executar a migração do banco de dados e está ativado por padrão. Esta configuração não tem efeito na invocação de setuplang.
Aviso
A exibição dos idiomas pode ficar inconsistente com isso. As definições de idioma do Weblate se expandem com o tempo e o código de idioma para os idiomas definidos não será exibido.
Ver também
URL_PREFIX¶
Esta configuração permite que você execute Weblate em algum caminho (caso contrário, ele depende de ser executado a partir da raiz do servidor web).
Nota
Para usar esta configuração, você também precisa configurar seu servidor para remover este prefixo. Por exemplo, com o WSGI, isso pode ser alcançado definindo WSGIScriptAlias.
Dica
O prefixo deve iniciar com um /.
Exemplo:
URL_PREFIX = "/translations"
Nota
Esta configuração não funciona com o servidor embutido do Django, você teria que ajustar urls.py para conter este prefixo.
When using a URL prefix, expose Weblate’s prefixed robots.txt at the origin’s
/robots.txt through your reverse proxy. Its crawl rules and sitemap URL
include the configured prefix. If other applications share the origin, merge
their crawl rules in the proxy-served document as appropriate.
VCS_ALLOW_HOSTS¶
Adicionado na versão 5.15.
A set of hosts to allow when configuring VCS URL. Defaults to an empty set, which does no filtering at all.
When VCS_RESTRICT_PRIVATE is enabled, matching hosts are also exempt
from the private-target restriction. This exemption is also needed for VCS
backends which cannot bind the client connection to the address validated by
Weblate, such as Mercurial and Subversion.
Use VCS_PRIVATE_ALLOWLIST instead when hosts should be exempt from
the private-target restriction without filtering access to other public hosts.
VCS_PRIVATE_ALLOWLIST¶
Adicionado na versão 2026.9.
Defines hostnames or domains exempt from VCS_RESTRICT_PRIVATE.
Unlike VCS_ALLOW_HOSTS, this setting does not filter access to other
hosts. Entries follow Django host matching semantics, so values such as
vcs.internal.example or .internal.example can be used.
The exemption is needed for VCS backends which cannot bind the client connection to the address validated by Weblate, such as Mercurial and Subversion. It can also be used to allow private Git repository hosts.
When VCS_ALLOW_HOSTS is non-empty, its host filter still applies and
takes precedence over this allowlist.
Configuração padrão:
VCS_PRIVATE_ALLOWLIST = []
Ver também
VCS_ALLOW_SCHEMES¶
Adicionado na versão 5.15.
A set of URL schemes to allow when configuring VCS URL. Only https and
ssh are allowed by default.
The file scheme and bare filesystem paths are disabled for security reasons
because they could allow component editors to access repositories on the server
filesystem. Including file in this setting prevents Weblate from starting
with an ImproperlyConfigured error.
VCS_RESTRICT_PRIVATE¶
Adicionado na versão 5.17.
Reject VCS repository URLs pointing to internal or non-public addresses unless
the target host is included in VCS_ALLOW_HOSTS or matches
VCS_PRIVATE_ALLOWLIST. On by default.
When enabled, hostnames that cannot be resolved during validation are rejected
unless they are trusted by VCS_ALLOW_HOSTS or
VCS_PRIVATE_ALLOWLIST.
For Git repositories accessed over HTTPS or SSH, Weblate binds each VCS command
to the addresses approved during runtime validation for direct connections.
Configured HTTP proxies are trusted infrastructure and resolve repository
hostnames instead. Automatic redirect following remains disabled. Permanent
same-host HTTP redirects are probed separately through the same outbound route,
validated, and stored as the canonical component repository URL. Cross-host
redirects have to be configured manually. Mercurial, Subversion, custom VCS
backends, and additional URL schemes are rejected unless the target host is
trusted by VCS_ALLOW_HOSTS or VCS_PRIVATE_ALLOWLIST.
Hosting API requests, including redirects and pagination URLs, apply the same private-target restrictions and trusted-host exemptions. Direct API connections are bound to validated addresses and their connected peers are checked.
Network-level egress filtering which blocks internal, loopback, link-local, reserved, and cloud metadata address ranges is recommended as defense in depth, especially for custom integrations and administrator-installed extensions.
VCS_API_DELAY¶
Adicionado na versão 4.15.1.
Configures minimal delay in seconds between third-party API calls in Pull requests do GitHub, Merge requests do GitLab, Pull requests do Gitea, Merge requests do Pagure, and Pull requests do Azure DevOps.
Limitador de chamadas de API do Weblate para esses serviços para evitar sobrecarregá-los.
Se você estiver sendo afetado pelo limitador de taxa secundário no GitHub, aumentar isso pode ajudar.
O valor padrão é 10.
VCS_API_TIMEOUT¶
Adicionado na versão 5.15.
Configures timeout in seconds for third-party API calls such as forking or creating merge requests in Pull requests do GitHub, Merge requests do GitLab, Pull requests do Gitea, Merge requests do Pagure, and Pull requests do Azure DevOps.
O valor padrão é 10.
VCS_BACKENDS¶
Configuração de backends VCS disponíveis.
Nota
Weblate offers configured backends when their required commands are available. Exact command versions are validated by the deployment and periodic configuration health checks.
Dica
Você pode limitar escolhas ou adicionar back-ends VCS personalizados usando isso.
VCS_BACKENDS = ("weblate.vcs.git.GitRepository",)
Ver também
VCS_CLONE_DEPTH¶
Configura o quão profunda a clonagem de repositórios Weblate deve ir.
Nota
Atualmente, isso só é suportado em Git. Por padrão, o Weblate faz clones rasos dos repositórios para tornar a clonagem mais rápida e economizar espaço em disco. Dependendo do seu uso (por exemplo, ao usar o personalizado Complementos), você pode querer aumentar a profundidade ou desligar os clones rasos completamente definindo isso para 0.
Dica
No caso de você receber erro fatal: protocol error: expected old/new/ref, got 'shallow <hash de commit>' ao fazer push do Weblate, desative clones rasos completamente configurando:
VCS_CLONE_DEPTH = 0
WEBLATE_ADDONS¶
Lista de complementos disponíveis para uso. Para usá-los, eles precisam estar habilitados para um determinado componente de tradução. Por padrão, isso inclui todos os complementos integrados. Ao expandir a lista, você provavelmente desejará manter os existentes habilitados, por exemplo:
WEBLATE_ADDONS = (
# Built-in add-ons
"weblate.addons.gettext.GenerateMoAddon",
"weblate.addons.gettext.UpdateLinguasAddon",
"weblate.addons.gettext.UpdateConfigureAddon",
"weblate.addons.gettext.MsgmergeAddon",
"weblate.addons.cleanup.CleanupAddon",
"weblate.addons.consistency.LanguageConsistencyAddon",
"weblate.addons.discovery.DiscoveryAddon",
"weblate.addons.flags.SourceEditAddon",
"weblate.addons.flags.TargetEditAddon",
"weblate.addons.flags.SameEditAddon",
"weblate.addons.flags.BulkEditAddon",
"weblate.addons.generate.GenerateFileAddon",
"weblate.addons.properties.PropertiesSortAddon",
"weblate.addons.git.GitSquashAddon",
"weblate.addons.removal.RemoveComments",
"weblate.addons.removal.RemoveSuggestions",
"weblate.addons.resx.ResxUpdateAddon",
"weblate.addons.autotranslate.AutoTranslateAddon",
"weblate.addons.cdn.CDNJSAddon",
# Add-on you want to include
"weblate.addons.example.ExampleAddon",
)
Nota
A remoção do complemento da lista não a desinstala dos componentes. Weblate vai travar nesse caso. Por favor, desinstale o complemento de todos os componentes antes de removê-la desta lista.
ADDON_ACTIVITY_LOG_EXPIRY¶
Adicionado na versão 5.6.
Configura por quanto tempo os logs de atividade dos complementos são mantidos. O padrão é de 180 dias.
WEBLATE_EXPORTERS¶
Adicionado na versão 4.2.
List of available exporters offering translation downloads or glossaries in various file formats.
Ver também
WEBLATE_FORMATS¶
Lista de formatos de arquivo disponíveis para uso.
Nota
A lista padrão já tem os formatos comuns.
Ver também
MACHINERY_ERROR_KEEP_DAYS¶
Adicionado na versão 2026.11.
Configures how long translation service error logs are kept, in days. Defaults to 30. A daily background task removes older entries.
WEBLATE_MACHINERY¶
Adicionado na versão 4.13.
List of translation services available for use.
WEBLATE_GPG_IDENTITY¶
Identidade usada pelo Weblate para assinar os commits Git, por exemplo:
WEBLATE_GPG_IDENTITY = "Weblate <weblate@example.com>"
O chaveiro GPG do Weblate é buscado por uma chave correspondente (home/.gnupg em DATA_DIR). Se não for encontrado, uma chave é gerada. Consulte Assinando commits do Git com GnuPG para mais detalhes.
Ver também
WEBSITE_REQUIRED¶
Define se Site do projeto deve ser especificado ao criar um projeto. Ativado por padrão, pois se adapta às configurações do servidor público.
WEBSITE_ALERTS_ENABLED¶
Adicionado na versão 5.17.
Default: True
Defines whether Weblate should check project website availability and show alerts for unreachable project websites.
When set to False, Weblate will skip website availability checks and
will not generate project website alerts. This is useful when:
Your websites are behind firewalls that block Weblate’s requests
You want to avoid 403/503-type errors from bot protection
Project website availability is not a concern for your installation
Ver também
Configurando credenciais para controle de versão¶
Dica
Esta seção descreve as variáveis de credenciais do VCS como GITHUB_CREDENTIALS, GITLAB_CREDENTIALS, GITEA_CREDENTIALS, PAGURE_CREDENTIALS, BITBUCKETSERVER_CREDENTIALS.
O dicionário de configuração consiste em credenciais definidas para cada host de API. O host da API pode ser diferente do que você usa no navegador web, por exemplo, a API do GitHub é acessada como api.github.com.
As credenciais também podem ser substituídas em URL de envio do repositório ou Repositório do código-fonte (se o URL de push não estiver configurado), elas têm precedência sobre as especificadas no arquivo de configuração.
A seguinte configuração está disponível para cada host:
usernameUsuário API, necessário.
tokenToken de API para o usuário da API, obrigatório.
schemeAdicionado na versão 4.18.
Substituição de esquema. O Weblate tenta analisar o esquema a partir da URL do repositório e, se não conseguir, utiliza
https. Se você estiver executando o servidor da API internamente, talvez queira usarhttpem vez disso, mas leve em consideração a segurança.
Dica
No contêiner do Docker, as credenciais podem ser configuradas usando variáveis de ambiente, consulte Code-hosting sites credentials.
Anonymous bot protection¶
Adicionado na versão 2026.11.
Aviso
This feature is a technology preview for evaluating application-aware bot protection as an alternative to Anubis. Its configuration and behavior may change, and it may be removed if it does not prove sufficiently useful. Long-term maintenance is not guaranteed.
While verification runs automatically, visitors see a randomly selected tip about Weblate features.
BOT_PROTECTION_ENABLED¶
Default: False. Enable self-hosted, proactive proof of work for anonymous
visitors. Place weblate.utils.bot_protection.BotProtectionMiddleware after
Django’s session middleware and before Weblate’s authentication middleware,
following the example settings. Authenticated users bypass protection, including
when no proof-of-work cookie exists. Existing authentication and API rate limits
remain in effect. Proof of work never grants authentication or permissions.
Anonymous HTML GET requests receive an automatic challenge. HEAD and unsafe
methods receive HTTP 403 without challenge HTML; request bodies are never
replayed. REST API requests without an explicit HTML Accept media type are
exempt. HTML API browsing requires verification. Changing Accept on a regular
page route does not exempt it. Account routes under /accounts/ are exempt so
sign-in flows and redirects to login work without verification. Hooks, widget
images (including legacy image redirects), feeds, OIDC provider routes under
/oidc/, static files, health, robots, and well-known routes are exempt.
Hosted integration API routes under /hosted/api/ are exempt when
wlhosted.integrations is installed; their signed-payload authentication
remains in effect.
Widget configuration pages remain protected. Public assets, including custom
CSS, manifests, icons, and Open Graph images, are exempt. The JavaScript
translation catalog and Exportador git protocol routes, including clone
redirects, are also exempt so they can use their existing localization and
authentication. Login exemptions and bot exemptions are independent; making a
view public does not automatically bypass bot protection.
BOT_PROTECTION_DIFFICULTY¶
Default: 4. Number of leading hexadecimal zeroes required, from 1 to 6.
Four zeroes require an average of 65,536 SHA-256 attempts. ALTCHA v2 runs with
SHA-256 and cost 1: challenge generation performs no candidate hashing and
verification performs one candidate hash, independent of difficulty. Registration
and other form CAPTCHAs retain their existing Argon2id configuration.
Challenge and clearance lifetime¶
BOT_PROTECTION_CHALLENGE_AGE defaults to 300 seconds (allowed: 1–3600).
BOT_PROTECTION_COOKIE_AGE defaults to 3600 seconds (allowed: 1–86400).
Clearance has a fixed expiry and is bound to the client IP and deployment.
Cookies are host-only, Secure, HttpOnly, and SameSite=Lax. HTTPS is required.
Network changes require another challenge. Shared NAT clients can share copied
clearance; PoW increases harvesting cost but does not prevent capable solvers.
The challenge uses a separate CSRF cookie and Django’s token and origin checks,
without creating an application session. After solving a challenge, the browser checks its clearance cookie through
/-/pow/check/ before navigating, without invoking the destination view. An
expired challenge is refreshed automatically once; repeated expiry and other
failures leave Retry and sign-in available. Failure messages distinguish invalid
verification, replay, cookie/CSRF problems, and service unavailability.
Browser workers calculate the solution without blocking the main thread. Visitors without JavaScript or workers can sign in instead. Challenge assets must be available from the same origin.
BOT_PROTECTION_CACHE_ALIAS¶
Default: "default". Shared Redis or Memcached cache used to atomically consume
valid solutions once. No replay entries are created for unsolved challenges.
Cache failures reject verification with HTTP 503. Ordinary clearance checks do
not access the database or shared cache. Sessionless challenge generation only
accesses the shared cache to increment a best-effort issued-challenge counter.
Keep the replay cache available and sized to retain entries through challenge
expiry: eviction or cache loss can permit reuse of otherwise valid solutions.
Normal Django session validation still accesses the configured session backend.
The management Performance report shows issued challenges and
verification outcomes for the current hour and the previous 24 completed hours.
It also shows requests rejected with pow_required without issuing a challenge
because of their method or Accept header. These counts exclude explicit
bot_denied policy denials and exempt requests, and count requests rather than
unique clients.
Hours are aligned to UTC. Hourly buckets in the PoW cache expire after 25 hours;
eviction and outages can lose counts. Counter failures never change challenge
or verification responses. Following an upgrade from minute buckets, totals
populate as new events occur.
These counts are also available from GET /api/metrics/. Issued challenges
and verification outcomes indicate relative volumes, not an exact count of
unattempted challenges: verification requests can include retries, replays, and
malformed submissions.
The weblate.bot_protection logger emits structured verification events with
event, reason, status, and count fields, without proof payloads or
client identifiers. Configure a log handler that retains these fields for
diagnosis during cache outages. Clearance checks remain independent of the
cache; issued-challenge, pow_required, and verification outcome counters use it.
BOT_PROTECTION_EXEMPT_PATHS¶
Default: []. Additional paths relative to the Weblate deployment prefix.
A trailing slash exempts that entire path prefix; other entries match exactly.
Use narrow exceptions for integrations that cannot solve challenges.
BOT_PROTECTION_EXEMPT_AGENTS¶
Default: []. Case-insensitive User-Agent regular expressions that bypass bot
protection for all HTTP methods and paths. Patterns use search matching against
the first 1,024 characters of the header. Invalid expressions prevent startup
when bot protection is enabled.
Use this for uptime monitoring of application pages, such as measuring latency
on /. Simple health checks on /healthz/ are already exempt.
For a monitor configured to send the User-Agent Weblate-Uptime/1.0:
BOT_PROTECTION_EXEMPT_AGENTS = [r"^Weblate-Uptime/1\.0$"]
These exemptions trust a client-supplied, spoofable header. They override unwanted-agent denial and do not depend on crawler verification or robots.txt. They bypass only bot protection: authentication, permissions, and existing rate limits still apply. The proof-of-work verification endpoint retains its normal validation.
Verified crawler configuration¶
BOT_PROTECTION_CRAWLER_FILE defaults to an empty string, selecting the packaged
IP snapshot. The initial set follows Anubis’s IP-based allowed-crawler definitions
and adds SeznamBot:
Googlebot, Bingbot, Applebot, DuckDuckBot, QwantBot, MojeekBot, Marginalia, Common Crawl (CCBot), Arquivo.pt, and SeznamBot use official address feeds.
KagiBot, Internet Archive, and Wikimedia’s Citoid and Zotero translation services use reviewed bundled ranges, maintained with Weblate releases.
Verification requires a matching User-Agent and source IP. Verified crawlers bypass protection only for GET and HEAD requests to paths allowed by the shared robots.txt crawl policy, including sitemap documents. Other requests follow the normal challenge or deny policy. Explicit endpoint exemptions, configured exempt paths, valid clearance, and authenticated sessions still take precedence. Internet Archive and Arquivo.pt deliberately allow their listed networks regardless of User-Agent, following Anubis so that browser-like archival requests work. These exceptions trust the service networks, not individual crawler processes. No crawler bypass grants authentication or access to private content.
Set an absolute writable filename and run weblate update_crawler_ranges daily
using an operator-managed scheduler, then restart all application workers to
load the updated snapshot. It downloads bounded datasets only from
fixed official HTTPS sources and publishes validated updates atomically. A failed
provider retains its previous ranges and retrieval time; successful providers
still update. The command exits unsuccessfully and lists failed providers, so
monitor its exit status. Administrator-defined entries are preserved.
HTTP requests never download ranges or perform DNS lookups.
Crawler snapshots are loaded once during application startup. Requests use parsed networks in memory without checking file freshness or retrieval age. Ranges remain active until restart; packaged snapshots are updated through Weblate releases. Custom snapshot updates also require restarting application workers. Retrieval timestamps are metadata and do not expire ranges.
BOT_PROTECTION_CRAWLER_RULES defaults to {} and extends or overrides the
mapping from provider identifiers to User-Agent regular expressions. Built-in
identifiers are googlebot, bingbot, applebot, duckduckbot,
qwantbot, mojeekbot, marginalia, commoncrawl, arquivo-pt,
seznambot, kagibot, internet-archive, and wikimedia-citoid.
Custom providers must also have verified CIDRs in the local snapshot’s ranges
mapping and a Unix retrieval timestamp in its refreshed_at mapping, both keyed
by provider identifier. Record official sources when maintaining custom ranges.
Unwanted crawler configuration¶
BOT_PROTECTION_UNWANTED_AGENTS defaults to [] and accepts User-Agent
regular expressions. BOT_PROTECTION_UNWANTED_ACTION defaults to
"challenge"; use "deny" to return HTTP 403 instead. Valid clearance and
session authentication take precedence. These rules are an administrative
policy, not verified identity. No GeoIP, fingerprinting, or behavioral scoring
is performed.
Deploy behind HTTPS and configure Executando por trás de um proxy reverso client-IP handling correctly. Do not trust client-supplied forwarding headers. Disable shared proxy caching for protected application routes and preserve no-store responses and cookies. Apply proxy body-size and connection limits: application PoW does not protect against volumetric network attacks.
Benchmarking¶
Use a disposable HTTPS deployment with production-like data and proxy caching
disabled. Copy Cookie headers for an authenticated browser and a cleared anonymous
browser into separate private files. Run the following command, supplying all
application worker process IDs with repeated --server-pid arguments:
.venv/bin/python scripts/benchmark-bot-protection.py https://test.example/projects/ \
--authenticated-cookie-file /tmp/auth-cookie \
--clearance-cookie-file /tmp/pow-cookie --server-pid 1234
The script reports requests per second, worker CPU seconds, resident memory, status counts, and p50/p95/p99 latency at concurrency 1, 32, and 128. It compares authenticated, cleared anonymous, new anonymous, and repeated unsolved requests. Distinct anonymous cookie states simulate many visitors without creating Django sessions; to measure distinct source IPs, run load generators on multiple hosts. Supply process IDs for the shared cache as well when measuring its CPU cost. Cookie files contain credentials: remove them after the benchmark. Record machine specifications, worker counts, page data, proxy configuration, and cache setup alongside results. Check status counts to catch expired cookies during a run.