{"id":29167205,"url":"https://github.com/anduin2017/init-server","last_synced_at":"2025-07-01T09:08:10.635Z","repository":{"id":296046115,"uuid":"992134507","full_name":"Anduin2017/Init-Server","owner":"Anduin2017","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-24T04:06:03.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-24T05:23:53.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anduin2017.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,"zenodo":null}},"created_at":"2025-05-28T17:09:53.000Z","updated_at":"2025-06-24T04:06:07.000Z","dependencies_parsed_at":"2025-05-28T19:16:02.523Z","dependency_job_id":null,"html_url":"https://github.com/Anduin2017/Init-Server","commit_stats":null,"previous_names":["anduin2017/init-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Anduin2017/Init-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2FInit-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2FInit-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2FInit-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2FInit-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anduin2017","download_url":"https://codeload.github.com/Anduin2017/Init-Server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2FInit-Server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933316,"owners_count":23386784,"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":"2025-07-01T09:08:09.218Z","updated_at":"2025-07-01T09:08:10.621Z","avatar_url":"https://github.com/Anduin2017.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Init Server\n\nThis is a script to initialize a new Ubuntu server with the following features:\n\n* Create your own user with sudo privileges\n* Change hostname\n* Only allow SSH key login\n* Root login disabled, password authentication disabled\n* Have a random password stored securely at /etc/\u003cnew_user\u003e.pass\n* Have SSH key copied to authorized_keys so you can log in without a password\n* Be hardened with UFW, Fail2Ban and allowed SSH connections(only)\n* Have BBR enabled for better network performance\n* Have the latest HWE kernel installed\n* Have the best mirror selected for package updates\n* Have snap removed\n* Have CPU performance tuned to 'performance' mode\n* Have timezone set to GMT\n* Have all unnecessary users removed (Check /etc/passwd for remaining users)\n* Have all unnecessary packages removed\n* Have the latest updates installed\n* Have sysbench installed for performance testing\n* Have a final benchmark run to verify CPU performance\n* Have a final cleanup of unnecessary packages\n\n## How to use\n\nFisrt, buy a new Ubuntu server from your favorite provider.\n\nUsually they will give you a root user with a password and SSH key access.\n\nRun the following commands on your **local machine**!\n\n```bash\ninit_link=\"https://gitlab.aiursoft.cn/anduin/init-server/-/raw/master/init.sh?ref_type=heads\"\nwget $init_link -O init.sh\nchmod +x init.sh\n```\n\nThen run **on your Local Machine**:\n\n```bash\n./init.sh \u003corig_user\u003e \u003corig_pass\u003e \u003cserver\u003e \u003cnew_hostname\u003e \u003cnew_user\u003e\n```\n\nFor example:\n\n```bash\n./init.sh root \"old_password@\" 1.2.3.4 my-new-hostname my-new-user\n```\n\nIf you prefer use SSH to login, simply provide an empty password:\n\n```bash\n./init.sh user \"\" 1.2.3.4 my-new-hostname user\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanduin2017%2Finit-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanduin2017%2Finit-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanduin2017%2Finit-server/lists"}