{"id":41419167,"url":"https://github.com/baileyherbert/caprover-deploy","last_synced_at":"2026-01-23T14:00:11.457Z","repository":{"id":246804415,"uuid":"823439905","full_name":"baileyherbert/caprover-deploy","owner":"baileyherbert","description":"A proxy server for CapRover to get build logs and errors when deploying with app tokens.","archived":false,"fork":false,"pushed_at":"2025-02-11T21:33:22.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T21:43:46.532Z","etag":null,"topics":["app-tokens","caprover"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/baileyherbert/caprover-deploy","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baileyherbert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-03T03:34:48.000Z","updated_at":"2025-08-02T00:05:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"984ce0ff-e11d-46dc-acc3-2fc7e59ec554","html_url":"https://github.com/baileyherbert/caprover-deploy","commit_stats":null,"previous_names":["baileyherbert/caprover-deploy"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/baileyherbert/caprover-deploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baileyherbert%2Fcaprover-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baileyherbert%2Fcaprover-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baileyherbert%2Fcaprover-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baileyherbert%2Fcaprover-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baileyherbert","download_url":"https://codeload.github.com/baileyherbert/caprover-deploy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baileyherbert%2Fcaprover-deploy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28693438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["app-tokens","caprover"],"created_at":"2026-01-23T14:00:07.685Z","updated_at":"2026-01-23T14:00:11.444Z","avatar_url":"https://github.com/baileyherbert.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CapRover Deploy\n\nThis is a small app that pairs with CapRover to enable proper remote deployments when using app tokens.\n\nNormally, deployments that use app tokens cannot receive build logs, and have no way of knowing if the build was\nsuccessful. This app will proxy those deployments and treat them as if they were authenticated with a master password,\nwhile still ensuring all the same protections of an app token.\n\n## Installation\n\nCreate a new app from the CapRover dashboard called `deploy` or similar, and set a new environment variable called\n`CAPROVER_PASSWORD` to the plain-text master password for CapRover. It is of course recommended to use a secure,\nrandomly generated password rather than a personal one.\n\n\u003e Don't want to store your password in plain-text? See the bottom of this file for how to protect it.\n\nNow deploy the `baileyherbert/caprover-deploy:latest` image from the deployment tab, and wait for the success message to\nappear in the app logs. The app is now up and running, and ready to proxy your deployments. No other configuration is\nnecessary.\n\n## Using with the CapRover CLI\n\nFrom now on, when you deploy using the CapRover CLI, you will need to use the app's hostname that was automatically\nassigned by CapRover. In the example above, the hostname might be `deploy.demo.example.com`.\n\nInstead of sending your app token with the `--appToken` flag, you will instead use the `--caproverPassword` or `-p`\nflag to provide both the app name and the token, delimited by a colon, like shown below. You will still need to provide\nthe app name in the `-a` flag as well.\n\n```\n-a APP_NAME -p APP_NAME:APP_TOKEN\n```\n\nUnfortunately, the CapRover CLI will automatically prepend \"captain\" to the beginning of our hostname if it isn't\nalready present, so we must set the `CAPROVER_ADMIN_DOMAIN_OVERRIDE` environment variable to the name of our app to\nchange the expected subdomain.\n\nThis is what the full deployment script would look like:\n\n```sh\nexport CAPROVER_ADMIN_DOMAIN_OVERRIDE=deploy\ncaprover deploy -u deploy.demo.domain.com -a $APP_NAME -p $APP_NAME:$TOKEN\n```\n\n## Using with GitHub Actions\n\nThe following example can be placed inside the steps of a GitHub Actions workflow job. Despite authenticating with an\napp token, the workflow will receive the build logs and will know whether or not the deployment was successful.\n\n```yml\n- name: Install dependencies\n  run: npm i -g caprover\n\n- name: Deploy to server\n  run: caprover deploy -u deploy.demo.domain.com\n    env:\n      CAPROVER_ADMIN_DOMAIN_OVERRIDE: deploy\n      CAPROVER_PASSWORD: app-name:${{ secrets.CAPROVER_APP_TOKEN }}\n      CAPROVER_APP: app-name\n      CAPROVER_BRANCH: ${{ github.ref }}\n```\n\n## Using it as the root captain domain\n\nBy setting the `ALLOW_WEB_APP` environment variable to `true`, the application will proxy the entire captain web app,\nrather than only the API. Depending on your situation and how you expose your web server to the public internet, this\nmay allow you to replace the `captain` subdomain entirely.\n\n## Protecting the master password\n\nIf you aren't comfortable storing your CapRover master password in the app's environment variables, you may optionally\nobfuscate it. Run the `node` command in your terminal to open a shell, and paste in the following obfuscator function:\n\n```js\nconst obfs = (password) =\u003e {\n\tconst buffer = Buffer.from(password, 'utf8'), key = require('crypto').randomBytes(256);\n\tfor (let i = 0; i \u003c buffer.length; i++) buffer[i] ^= key[i % key.length];\n\tconsole.log('obfs:' + Buffer.concat([key, buffer]).toString('base64'));\n}\n```\n\nThen, call the function with your master password:\n\n```js\nobfs('password')\n```\n\nThis will return an obfuscated version of the password, which will be a long base64-encoded string that looks something\nlike below. Make sure to remove any surrounding quotes when you copy it.\n\n```\nobfs:BNEwCfV9Boh8QAnL+Y5IGMiRv6/YmBW1NtbbtFE640rgPidCNZuxFM2bwrNxsJxUdCXAs/P7ZUUcJeml9...\n```\n\nYou can then paste this obfuscated password into the `CAPROVER_PASSWORD` environment variable. Though the password is\nstill easily obtainable with server access, it cannot be accidentally viewed, and is not compromised even if the\nenvironment variables are shown in a screenshot or video.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaileyherbert%2Fcaprover-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaileyherbert%2Fcaprover-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaileyherbert%2Fcaprover-deploy/lists"}