Skip to content

[Bug]: hardcoded urls #261

Closed
Closed

Description

@disconn3ct

What happened?

env vars don't affect typetype, typetype-server or typetype-downloader urls.

Steps to reproduce

  1. Set YOUTUBE_REMOTE_LOGIN_CALLBACK_ORIGIN: http://typetype-server.domain.local:8080
  2. Receive errors:
typetype 2026/09/05 12:28:58 [error] 37#37: typetype-server could not be resolved (3: Host not found)
typetype 2026/09/05 12:28:58 [error] 37#37: typetype-token could not be resolved (3: Host not found)
typetype 2026/09/05 12:28:58 [error] 37#37: typetype-downloader could not be resolved (3: Host not found)

Affects (at least) main and frontend

Area

Not sure

Channel

main (stable)

Anything else?

What is with all the weird unused env vars? GITHUB_REPO and GITHUB_ISSUE_TEMPLATE and so forth..

Activity

  1. Priveetee commented on Sep 6, 2026

    @Priveetee
    Member

    Here is what the configuration variables actually do. One important distinction: a variable supported by a service is not necessarily configurable through the root .env. Compose must explicitly pass it through.

    Service addresses

    Variable Used by Purpose Current Compose behavior
    DOWNLOADER_SERVICE_URL Server Address used to contact Downloader. Hardcoded to http://typetype-downloader:18093.
    SUBTITLE_SERVICE_URL Server Token service address. Despite its name, it is also passed to the YouTube extraction setup. Not explicitly passed in stable Compose; Server uses its default.
    YOUTUBE_REMOTE_LOGIN_SERVICE_URL Server Token service address for remote YouTube login. Hardcoded to http://typetype-token:8081.
    YOUTUBE_REMOTE_LOGIN_CALLBACK_BASE_URL Server Server address used to build the login completion callback URL. Hardcoded to http://typetype-server:8080.
    YOUTUBE_REMOTE_LOGIN_CALLBACK_ORIGIN Token Allowed origin for the callback URL supplied by Server. It validates the destination; it does not set it. Read from .env.
    TYPETYPE_API_BASE Downloader Address used to contact Server. Hardcoded to http://typetype-server:8080.
    PUBLIC_BASE_URL Downloader Base URL used for Downloader's public links. Fixed to /api/downloader.
    YOUTUBE_OUTBOUND_PROXY_URL Server and Token Outbound proxy for YouTube requests. Read from .env.

    Nginx separately hardcodes all three service addresses. None of the callback settings changes those Nginx destinations.

    Installation and access

    Variable Purpose
    TYPETYPE_WEB_IMAGE Frontend container image.
    TYPETYPE_SERVER_IMAGE Server container image.
    TYPETYPE_TOKEN_IMAGE Token container image.
    TYPETYPE_DOWNLOADER_IMAGE Downloader container image.
    TYPETYPE_*_BETA_IMAGE Corresponding image overrides for beta Compose.
    HOST_PORT_WEB Host port exposing the web interface.
    HOST_PORT_SERVER, HOST_PORT_TOKEN, HOST_PORT_GARAGE_S3 Host ports exposing those services. These do not change their internal container ports.
    HOST_BIND_SERVER, HOST_BIND_TOKEN, HOST_BIND_GARAGE_S3 Host IP addresses on which those ports are exposed.
    HOST_PORT_*_BETA, HOST_BIND_*_BETA Equivalent beta settings, including Downloader's beta host port and bind address.
    ALLOWED_ORIGINS Browser origins allowed to access Server through CORS. Does not configure internal service addresses.
    AUTH_SESSION_TTL_DAYS Refresh-session lifetime in days.
    AUTH_ALLOW_INSECURE_COOKIES Allows authentication cookies without the HTTPS-only restriction, for HTTP installations.

    Database and storage

    Variable Purpose
    POSTGRES_DB, POSTGRES_USER, POSTGRES_PASSWORD PostgreSQL database and credentials used by the stack. Also supply defaults for application connections.
    DATABASE_URL, DATABASE_USER, DATABASE_PASSWORD Server's database connection overrides. Server expects a JDBC URL.
    DB_URL Downloader's database connection. The provided stack uses a postgres:// URL containing credentials.
    DB_USER, DB_PASSWORD Downloader's legacy JDBC conversion credentials. They do not override credentials in a postgres:// URL. Still passed by beta Compose.
    DRAGONFLY_URL Server's Redis-compatible cache connection.
    REDIS_HOST, REDIS_PORT Downloader's Redis-compatible connection. Fixed to dragonfly:6379 in Compose.
    REDIS_QUEUE_KEY Leftover configuration: passed by Compose, but not read by the Downloader code checked.
    STORAGE_BACKEND Downloader storage backend. Fixed to s3 in Compose.
    S3_ENDPOINT, S3_PUBLIC_ENDPOINT Downloader's S3 connection and endpoint used for signed links. Both fixed to http://garage:3900 in Compose.
    S3_REGION, S3_BUCKET S3 region and bucket. Fixed to garage and typetype-downloads.
    DOWNLOADER_S3_ACCESS_KEY, DOWNLOADER_S3_SECRET_KEY Root .env credentials passed to Downloader as S3_ACCESS_KEY and S3_SECRET_KEY.
    GARAGE_RPC_SECRET Shared secret for Garage's internal communication.
    S3_ARTIFACT_TTL_SECONDS Downloader artifact URL lifetime setting. Fixed to 7200 in Compose.

    Downloads

    Variable Purpose
    HTTP_PORT Downloader's listening port inside its container. Fixed to 18093.
    MAX_CONCURRENT_WORKERS Maximum concurrent download jobs. Fixed to 2.
    MAX_QUEUE_SIZE Maximum queued jobs. Fixed to 100.
    JOB_TTL_SECONDS Job TTL setting. Fixed to 600.
    DOWNLOAD_WORKERS Download worker count. Fixed to 8.
    DOWNLOAD_CHUNK_SIZE Download chunk size in bytes. Fixed to 10485760 (10 MiB).
    DOWNLOAD_RANGE_MODE Method used to request byte ranges. Fixed to query.
    MUXER Audio/video muxing implementation. Fixed to avformat.

    YouTube login and reporting

    Variable Purpose
    YOUTUBE_REMOTE_LOGIN_ENABLED Enables remote login in Token and supplies Server's initial admin-setting default.
    YOUTUBE_REMOTE_LOGIN_INTERNAL_TOKEN Shared secret authenticating internal remote-login requests.
    YOUTUBE_SESSION_ENCRYPTION_KEY Server key for encrypting stored YouTube sessions.
    YOUTUBE_REMOTE_LOGIN_INTERNAL_TOKEN_FILE, YOUTUBE_SESSION_ENCRYPTION_KEY_FILE File-based alternatives used by stable Compose for those secrets.
    YOUTUBE_REMOTE_LOGIN_TTL_MS Remote-login session lifetime. Root Compose passes this to Server, but does not explicitly pass it to Token.
    YOUTUBE_REMOTE_LOGIN_MAX_SESSIONS Remote-login concurrency limit, passed to Server and Token.
    YOUTUBE_REMOTE_LOGIN_FRAME_FPS Remote-browser frame rate, used by Token.
    YOUTUBE_REMOTE_LOGIN_MAX_FRAME_BYTES Remote-browser frame size limit, passed to Server and Token.
    GITHUB_REPO Destination repository in the prefilled GitHub issue link generated from an admin bug report. Used, not obsolete.
    GITHUB_ISSUE_TEMPLATE Template included in that link. Used, but the default bug_report_backend.md is outdated; the repository now contains bug_report.yml.

    This covers the root .env.example and the application settings explicitly passed by the two Compose files. Individual services also support additional advanced settings.

    I'll add this to the documentation soon too, so u don't have to dig through the code to understand what each variable does. Thx for pointing this out :)

  2. Priveetee commented on Sep 6, 2026

    @Priveetee
    Member

    About the connection errors, I checked both the frontend and Compose files, and yeah, there are hardcoded addresses in both.

    Nginx always tries to reach typetype-server:8080, typetype-token:8081 and typetype-downloader:18093. Those names normally work on the shared Docker Compose network, but if your setup uses different names or separate networks, Nginx won't find them.

    Several addresses in Compose are also set directly instead of reading from .env, so even though the services support configurable URLs, changing .env doesn't update those values.

    For the variable u mentioned, YOUTUBE_REMOTE_LOGIN_CALLBACK_ORIGIN only tells Token which callback origin it is allowed to accept. Server builds the callback address using YOUTUBE_REMOTE_LOGIN_CALLBACK_BASE_URL. Those two need to agree, but neither changes the addresses Nginx uses.

    So this needs a fix in both Nginx and Compose to make the service addresses configurable consistently. Until then, a custom setup needs the addresses changed directly in Compose and a matching Nginx configuration.

    Could u share the relevant service names, networks and URL settings from your setup, with passwords and tokens removed? I'd like to understand how everything is connected before settling on the fix. Thx!

  3. moved this from Backlog to In progress in TypeType Roadmapon Sep 8, 2026
  4. Priveetee commented on Sep 11, 2026

    @Priveetee
    Member

    I fixed the hardcoded service URLs in #265 (024f485), and the fix is included in TypeType 1.8.1.

    Could u update the stack files themselves to 1.8.1 and test again? Pulling the images alone does not replace an old local docker-compose.yml or nginx.conf, so an existing stack can still use the old addresses.

    I’m closing this for now. If anything still looks wrong after the update, please let me know and I’ll reopen the issue to investigate further.

  5. moved this from In progress to Done in TypeType Roadmapon Sep 11, 2026
  6. disconn3ct commented on Sep 12, 2026

    @disconn3ct
    Author

    It looks good. There are still a lot of oddities (for example, renaming DOWNLOADER_S3_ACCESS_KEY to S3_ACCESS_KEY) but the hardcoded urls seem to all be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: frontendFrontend web apparea: self-hostingSelf-hosting, installation, updates, and deployment stackbugSomething isn't workingpriority: mediumMedium priority

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions