{"id":14128415,"url":"https://github.com/lazy-ants/remote-manager","last_synced_at":"2025-08-03T23:30:46.670Z","repository":{"id":72991423,"uuid":"262087010","full_name":"lazy-ants/remote-manager","owner":"lazy-ants","description":"This tool is intended for mass management and monitoring of remote servers. Getting information about the status of remote servers, analyze it, provide maintenance as easily as possible, extend for your needs.","archived":false,"fork":false,"pushed_at":"2021-11-17T17:56:12.000Z","size":138,"stargazers_count":27,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-16T16:22:31.448Z","etag":null,"topics":["cli","devops","docker","monitoring","php","productivity","remote-control","symfony","tools"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/lazy-ants.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"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":"2020-05-07T15:23:30.000Z","updated_at":"2023-06-01T05:08:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a507ce4-8035-4fd2-9fd1-187b003591f4","html_url":"https://github.com/lazy-ants/remote-manager","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazy-ants%2Fremote-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazy-ants%2Fremote-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazy-ants%2Fremote-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lazy-ants%2Fremote-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lazy-ants","download_url":"https://codeload.github.com/lazy-ants/remote-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228571844,"owners_count":17938772,"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","devops","docker","monitoring","php","productivity","remote-control","symfony","tools"],"created_at":"2024-08-15T16:01:41.589Z","updated_at":"2024-12-07T06:31:11.606Z","avatar_url":"https://github.com/lazy-ants.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Remote Manager\n\n## Setup\n\n### 0. Preparation\n\nYou need to install docker and optionally docker compose in order to use this tool.\n\n### 1. Clone project\n\n```bash\ngit clone git@github.com:lazy-ants/remote-manager.git\ncd remote-manager\n```\n\n### 2. Initial setup\n```bash\nmake init\n```\n\nor in case of updating in the future:\n```bash\nmake update\n```\n\n### 3. Add server connection to the config\n\nOpen **config.json** with the editor of your choice and add server connections.\nIt means \"user@domain:port\", however the port is optional.\n\n### 4. Running configuration\nWith docker:\n```\ndocker run -it --rm -v \"$PWD\":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager ./run app:validate-config\n```\nWith docker-compose:\n```\ndocker-compose run remote-manager ./run app:validate-config\n```\n#### Result\n\n![validate](https://user-images.githubusercontent.com/249065/81821063-ba509200-9531-11ea-85eb-ef735ab42f1f.png)\n\n### 5. Run you first command to see e.g. the server uptime\n\nTo test this setup run\n\nWith docker\n```\ndocker run -it --rm -v \"$PWD\":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager ./run app:uptime\n```\n\nwith docker composer:\n```\ndocker-compose run remote-manager ./run app:uptime\n```\n\n## Available commands\n\n### app:docker-compose-version  \nGet docket compose version\n\n![docker-compose](https://user-images.githubusercontent.com/249065/81821076-bd4b8280-9531-11ea-8a7f-3f5bbf1418bd.png)\n\n\n### app:docker-prune\nPrune old docker data\n\n![docker-prune](https://user-images.githubusercontent.com/249065/81821073-bd4b8280-9531-11ea-940d-cff7a7cd0c61.png)\n\n### app:docker-ps\nShow docker process status\n\n![docker-ps](https://user-images.githubusercontent.com/249065/81821072-bcb2ec00-9531-11ea-8fd6-51513f406ab1.png)\n\n### app:kernel\nGet server kernels\n\n![kernel](https://user-images.githubusercontent.com/249065/81821068-bb81bf00-9531-11ea-916a-02daef2b77f4.png)\n\n### app:ls\nRun ls command on all servers\n\n#### Examples\n- `app:ls` default value, with *-lha* argumetns list the current directory\n- `app:ls './ -la'` list the current directory\n- `app:ls '../ -la'` list the up directory\n- `app:ls '/ -la'` list the root directory\n\n![ls](https://user-images.githubusercontent.com/249065/81821048-b6bd0b00-9531-11ea-93a7-e58422c77b2b.png)\n\n### app:os                      \nGet server OS\n\n![os](https://user-images.githubusercontent.com/249065/81821066-bb81bf00-9531-11ea-93be-cdd89c1b5f3a.png)\n\n### app:check-reboot                  \nChecks whether a reboot is required\nUse option \"--reboot\" or \"-r\" to immediately reboot if required\n\n![reboot](https://user-images.githubusercontent.com/249065/81821065-bae92880-9531-11ea-9b70-59d6d8d941d1.png)\n\n### app:system-info\n- note: [sudo required]\n- Get system information\n\n![system-info](https://user-images.githubusercontent.com/249065/81821061-ba509200-9531-11ea-8829-0fb9ca619105.png)\n\n### app:ufw\n- note: [sudo required]\n- Get UFW status\n\n![system-info](https://user-images.githubusercontent.com/249065/82075698-f116db80-96dc-11ea-8fa4-94960b5fc44e.png)\n\n### app:upgrade\n- note: [sudo required]\n- Upgrade server packages\n\n![upgrade](https://user-images.githubusercontent.com/249065/81821055-b91f6500-9531-11ea-8480-722a2cc65fbe.png)\n\n### app:uptime                  \nGet server uptime\n\n![uptime](https://user-images.githubusercontent.com/249065/81821064-bae92880-9531-11ea-989d-e64e5eff0ac7.png)\n\n### app:validate-config         \nValidate server instances config\n\n![validate](https://user-images.githubusercontent.com/249065/81821063-ba509200-9531-11ea-85eb-ef735ab42f1f.png)\n\n## FAQ\n\n### Using tags\n\nYou can add to each server instance in the config.json tags, e.g.\n```json\n{\n  \"instances\": [\n    {\n      \"name\": \"example.com\",\n      \"connection-string\": \"user@example1.com\",\n      \"tags\": \"staging,client1\"\n    },\n    {\n      \"name\": \"example.org\",\n      \"connection-string\": \"otheruser@example2.org\",\n      \"tags\": \"live,client1\"\n    },\n    {\n      \"name\": \"example.net\",\n      \"connection-string\": \"someotheruser@example3.net\",\n      \"tags\": \"staging,client3\"\n    }\n  ]\n}\n```\n\nand call every command with tags of servers you need:\n\n```bash\napp:uptime -t client1\napp:uptime -t client2,staging\n```\n\n### Login into console\n\nIf you want to login into the docker container:\n```\nreman-cli bash\n```\n\n### Running command needed the sudo password\n\nPrepare servers you want to manage:\n\nFirst of all, you need a possibility to provide the sudo password in a secure way as an environment variable to your server (for sure in case you need the possibility of running commands with sudo).\nTherefore, On each server you want to manage edit \n```\nsudo nano /etc/ssh/sshd_config\n``` \nadd at the end of the config:\n```\nAcceptEnv PASSWORD\n```\nreload the sshd server e.g.\n```\nsudo service sshd reload\n```\n\nAfter that you either need to provide the sudo password in the .env.local file in case the most of your servers use the same sudo password or you can add in the config.json file in each configuration sectiona using the key \"sudo-ppassword\".  \n\n### Adding aliases\nIn case you want to simplify using this tool you may want to add aliases.\n\nIn case you have OS specific options like \"UseKeychain yes\" on MacOS in your .ssh/config: \n```\nalias reman-cli='docker run -it --rm -v \"$PWD\":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager'\nalias reman-console='docker run -it --rm -v \"$PWD\":/usr/src/remote-manager -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub -v ~/.ssh/id_rsa:/root/.ssh/known_hosts remote-manager ./run'\n```\n\nOtherwise you can simple map the whole .ssh directory:\n```\nalias reman-cli='docker run -it --rm -v \"$PWD\":/usr/src/remote-manager -v ~/.ssh:/root/.ssh remote-manager'\nalias reman-console='docker run -it --rm -v \"$PWD\":/usr/src/remote-manager -v ~/.ssh:/root/.ssh remote-manager ./run'\n```\n\nOr if you prefer docker-compose:\n\n```\nalias reman-cli='docker-compose run remote-manager bash'\nalias reman-console='docker-compose run remote-manager ./run'\n```\n\n## Contributing\n\nRemote Manager is an open source project. If you find bugs or have proposal please create [issue](https://github.com/lazy-ants/remote-manager/issues) or Pull Request\n\n## License\n\nCopyright 2021 Lazy Ants\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazy-ants%2Fremote-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flazy-ants%2Fremote-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flazy-ants%2Fremote-manager/lists"}