{"id":20445920,"url":"https://github.com/planta7/servant","last_synced_at":"2025-07-20T12:32:29.014Z","repository":{"id":92700528,"uuid":"607617712","full_name":"planta7/servant","owner":"planta7","description":"Create a local server from any location on your computer and expose it to Internet. You can also expose any server running locally ;)","archived":false,"fork":false,"pushed_at":"2024-02-09T22:46:06.000Z","size":998,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T00:45:35.878Z","etag":null,"topics":["cli","development-tools","golang","http-server","local","tunneling"],"latest_commit_sha":null,"homepage":"https://github.com/planta7/servant","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/planta7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-28T10:40:37.000Z","updated_at":"2024-02-20T07:44:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"600b0058-9ce8-4189-bde0-ee42785655aa","html_url":"https://github.com/planta7/servant","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.20454545454545459","last_synced_commit":"af2ca26274ee58a1df788a998e7adcee13591c35"},"previous_names":["planta7/servant","planta7/serve"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/planta7/servant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planta7%2Fservant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planta7%2Fservant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planta7%2Fservant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planta7%2Fservant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/planta7","download_url":"https://codeload.github.com/planta7/servant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/planta7%2Fservant/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266127212,"owners_count":23880420,"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":["cli","development-tools","golang","http-server","local","tunneling"],"created_at":"2024-11-15T10:15:55.378Z","updated_at":"2025-07-20T12:32:28.991Z","avatar_url":"https://github.com/planta7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"./assets/logo.png\" alt=\"servant\" width=\"100\"\u003e\n  \u003cbr\u003e\n  servant\n  \u003cbr\u003e\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003eEasily create a local server for your files\u003cbr/\u003eand expose it to the internet through localtunnel.\u003c/h4\u003e\n\u003ch4 align=\"center\"\u003eYou can also expose any server running locally ;)\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/planta7/servant/actions/workflows/ci.yaml\"\u003e\n    \u003cimg src=\"https://github.com/planta7/servant/actions/workflows/ci.yaml/badge.svg\" alt=\"CI badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/planta7/servant/actions/workflows/release.yaml\"\u003e\n    \u003cimg src=\"https://github.com/planta7/servant/actions/workflows/release.yaml/badge.svg\" alt=\"Release badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/planta7/servant\"\u003e\n    \u003cimg src=\"https://pkg.go.dev/badge/github.com/planta7/servant.svg\" alt=\"GO pkg badge\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#key-features\"\u003eKey features\u003c/a\u003e •\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e •\n  \u003ca href=\"#want-to-contribute\"\u003eWant to contribute?\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n![screenshot](assets/servant.png)\n\n### Key features\n\n+ Create a local HTTP server from any directory and expose it to Internet\n+ Expose any server already running locally\n+ Linux, MacOS and Windows binaries\n+ Bind any local address to the server\n+ Customize it with global or configuration files, environment variables or flags\n+ Support for basic authentication\n+ TLS support with optional embedded certificate\n+ Configure CORS with a simple flag\n+ Supercharged TUI with advanced features\n\n### Installation\n---\n\n#### Manual installation\nYou can download the latest release binaries available in the\n[releases section](https://github.com/planta7/servant/releases/latest) of the repository.\n\n\u003e [!NOTE]\n\u003e Keep in mind that if you install it manually, you will not have the ability to update automatically when there\n\u003e is a new version of `servant`.\n\n#### Package manager\nIn macOS/Linux environments you can install `servant` using [Homebrew](https://brew.sh):\n\n```shell\nbrew install planta7/tap/servant\n```\n\n#### Install from sources\n\n```shell\n$ git clone https://www.github.com/planta7/servant.git\n$ cd servant\n$ go build ./...\n```\n\n\u003e **Note**\n\u003e Requires GO \u003e= 1.20\n\n#### Binaries\nYou can download the binaries from the [releases](https://github.com/planta7/servant/releases) page, currently this is the only way to install it on Windows systems.\n\n### Usage\n---\n\nTo start a server in the current path, simply run `$ servant local`. In addition to the _TL;DR_ execution,\nthere are also a number of options that you can configure to suit your needs:\n\n```shell\nUsage:\n  servant local [path] [flags]\n\nAliases:\n  local, l\n\nFlags:\n      --auth string        username:password for basic auth (default is empty)\n      --auto-tls           Start with embedded certificate (default is false)\n      --cert-file string   Path to certificate (default is empty)\n  -c, --cors               Enable CORS (default is false)\n  -e, --expose             Expose through localtunnel (default is false)\n  -s, --subdomain          Subdomain (default is random)\n  -h, --help               help for local\n      --host string        Server host (default is empty)\n      --key-file string    Path to key\n  -l, --launch             Launch default browser (default is false)\n  -p, --port int           Listen on port (default is random)\n\nGlobal Flags:\n      --config string   config file (default is ./servant and $HOME/.servant)\n      --disable-tui     Disable TUI (default is false)\n  -v, --verbose         verbose mode (default is false)\n```\n\n\u003e [!IMPORTANT]\n\u003e There is also the powerful remote command that allows you to expose a local server in the same way you do with ngrok\n\u003e and for which I have not yet been able to write documentation. You can see all the options by running `server remote -h`.\n\n#### Examples\n\nTo start a local server on port `8080` and automatically launch the system's default browser use the following command:\n\n```shell\nservant local -p 8080 -l\n```\n\n`servant` will bind the server to the `loopback` address in addition to the private IP that is configured on the system's\ndefault interface. If you want to bind the server to a specific IP, use the command:\n\n```shell\nservant local --host 192.168.3.12\n```\n\nThe above examples start an HTTP server, but if you need to launch an HTTPS server, you can easily do so by providing\nthe certificate file and its key:\n\n```shell\nservant local --cert-file /path/to/cert-file --key-file /path/to/key-file\n```\n\nOr if you prefer, you can let `servant` generate a self-signed certificate and key randomly at startup.\n\n```shell\nservant local --auto-tls\n```\n\nIf you are using embedded or self-signed certificates you will receive a security alert in the browser indicating that the\ncertificate is not trusted, you can safely ignore the warning, or you can provide a valid certificate to `servant`.\n\nWhatever the combination of parameters, `--verbose` or `-v` flag enables detailed output of what is happening on\nthe server.\n\n\u003e [!NOTE]\n\u003e **Bonus tip!** You can use flags in a more elegant way if you chain them together.\n\u003e ```shell\n\u003e servant local -clvp 8080\n\u003e # is equivalent to\n\u003e servant local -c -l -v -p 8080\n\u003e # and\n\u003e servant local --cors --launch --verbose --port 8080\n\u003e ```\n\n### Configuration\n---\n\nYou can configure `servant` using flags, but you also have other options:\n\n+ `.servant` configuration file (here is an [example](.servant.sample))\n  + Current directory (local)\n  + `$HOME` directory (global)\n  + Specified by the flag `--config`\n+ Using environment variables\n  + `SERVANT_AUTH`\n  + `SERVANT_AUTO_TLS`\n  + `SERVANT_CERT_FILE`\n  + `SERVANT_CORS`\n  + `SERVANT_DISABLE_TUI`\n  + `SERVANT_EXPOSE`\n  + `SERVANT_HOST`\n  + `SERVANT_KEY_FILE`\n  + `SERVANT_LAUNCH`\n  + `SERVANT_PORT`\n  + `SERVANT_SUBDOMAIN`\n\nPriority for applying the value to parameters is as follows:\n\n1. Flags\n2. Environment variables\n3. Configuration file\n   1. Specified by `--config`\n   2. Local\n   3. Global\n4. Defaults\n\nThe result will be a merge after applying the above order.\n\n\u003e **Note**\n\u003e You can check the value of the parameters by starting `servant` with `-v` or `--verbose`.\n\n### Want to contribute?\n---\n\nCheck out [`CONTRIBUTING.md`](CONTRIBUTING.md) documentation.\n\n\n### License\n---\n\nMIT Licensed. Checkout [`LICENSE`](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanta7%2Fservant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplanta7%2Fservant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplanta7%2Fservant/lists"}