
Deploy Weblate | (Just Updated) Translation Management, Localization Platform With Admin Login Generated, Sign-Up Closed
Weblate self-hosted translation management, localization platform, Postgres
cache
Just deployed
/data
Just deployed
/app/data
database
Just deployed
/var/lib/postgresql
Deploy and Host Weblate on Railway
Built for an LLM agent to deploy and use. The deploy form has no fields to fill: the administrator login and the database and Redis passwords are generated, the server cannot start without them, and the administrator exists before the first request. Weblate is a self-hosted continuous localization platform, an open-source alternative to Crowdin, Transifex and Lokalise for managing translations of software and documentation with Git integration, translation memory and quality checks.
About Hosting Weblate
This template runs three services: weblate, the official Weblate image (2026.11.2) pinned by digest through a thin wrapper, with a volume at /app/data that holds the secret key, translation repositories, backups and uploads; database, a PostgreSQL 18 instance with a volume at /var/lib/postgresql that holds projects, components, strings, translations and accounts; and cache, a Redis 8 instance with a volume at /data that holds the cache and the Celery task queue. One public domain serves the web interface and the REST API at /api/. The server listens on Railway's injected PORT (8080), and GET /healthz/ answers 200.
What the wrapper fixes. Railway mounts volumes owned by root, and the upstream image runs as uid 1000 and refuses to start on a data directory it cannot write. The wrapper starts as root only long enough to hand the volume to uid 1000, then drops back to that user and runs the stock entrypoint, so the data survives a redeploy and nothing runs as root afterwards. It bakes in HTTPS, the proxy headers and the client-IP header (Railway's edge replaces the inbound X-Forwarded-For), the database and Redis ports, and closes public registration. It refuses to start without a 12-character administrator password, a database password and a Redis password, and upstream creates the administrator from WEBLATE_ADMIN_EMAIL and WEBLATE_ADMIN_PASSWORD at first boot. Checked on a Railway deploy: the generated login signs in, a write without it answers 401, and an anonymous request to create a user answers 401. Not reproduced on a Railway control of an incumbent listing.
Using it. Open the domain and sign in as admin with WEBLATE_ADMIN_PASSWORD. Add a project, then a component that points at your Git repository; everything is stored in PostgreSQL and the data volume, so redeploys keep it. The first boot runs every database migration and takes a few minutes before the site answers.
Agent contract
- Public URL:
https://RAILWAY_PUBLIC_DOMAIN(the generated domain of theweblateservice) - Private URL:
http://weblate.railway.internal:8080 - Credentials: the variables
WEBLATE_ADMIN_EMAILandWEBLATE_ADMIN_PASSWORDon theweblateservice (plain text; the username isadmin, andWEBLATE_ADMIN_EMAILisadmin@plus the public domain) - Auth: sign in at
/accounts/login/(form fieldsusername,password,csrfmiddlewaretoken) to get a session cookie. For REST writes under/api/send that cookie, aRefererheader on the site's own origin, and anX-CSRFTokenheader whose value is thecsrfmiddlewaretokenof any signed-in page. Weblate's personal API tokens (Authorization: Token ...) are issued from the profile once the account's identity is re-verified, so a session is the no-human path. - Health:
GET /healthz/returns 200 without credentials
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, WEBLATE_ADMIN_PASSWORD (variables of the weblate service); also curl, grep, awk.
R="https://$RAILWAY_PUBLIC_DOMAIN"; J=$(mktemp); H="content-type: application/json"
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/healthz/")" = 200 ]; do n=$((n+1)); [ "$n" -le 90 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/healthz/"
# the admin is created at boot, username admin; the session cookie plus an X-CSRFToken header (Weblate keeps the token in the session, so it is read from a page) authenticates the REST API
C=$(curl -s -c "$J" "$R/accounts/login/" | grep -o 'csrfmiddlewaretoken" value="[^"]*' | head -1 | cut -d'"' -f3)
curl -s -b "$J" -c "$J" -e "$R/accounts/login/" -o /dev/null -w "login: %{http_code}\n" --data-urlencode "csrfmiddlewaretoken=$C" --data-urlencode "username=admin" --data-urlencode "password=$WEBLATE_ADMIN_PASSWORD" "$R/accounts/login/"
T=$(curl -s -b "$J" "$R/accounts/profile/" | grep -o 'csrfmiddlewaretoken" value="[^"]*' | head -1 | cut -d'"' -f3)
# write-auth: creating a project with the session succeeds, the same call with no credential is refused
curl -s -b "$J" -e "$R/" -H "X-CSRFToken: $T" -H "$H" -d '{"name":"Agent check '$$'","slug":"agent-'$$'","web":"https://example.com"}' -o /dev/null -w "write with session: %{http_code}\n" "$R/api/projects/"
curl -s -H "$H" -d '{"name":"Anon","slug":"anon","web":"https://example.com"}' -o /dev/null -w "write without key: %{http_code}\n" "$R/api/projects/"
# signup: anonymous user creation through the API is refused, and the web registration page says it is turned off
curl -s -H "$H" -d '{"username":"stranger","email":"stranger@example.org","full_name":"Stranger"}' -o /dev/null -w "public signup: %{http_code}\n" "$R/api/users/"
echo "registration page: $(curl -s "$R/accounts/register/" | grep -o 'new registrations are turned off')"
Expected output against a fresh deploy (measured on the Railway demo; the output is recorded in template.md):
health: 200
login: 302
write with session: 201
write without key: 401
public signup: 401
registration page: new registrations are turned off
The refusals are the contract: a write without the session answers 401 (write without key: 401), and a stranger creating a user answers 401 (public signup: 401). The web registration page still answers 200 but says new registrations are turned off, so the status code alone is not the proof there; the API call is.
Why Deploy Weblate on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Weblate on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
- Agent-ready - no deployer fields, a contract block, and one script that proves the server is healthy, a stranger is refused, and the generated login can write through the API.
- Locked from the first request - registration is closed, the administrator is created at boot, and the server will not start without strong secrets.
- Data survives redeploys - translations live in PostgreSQL on a volume, the queue in Redis on a volume, repositories and the secret key on a volume.
- Real client addresses - the proxy headers are set for Railway's edge, so audit logs and rate limits see the visitor and not the proxy.
- Pinned - the upstream image is pinned by digest and the wrapper by tag and digest.
Common Use Cases
- Localizing a product - keep the strings of a web, mobile or game project in Git and let translators work in the browser.
- Documentation translation - translate Markdown, Sphinx and gettext documentation with translation memory and glossaries.
- A private Crowdin or Transifex replacement - keep source strings and translator accounts on infrastructure you control.
Dependencies for Weblate Hosting
- The weblate service, a PostgreSQL service and a Redis service, each with its volume, created by the template.
Deployment Dependencies
Template Content
