{"id":17843043,"url":"https://github.com/tobycm/code-server-instance-manager-nginx","last_synced_at":"2025-03-20T05:30:53.491Z","repository":{"id":138384112,"uuid":"574197272","full_name":"tobycm/code-server-instance-manager-nginx","owner":"tobycm","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-28T18:00:33.000Z","size":101,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T23:20:02.302Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/tobycm.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":"2022-12-04T18:12:55.000Z","updated_at":"2025-02-27T08:30:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ef5e14b-020d-485e-88af-15214ec57c84","html_url":"https://github.com/tobycm/code-server-instance-manager-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobycm%2Fcode-server-instance-manager-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobycm%2Fcode-server-instance-manager-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobycm%2Fcode-server-instance-manager-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobycm%2Fcode-server-instance-manager-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobycm","download_url":"https://codeload.github.com/tobycm/code-server-instance-manager-nginx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056404,"owners_count":20390719,"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-10-27T21:21:56.088Z","updated_at":"2025-03-20T05:30:53.114Z","avatar_url":"https://github.com/tobycm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# code-server Instance Manager\n\n(lots of tech debts incoming)\n\n## How to setup\n\n### Prerequisites\n\n- Passwordless sudo\n- Python 3.7\n- A text editor\n- Smileys :)\n\n### Step 1: Create and activate venv\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\n```\n\n### Step 2: Install dependencies\n\n```bash\npython3 -m pip install -r requirements.txt\n```\n\n### Step 3: Initialize configs\n\n```bash\ncp .example.env .env\ncp users.example.json users.json\n```\n\n### Step 4.3: Create unix users\n\n(just use `adduser`)\n\n### Step 4.6: Ask for their Google Account email (sorry I didn't implement GitHub)\n\n(just hop on Discord or something)\n\n### Step 4.9: Add them to users.json\n\nReplace `user_email` with their email and `unix_username` with their unix username\n\n### Step 5: Change values in `.env`\n\n`API_PASSWD`: set whatever you want\n\n`SERVER_ADMIN`: user that is running this Python program (needs sudo perms too)\n\n`OAUTH2_DOMAIN`: domain that point to this program\n\n`VSCODE_DOMAIN`: domain that point to nginx in order to route requests (can leave this blank atm)\n\n`EXPIRE_TIME`: minutes after code-server expired to shutdown\n\n### Step 6: Acquire GitHub OAuth2 client ID and secret\n\nAfter you have acquired these sacred objects please put them in the following order (in `.env`):\n\n`GITHUB_CLIENT_ID`: GitHub client ID\n\n`GITHUB_CLIENT_SECRET`: GitHub client secret\n\n### Step outside and enjoy the sunlight view\n\nYou can set `DEBUG` to true if you want Popen's logs to output to stdout\n\n### Step 7: Watch [this](https://youtube.com/watch?v=dQw4w9WgXcQ)\n\n### Step 8: Chill\n\nAfter you have set this up, please setup [nginx for user routing](https://github.com/tobycm/nginx-code-server-router/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobycm%2Fcode-server-instance-manager-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobycm%2Fcode-server-instance-manager-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobycm%2Fcode-server-instance-manager-nginx/lists"}