Skip to content

Deploying a Tolgee App

Introduction

Tolgee delivers collaborative localization with an integrated translation UI and API. This guide shows how to containerize Tolgee, connect it to PostgreSQL, attach persistent storage, and deploy it to Klutch.sh using HTTP traffic.

Prerequisites

  • GitHub repository with your Tolgee Dockerfile.
  • External PostgreSQL instance (managed service or separate Klutch.sh app).
  • Klutch.sh project ready in klutch.sh/app.

Project structure

.
├── Dockerfile
└── init
└── README.md

Sample Dockerfile

FROM tolgee/tolgee:latest
# Optional: add branding assets or configuration overrides
# COPY overrides/* /app/
ENV SERVER_PORT=8080
EXPOSE 8080

Required environment variables

  • SPRING_DATASOURCE_URL – e.g., jdbc:postgresql://<host>:<port>/<db_name>
  • SPRING_DATASOURCE_USERNAME
  • SPRING_DATASOURCE_PASSWORD
  • TOLGEE_AUTH_DEFAULT_USERNAME – initial admin
  • TOLGEE_AUTH_DEFAULT_PASSWORD
  • TOLGEE_FRONTEND_URL – public URL for links and callbacks (e.g., https://example-app.klutch.sh)

Optional environment variables

  • SPRING_PROFILES_ACTIVE=prod
  • TOLGEE_ALLOW_REGISTRATION=false to restrict signups
  • TOLGEE_CORS_ALLOWED_ORIGINS for UI/API hosts

Persistence

Tolgee stores data in Postgres. If you want to persist file storage (exports, assets), mount a volume at:

  • Mount path: /data
  • Size: pick based on expected asset footprint

Networking

  • Protocol: HTTP
  • Internal port: 8080
  • Users reach your app at https://example-app.klutch.sh while Klutch.sh routes to 8080 in the container.
Terminal window
curl -I http://localhost:8080

Deployment on Klutch.sh

  1. Commit the Dockerfile to your GitHub repo.
  2. In klutch.sh/app, create a new app and choose GitHub as the source.
  3. Klutch.sh automatically detects the Dockerfile in the repository root.
  4. Select HTTP traffic and set the internal port to 8080.
  5. Add environment variables for database connectivity and admin credentials (mark secrets for passwords).
  6. Optionally attach a persistent volume at /data with the size you need.
  7. Deploy. After the first boot, log in with the default admin credentials and configure projects.

Verification

  • Open https://example-app.klutch.sh to confirm the Tolgee UI loads.

  • API check:

    Terminal window
    curl -s https://example-app.klutch.sh/api/v2/public/health

Next steps

  • Rotate admin credentials after first login.
  • Tune CORS, email, and OAuth providers via environment variables.
  • Enable database backups on your PostgreSQL service.