{"id":13550007,"url":"https://github.com/szepeviktor/debian-server-tools","last_synced_at":"2025-05-15T12:04:51.998Z","repository":{"id":19273993,"uuid":"22510499","full_name":"szepeviktor/debian-server-tools","owner":"szepeviktor","description":"Tools and living docs 🧬 for Debian-based servers and Web Applications","archived":false,"fork":false,"pushed_at":"2025-05-08T05:59:19.000Z","size":7030,"stargazers_count":525,"open_issues_count":4,"forks_count":134,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-05-08T06:31:11.162Z","etag":null,"topics":["application","debian","debian-server","devops","maintenance","monitoring","operations","shell","webserver"],"latest_commit_sha":null,"homepage":"https://github.com/szepeviktor/debian-server-tools/blob/master/CV.md","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/szepeviktor.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":"security/IPtables.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"szepeviktor"}},"created_at":"2014-08-01T13:20:19.000Z","updated_at":"2025-05-08T05:59:22.000Z","dependencies_parsed_at":"2023-02-15T10:46:11.471Z","dependency_job_id":"c4616fa7-f76c-40b1-80be-acc4beb939e4","html_url":"https://github.com/szepeviktor/debian-server-tools","commit_stats":{"total_commits":1113,"total_committers":8,"mean_commits":139.125,"dds":"0.0062893081761006275","last_synced_commit":"7f2681e1befb062862857760147e5f15d56c56eb"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fdebian-server-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fdebian-server-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fdebian-server-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szepeviktor%2Fdebian-server-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szepeviktor","download_url":"https://codeload.github.com/szepeviktor/debian-server-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337612,"owners_count":22054253,"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":["application","debian","debian-server","devops","maintenance","monitoring","operations","shell","webserver"],"created_at":"2024-08-01T12:01:27.996Z","updated_at":"2025-05-15T12:04:46.986Z","avatar_url":"https://github.com/szepeviktor.png","language":"Shell","readme":"# Debian server tools\n\nYou find all my knowledge on GitHub in form of Bash and PHP scripts and Markdown documents.  \nUpdated daily as I work.\n\n### Featured documents :star:\n\n1. [Too much of a website](/webserver/Production-website.md)\n1. [Web application development](/webserver/PHP-development.md)\n1. [Setting up your infrastructure and your application](/Onboarding.md)\n1. [All things WordPress](https://github.com/szepeviktor/wordpress-website-lifecycle)\n1. [WordPress Security](https://github.com/szepeviktor/wordpress-website-lifecycle/blob/master/WordPress-security.md)\n1. [Running Laravel](https://github.com/szepeviktor/running-laravel)\n1. [Running Drupal](/webserver/Drupal.md)\n1. [Monitoring on paranoid level](/monitoring#readme)\n1. [Continuous Integration and Continuous Delivery](/webserver/Continuous-integration-Continuous-delivery.md)\n1. [Debian setup on UpCloud server](/debian-setup)\n   including [Resize root filesystem during boot](/debian-setup/debian-resizefs.sh)\n1. [Live list of Hostile networks](/security/myattackers-ipsets/ipset)\n1. [Bulk mail sending](/mail/README.md#bulk-mail)\n\n### Magyar nyelvű kiemelt dokumentumok :hungary:\n\n1. [Csapatának tagja szeretnék lenni](/CV2.md)\n1. [Ismerkedés Új ügyfelekkel](/Onboarding-business.md)\n1. [Teljesítménycentrikus webhely tervezése](/webserver/Website-Funnel-UX.md)\n1. [Honlap jogi dolgai + GDPR](/webserver/Production-website.md#jogi-dolgok-hu)\n1. [Kézi Tesztelési Kézikönyv](/webserver/Manual-testing-HU.md)\n1. [Képek életciklusa](/image/Kep-eletciklus.md)\n1. [Magyar email szolgáltatók](/mail/Hungarian-ESP.md)\n1. [`(direct) / (none)` Google Analytics-ben](/monitoring/Analytics-direct-none-traffic.md)\n\n### Support my work\n\nPlease consider supporting my work.\n\n[![Sponsor](https://github.com/szepeviktor/.github/raw/master/.github/assets/github-like-sponsor-button.svg)](https://github.com/sponsors/szepeviktor)\n\nThank you!\n\n### Superior cloud hosting\n\nInstall Debian on [**UpCloud**](https://www.upcloud.com/register/?promo=U29Q8S)\n\nHow UpCloud was chosen? Read https://github.com/szepeviktor/wordpress-speedtest/blob/master/README.md#how-to-choose-vps-provider\n\n### Ergonomics\n\n[How to Set Up Your Desk](https://youtu.be/F8_ME4VwTiw?t=31)\n\n### Model of how systems work\n\n[Richard Cook at Velocity NY 2013](https://youtu.be/PGLYEDpNu60?t=5m44s)\n\n### Directories\n\n- /debian-setup - Debian installation scripts including [debian-setup.sh](/debian-setup/debian-setup.sh)\n- /backup - Tools related to archiving\n- /image - Tools related to image optimization\n- /input - Tools related to the terminal\n- /mail - Tools related to email account management\n- /monitoring - Tools related to server monitoring, alert and statistics emails\n- /mysql - Tools related to database management\n- /package - Tools related to Debian packages and general packaging\n- /security - Security and SSL certificate related tools\n- /tools - Various small tools\n- /virtualization - Docker containers\n- /webserver - Tools related to building webservers\n\n### Debian install with UTC as timezone\n\nSelect Expert install.\n\n### Script development\n\n- Check shell scripts: http://www.shellcheck.net/\n- Code styling: https://github.com/git/git/blob/master/Documentation/CodingGuidelines\n- Bashism: https://wiki.ubuntu.com/DashAsBinSh `checkbashisms -f bash-script.sh`\n\n### Install your own SSH key\n\n```bash\nS=\"${HOME}/.ssh\";mkdir --mode 0700 \"$S\";editor \"${S}/authorized_keys\"\nssh-keygen -v -l -f \"${S}/authorized_keys\"\n```\n\n`authorized_keys` parameters:\n\n```\n# restrict == no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty,no-user-rc\nrestrict,command=\"echo 'Please login as the user \\\"debian\\\" rather than the user \\\"root\\\".';echo;sleep 10\" ssh-rsa AAAA...\n```\n\n### Install a user's SSH key\n\n```bash\nu bash -c 'S=\"${HOME}/.ssh\";mkdir --mode 0700 \"$S\";editor \"${S}/authorized_keys\"'\nU=\"$(stat -c %U .)\";S=\"$(getent passwd $U|cut -d: -f6)/.ssh\";mkdir -m 0700 \"$S\";editor \"${S}/authorized_keys\";chown -R $U:$U \"$S\"\n```\n\n### Retrieve public key from private key\n\n```bash\nssh-keygen -y -f ~/.ssh/id_ecdsa\n```\n\n### Display SSH access details\n\n```bash\nprintf 'host: %s\\nport: %s\\nuser: %s\\n' \"$(hostname)\" \"$(/usr/sbin/sshd -T -C user=root -C host=localhost -C addr=localhost|sed -n -e 's/^port \\([0-9]\\+\\)$/\\1/p')\" \"$(ls -tr /home/|tail -n1)\"\n```\n\n### List sshd host keys\n\n```bash\nls /etc/ssh/ssh_host_*_key.pub | xargs -n 1 ssh-keygen -l -f\n```\n\n### Record terminal session\n\n```bash\nscript --timing=NAME.time --append NAME.script\nscriptreplay --maxdelay 1 NAME.time NAME.script\n```\n\n### Fast and safe transit of scripts (or any data) via copy\u0026paste\n\nUse [magic-wormhole](https://github.com/warner/magic-wormhole)\n\n##### Pack\n\n```bash\ncat $SCRIPT|xz -9|base64 -w $((COLUMNS-1))\n# alias: cat $SCRIPT | transit\n```\n\n##### Unpack\n\n```bash\ncat $PASTED_FILE|base64 -d|xz -d \u003e $SCRIPT\n# alias: cat $PASTED_FILE | transit-receive\n```\n\n### Moving away git-dir\n\n```bash\ngit init --separate-git-dir=/home/user/gitdir\n```\n\nProduces:\n\n/home/user/work-dir/.git: `gitdir: /home/user/git`\n\n/home/user/gitdir/config: `worktree = /home/user/work-dir`\n\n### Rescan the SCSI Bus to Add SCSI Devices\n\n```bash\necho \"- - -\" \u003e /sys/class/scsi_host/host0/scan\n```\n\n### Flush Google public DNS cache\n\nhttps://google-public-dns.appspot.com/cache\n\n### Free CDN for GitHub\n\nhttps://staticaly.com/ `https://cdn.staticaly.com/gh/USER/REPO/TAG/FILE`\n\n### Whois servers\n\n- `whois -h whois.iana.org $TLD` https://www.iana.org/domains/root/db\n- `dig _nicname._tcp.$TLD SRV` https://tools.ietf.org/html/draft-sanz-whois-srv-01\n- https://github.com/rfc1036/whois/blob/next/tld_serv_list\n\n### AS information\n\n`whois -h whois.radb.net -- \"-i origin AS202053\"`\n\n### ROA validation, RPKI status\n\n`whois -h whois.bgpmon.net 94.237.81.0`\n\n\u003c!-- UNICODE owl domain name \n[﴾͡๏̯͡๏﴿.tk](http://xn--wta3hb403ica11187ama.tk/) --\u003e\n\n### Crontab format\n\n```\n.---------------- minute (0 - 59)\n| .-------------- hour (0 - 23)\n| |  .----------- day of month (1 - 31)\n| |  | .--------- month (1 - 12)\n| |  | | .------- day of week (0 - 6)\n| |  | | |\n* *  * * *  USER  COMMAND\n```\n\n```\ncrontab -e -u USER\n.---------------- minute (0 - 59)\n| .-------------- hour (0 - 23)\n| |  .----------- day of month (1 - 31)\n| |  | .--------- month (1 - 12)\n| |  | | .------- day of week (0 - 6)\n| |  | | |\n* *  * * *  COMMAND\n```\n\n### Cron scheduling with timezone\n\n```cron\n# Well before the actual execution time!\n00 06  * * *  echo \"/bin/ls -l\" | at \"$(date --date='TZ=\"Europe/Budapest\" 10:30' \"+\\%H:\\%M\")\" 2\u003e/dev/null\n```\n\n### Looking for a dedicated team member running your application or website?\n\nContact me: viktor@szepe.net\n","funding_links":["https://github.com/sponsors/szepeviktor"],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszepeviktor%2Fdebian-server-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszepeviktor%2Fdebian-server-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszepeviktor%2Fdebian-server-tools/lists"}