{"id":46503359,"url":"https://github.com/cslant/dotfiles_server","last_synced_at":"2026-03-06T14:22:30.290Z","repository":{"id":191365493,"uuid":"656474400","full_name":"cslant/dotfiles_server","owner":"cslant","description":"This script is used to set up a new server with my dotfiles.","archived":false,"fork":false,"pushed_at":"2026-02-28T08:49:54.000Z","size":165,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-28T14:13:59.218Z","etag":null,"topics":["dotfiles","script","server","vps","vps-script","vps-setup"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/cslant.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-21T03:09:16.000Z","updated_at":"2026-02-28T08:49:58.000Z","dependencies_parsed_at":"2024-05-04T04:29:10.552Z","dependency_job_id":"9d258023-c174-4d30-92aa-08970f28181e","html_url":"https://github.com/cslant/dotfiles_server","commit_stats":{"total_commits":45,"total_committers":2,"mean_commits":22.5,"dds":0.0444444444444444,"last_synced_commit":"1b49d488e7c2d2b5a6214b39a800fd7cdb90c7c6"},"previous_names":["tanhongit/dotfiles_server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cslant/dotfiles_server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cslant%2Fdotfiles_server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cslant%2Fdotfiles_server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cslant%2Fdotfiles_server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cslant%2Fdotfiles_server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cslant","download_url":"https://codeload.github.com/cslant/dotfiles_server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cslant%2Fdotfiles_server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30180659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T12:39:21.703Z","status":"ssl_error","status_checked_at":"2026-03-06T12:36:09.819Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["dotfiles","script","server","vps","vps-script","vps-setup"],"created_at":"2026-03-06T14:22:27.387Z","updated_at":"2026-03-06T14:22:30.270Z","avatar_url":"https://github.com/cslant.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotfiles Server\n\nThis script is used to set up a new server with my dotfiles.\n\n## OS Availability:\n- [x] Ubuntu 20.04\n- [x] Ubuntu 22.04\n- [x] Debian 10\n\n## Installation\n\nClone the repository and run the script:\n\n```bash\n# git clone --depth=1 https://github.com/tanhongit/dotfiles_server.git\ngit clone git@github.com:tanhongit/dotfiles_server.git\n```\n\n```bash\ncd dotfiles_server\n```\n\n### Method 1: Using Makefile (Recommended)\n\nQuick and easy commands using Make:\n\n```bash\n# Show all available commands\nmake help\n\n# Setup server\nmake setup\n# or use short alias\nmake s\n```\n\n\u003e See [Makefile Guide](docs/MAKEFILE-GUIDE.md) for complete documentation.\n\n### Method 2: Direct Script\n\n```bash\n./install.sh a\n```\n\n\u003e Note: You may need to make the script executable by running `chmod +x install.sh` before running it.\n\u003e \n\u003e ```bash\n\u003e chmod +x install.sh\n\u003e ```\n\n## Quick Commands (Makefile)\n\n| Command | Description | Short Alias |\n|---------|-------------|-------------|\n| `make setup` | Setup the server | `make s` |\n| `make ssh-port PORT=XXXX` | Change SSH port | `make sp PORT=XXXX` |\n| `make ssh-timeout` | Configure SSH timeout | `make st` |\n| `make php` | Install PHP | `make p` |\n| `make php-ext VER=X.X` | Install PHP extensions | `make pe VER=X.X` |\n| `make global-dev` | Setup NVM, NPM, Yarn, ZSH | `make gd` |\n| `make add-user USER=name` | Add user to developers group | `make au USER=name` |\n| `make zabbix-server` | Install Zabbix Server | `make zs` |\n| `make zabbix-client IP=X.X.X.X` | Install Zabbix Agent | `make zc IP=X.X.X.X` |\n| `make update-zabbix-ip IP=X.X.X.X` | Update Zabbix Server IP | `make uzi IP=X.X.X.X` |\n\n**Examples:**\n```bash\nmake setup\nmake ssh-port PORT=19742\nmake global-dev\nmake add-user USER=john\nmake zabbix-client IP=192.168.1.100\n```\n\nFull documentation: [Makefile Guide](docs/MAKEFILE-GUIDE.md)\n\n## Usage\n\nThe runner has the following commands:\n\n| Command                   | Description                                             |\n|---------------------------|---------------------------------------------------------|\n| `setup`, `s`, `a`         | Setup the server                                        |\n| `ssh_port`, `sp`          | Change the SSH port                                     |\n| `ssh_timeout`, `st`       | Configure SSH timeout (auto disconnect after 5min idle) |\n| `php`, `php-install`      | Install PHP version you want                            |\n| `php_extension`, `pe`     | Install PHP extensions                                  |\n| `lazydocker`, `ld`        | Install lazydocker                                      |\n| `global_dev`, `gd`        | Setup NVM, NPM, Yarn, ZSH globally for all users        |\n| `add_dev_user`, `adu`     | Add user(s) to developers group for dev tools access    |\n| `zabbix_server`, `zs`     | Install Zabbix Server with auto web server detection    |\n| `zabbix_client`, `zc`     | Install Zabbix Agent (client)                           |\n| `update_zabbix_ip`, `uzi` | Update Zabbix Server IP for installed agent             |\n| `fix_mysql`, `fmf`        | Fix MySQL FROZEN issue (when downgrading from MariaDB)  |\n\n### Global Dev Setup\n\nSetup development environment globally for all users (including new users):\n\n```bash\nsudo bash install.sh global_dev\n# or\nsudo bash install.sh gd\n```\n\nThis will install and configure:\n- ✓ ZSH with Oh-My-Zsh (Powerlevel10k theme)\n- ✓ NVM (Node Version Manager) at `/usr/local/nvm`\n- ✓ Node.js (LTS version)\n- ✓ NPM (Node Package Manager) with global packages at `/usr/local/nvm/npm-global`\n- ✓ Yarn (Package Manager) with global packages at `/usr/local/nvm/yarn-global`\n- ✓ Creates `developers` group with proper permissions\n\n**Force update dotfiles for all existing users:**\n\n```bash\nsudo bash install.sh global_dev -f\n# or\nsudo bash install.sh gd --force\n```\n\nThe `-f` or `--force` flag will:\n- Force copy/update all dotfiles (.zshrc, .zsh_aliases, .p10k.zsh) from `home/` folder to all existing users\n- Backup existing dotfiles before updating\n- Apply new configuration to all users with UID \u003e= 1000\n- Automatically add all existing users to `developers` group\n\n#### Managing User Permissions\n\nAfter installing global dev tools, users need to be added to the `developers` group to use NVM, NPM, and Yarn:\n\n**Add specific user(s):**\n\n```bash\nsudo bash install.sh add_dev_user john\n# or multiple users\nsudo bash install.sh add_dev_user john mary bob\n```\n\n**Add all existing users:**\n\n```bash\nsudo bash install.sh add_dev_user --all\n# or\nsudo bash install.sh adu -a\n```\n\n**Important:** Users must logout and login again (or run `newgrp developers`) to apply group membership.\n\nAfter that, users can:\n- Install Node.js versions: `nvm install 22`\n- Install npm packages globally: `npm install -g \u003cpackage\u003e`\n- Install yarn packages globally: `yarn global add \u003cpackage\u003e`\n\n**Benefits of using `developers` group:**\n- ✓ No need to use `sudo` for installing packages\n- ✓ All users in the group share the same Node.js versions\n- ✓ Centralized package management\n- ✓ Secure permissions (only authorized users can install packages)\n\n### Zabbix Setup\n\nSetup Zabbix monitoring system with automatic web server detection:\n\n**Install Zabbix Server:**\n\n```bash\nsudo bash install.sh zabbix_server\n# or\nsudo bash install.sh zs\n```\n\nFeatures:\n- ✓ Auto-detects Nginx or Apache (or lets you choose)\n- ✓ Installs MySQL database\n- ✓ Configures Zabbix Server, Frontend, and Agent\n- ✓ Generates secure random passwords\n- ✓ Configures firewall automatically\n- ✓ Supports Ubuntu 20.04, 22.04, 24.04\n- ✓ Zabbix 7.0 LTS\n\n**Install Zabbix Agent (Client):**\n\n```bash\n# Method 1: Will prompt for Server IP\nsudo bash install.sh zabbix_client\n# or\nsudo bash install.sh zc\n\n# Method 2: Pass Server IP directly\nsudo bash install.sh zabbix_client 192.168.1.100\n# or\nsudo bash install.sh zc 192.168.1.100\n```\n\nFeatures:\n- ✓ Installs Zabbix Agent\n- ✓ Prompts for Zabbix Server IP\n- ✓ Configures agent to connect to server\n- ✓ Configures firewall automatically\n\n**Update Zabbix Server IP (for already installed agents):**\n\n```bash\n# Method 1: Will prompt for new Server IP\nsudo bash install.sh update_zabbix_ip\n# or\nsudo bash install.sh uzi\n\n# Method 2: Pass new Server IP directly\nsudo bash install.sh update_zabbix_ip 192.168.1.200\n# or\nsudo bash install.sh uzi 192.168.1.200\n```\n\nFeatures:\n- ✓ Updates existing Zabbix Agent configuration\n- ✓ Validates IP address format\n- ✓ Creates backup before changes\n- ✓ Auto-restarts agent service\n- ✓ Verifies connection to new server\n- ✓ Supports both Zabbix Agent and Agent2\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcslant%2Fdotfiles_server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcslant%2Fdotfiles_server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcslant%2Fdotfiles_server/lists"}