{"id":13513945,"url":"https://github.com/basecamp/thruster","last_synced_at":"2025-10-07T21:14:57.418Z","repository":{"id":226445172,"uuid":"739485167","full_name":"basecamp/thruster","owner":"basecamp","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-18T11:34:45.000Z","size":114,"stargazers_count":1065,"open_issues_count":29,"forks_count":38,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-07-18T05:34:51.862Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basecamp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-05T17:19:07.000Z","updated_at":"2025-07-15T18:00:14.000Z","dependencies_parsed_at":"2024-05-01T12:59:08.043Z","dependency_job_id":"9a36e1b5-74f2-4714-9773-84f40a2d8f9b","html_url":"https://github.com/basecamp/thruster","commit_stats":null,"previous_names":["basecamp/thruster"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/basecamp/thruster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fthruster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fthruster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fthruster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fthruster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basecamp","download_url":"https://codeload.github.com/basecamp/thruster/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basecamp%2Fthruster/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265721661,"owners_count":23817480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T05:00:40.781Z","updated_at":"2025-10-07T21:14:57.396Z","avatar_url":"https://github.com/basecamp.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Thruster\n\nThruster is an HTTP/2 proxy for simple production-ready deployments of Rails\napplications. It runs alongside the Puma webserver to provide a few additional\nfeatures that help your app run efficiently and safely on the open Internet:\n\n- HTTP/2 support\n- Automatic TLS certificate management with Let's Encrypt\n- Basic HTTP caching of public assets\n- X-Sendfile support and compression, to efficiently serve static files\n\nThruster aims to be as zero-config as possible. It has no configuration file,\nand most features are automatically enabled with sensible defaults. The goal is\nthat simply running your Puma server with Thruster should be enough to get a\nproduction-ready setup.\n\nThe only exception to this is TLS provisioning: in order for Thruster to\nprovision TLS certificates, it needs to know which domain those certificates\nshould be for. So to use TLS, you need to set the `TLS_DOMAIN` environment\nvariable. If you don't set this variable, Thruster will run in HTTP-only mode.\n\nThruster also wraps the Puma process so that you can use it without managing\nmultiple processes yourself. This is particularly useful when running in a\ncontainerized environment, where you typically won't have a process manager\navailable to coordinate the processes. Instead you can use Thruster as your\n`CMD`, and it will manage Puma for you.\n\nThruster was originally created for the [ONCE](https://once.com) project, where\nwe wanted a no-fuss way to serve a Rails application from a single container,\ndirectly on the open Internet. We've since found it useful for simple\ndeployments of other Rails applications.\n\n\n## Installation\n\nThruster is distributed as a Ruby gem. Because Thruster is written in Go, we\nprovide several pre-built platform-specific binaries. Installing the gem will\nautomatically fetch the appropriate binary for your platform.\n\nTo install it, add it to your application's Gemfile:\n\n```ruby\ngem 'thruster'\n```\n\nOr install it globally:\n\n```sh\n$ gem install thruster\n```\n\n\n## Usage\n\nTo run your Puma application inside Thruster, prefix your usual command string\nwith `thrust`. For example:\n\n```sh\n$ thrust bin/rails server\n```\n\nOr with automatic TLS:\n\n```sh\n$ TLS_DOMAIN=myapp.example.com thrust bin/rails server\n```\n\n\n## Custom configuration\n\nIn most cases, Thruster should work out of the box with no additional\nconfiguration. But if you need to customize its behavior, there are a few\nenvironment variables that you can set.\n\n| Variable Name         | Description                                             | Default Value |\n|-----------------------------|---------------------------------------------------------|---------------|\n| `TLS_DOMAIN`                | Comma-separated list of domain names to use for TLS provisioning. If not set, TLS will be disabled. | None |\n| `TARGET_PORT`               | The port that your Puma server should run on. Thruster will set `PORT` to this value when starting your server. | 3000 |\n| `CACHE_SIZE`                | The size of the HTTP cache in bytes. | 64MB |\n| `MAX_CACHE_ITEM_SIZE`       | The maximum size of a single item in the HTTP cache in bytes. | 1MB |\n| `GZIP_COMPRESSION_ENABLED`  | Whether to enable gzip compression for static assets. Set to `0` or `false` to disable. | Enabled |\n| `X_SENDFILE_ENABLED`        | Whether to enable X-Sendfile support. Set to `0` or `false` to disable. | Enabled |\n| `MAX_REQUEST_BODY`          | The maximum size of a request body in bytes. Requests larger than this size will be refused; `0` means no maximum size is enforced. | `0` |\n| `STORAGE_PATH`              | The path to store Thruster's internal state. Provisioned TLS certificates will be stored here, so that they will not need to be requested every time your application is started. | `./storage/thruster` |\n| `BAD_GATEWAY_PAGE`          | Path to an HTML file to serve when the backend server returns a 502 Bad Gateway error. If there is no file at the specific path, Thruster will serve an empty 502 response instead. Because Thruster boots very quickly, a custom page can be a useful way to show that your application is starting up. | `./public/502.html` |\n| `HTTP_PORT`                 | The port to listen on for HTTP traffic. | 80 |\n| `HTTPS_PORT`                | The port to listen on for HTTPS traffic. | 443 |\n| `HTTP_IDLE_TIMEOUT`         | The maximum time in seconds that a client can be idle before the connection is closed. | 60 |\n| `HTTP_READ_TIMEOUT`         | The maximum time in seconds that a client can take to send the request headers and body. | 30 |\n| `HTTP_WRITE_TIMEOUT`        | The maximum time in seconds during which the client must read the response. | 30 |\n| `ACME_DIRECTORY`            | The URL of the ACME directory to use for TLS certificate provisioning. | `https://acme-v02.api.letsencrypt.org/directory` (Let's Encrypt production) |\n| `EAB_KID`                   | The EAB key identifier to use when provisioning TLS certificates, if required. | None |\n| `EAB_HMAC_KEY`              | The Base64-encoded EAB HMAC key to use when provisioning TLS certificates, if required. | None |\n| `FORWARD_HEADERS`           | Whether to forward X-Forwarded-* headers from the client. | Disabled when running with TLS; enabled otherwise |\n| `LOG_REQUESTS`              | Log all requests. Set to `0` or `false` to disable request logging | Enabled |\n| `DEBUG`                     | Set to `1` or `true` to enable debug logging. | Disabled |\n\nTo prevent naming clashes with your application's own environment variables,\nThruster's environment variables can optionally be prefixed with `THRUSTER_`.\nFor example, `TLS_DOMAIN` can also be written as `THRUSTER_TLS_DOMAIN`. Whenever\na prefixed variable is set, it will take precedence over the unprefixed version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Fthruster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasecamp%2Fthruster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasecamp%2Fthruster/lists"}