Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ PulseDeploy

One-command VPS & AWS server setup automation β€” LEMP Β· LAMP Β· Node.js Β· Docker Β· Redis Β· SSL Β· Firewall

CI License: MIT Bash Distros Stacks

  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
  β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•
  β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
  β•šβ•β•      β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—
  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•
  β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
  β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘  β•šβ–ˆβ–ˆβ•”β•
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•   β–ˆβ–ˆβ•‘
  β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•    β•šβ•β•
  VPS & AWS Server Automation Β· by @Xbot-me

🧠 About

PulseDeploy is a modular Bash automation toolkit for spinning up production-ready Linux servers in minutes β€” whether you're on a Hetzner VPS, DigitalOcean Droplet, Linode, Vultr, or AWS EC2.

No Ansible. No Terraform. No YAML hell. Just clean, readable Bash with an interactive wizard that auto-detects your OS, adapts to your RAM, asks what you need β€” then gets out of the way.

Built by a developer who personally recovered from 502 storms, 8GB database bloat, Redis misconfigurations, and live payment skimmer incidents on a WooCommerce store with 130k+ customers. This script exists because I needed it to exist.


✨ Features

Category What's included
Stacks LEMP (Nginx + PHP-FPM + MySQL), LAMP (Apache + PHP + MySQL), Node.js + PM2 + Nginx reverse proxy
PHP Version selector (8.1 / 8.2 / 8.3), OPcache JIT, PHP-FPM pool auto-tuning based on RAM
Security UFW / firewalld, fail2ban (SSH + Nginx + Apache rules), secure file blocking in web configs
SSL Certbot (Let's Encrypt) with auto-renewal cron
Caching Redis with Unix socket or TCP, maxmemory auto-calculated, allkeys-lru policy
Containers Docker Engine + Docker Compose v2, log rotation, weekly prune cron
Swap Auto-sized swap file based on detected RAM, swappiness=10 tuning
Logging Full install log saved to /var/log/pulsedeploy.log

🐧 Supported Operating Systems

Distro Package Manager Notes
Ubuntu 20.04 / 22.04 / 24.04 apt Full support
Debian 11 (Bullseye) / 12 (Bookworm) apt Full support
Amazon Linux 2 / 2023 dnf AWS-aware: Security Group hints, IMDSv2 detection
CentOS 8 / Rocky Linux 8 & 9 dnf SELinux awareness, Remi repo for PHP

πŸš€ Quick Start

# 1. Clone the repo
git clone https://github.com/Xbot-me/PulseDeploy.git
cd PulseDeploy

# 2. Make executable
chmod +x bootstrap.sh scripts/**/*.sh

# 3. Run as root
sudo bash bootstrap.sh

The interactive wizard walks you through:

  1. OS detection β€” automatic, no input needed
  2. Stack selection β€” LEMP / LAMP / Node.js / core only
  3. Services toggle β€” Redis Β· Docker Β· Firewall Β· SSL Β· Swap Β· PHP tuning
  4. Summary + confirmation β€” review everything before a single package is installed

πŸ“ Project Structure

PulseDeploy/
β”œβ”€β”€ bootstrap.sh              # Main entry point & interactive wizard
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ os/                   # OS-specific package management
β”‚   β”‚   β”œβ”€β”€ ubuntu.sh
β”‚   β”‚   β”œβ”€β”€ debian.sh
β”‚   β”‚   β”œβ”€β”€ amazon_linux.sh   # AWS-aware (IMDSv2, Security Group hints)
β”‚   β”‚   └── centos_rocky.sh   # SELinux-aware
β”‚   β”œβ”€β”€ stacks/               # Web stack installers
β”‚   β”‚   β”œβ”€β”€ lemp.sh           # Nginx + PHP-FPM + MySQL
β”‚   β”‚   β”œβ”€β”€ lamp.sh           # Apache + PHP + MySQL
β”‚   β”‚   └── node.sh           # Node.js + PM2 + Nginx proxy
β”‚   └── services/             # Optional service installers
β”‚       β”œβ”€β”€ firewall.sh       # UFW / firewalld + fail2ban
β”‚       β”œβ”€β”€ redis.sh          # Redis with socket/TCP option
β”‚       β”œβ”€β”€ docker.sh         # Docker Engine + Compose v2
β”‚       β”œβ”€β”€ certbot.sh        # Let's Encrypt SSL + auto-renewal
β”‚       β”œβ”€β”€ swap.sh           # Auto-sized swap file
β”‚       └── php_tune.sh       # PHP-FPM + OPcache + php.ini tuning
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ nginx/default.conf    # Production Nginx template
β”‚   └── apache/vhost.conf     # Production Apache vhost template
└── .github/workflows/ci.yml  # ShellCheck lint + config validation

☁️ AWS EC2 Notes

When running on Amazon Linux 2 / 2023, PulseDeploy automatically:

  • Detects the EC2 instance via IMDSv2
  • Warns you to open ports 80/443/22 in your Security Group (OS-level firewall rules alone are not enough on AWS)
  • Uses firewalld instead of ufw
  • Falls back to MariaDB if the MySQL repo is unavailable

Recommended EC2 setup before running:

# Open required ports via AWS CLI
aws ec2 authorize-security-group-ingress \
  --group-id sg-xxxxxxxx \
  --protocol tcp --port 80 --cidr 0.0.0.0/0

aws ec2 authorize-security-group-ingress \
  --group-id sg-xxxxxxxx \
  --protocol tcp --port 443 --cidr 0.0.0.0/0

πŸ”’ Security Defaults

Every stack is deployed with hardened defaults out of the box:

  • server_tokens off β€” hides Nginx/Apache version from response headers
  • Blocked access to .env, .git, .sql, .log, .bak, .sh files
  • HTTP security headers: X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, Referrer-Policy
  • fail2ban: 24-hour SSH ban after 3 failed attempts, Nginx + Apache jail rules included
  • MySQL root password auto-generated and saved to /root/.my.cnf (chmod 600)
  • PHP: expose_php = Off, memory and upload limits set for production

🧩 Running Individual Modules

Every module is independently sourceable β€” no need to run the full wizard:

# Install only Redis on an existing server
source scripts/os/ubuntu.sh
source scripts/services/redis.sh
install_redis

# Tune PHP-FPM on a live server
source scripts/os/ubuntu.sh
source scripts/services/php_tune.sh
tune_php_fpm

# Set up Docker only
source scripts/os/debian.sh
source scripts/services/docker.sh
install_docker

πŸ“‹ Post-Install Checklist

  • Delete /var/www/html/info.php after verifying PHP works
  • Run certbot --nginx -d yourdomain.com to issue SSL certificate
  • Point your domain DNS A record to your server IP
  • Review fail2ban: fail2ban-client status sshd
  • Check firewall rules: ufw status or firewall-cmd --list-all
  • Test Redis: redis-cli ping β†’ should return PONG
  • On AWS: verify Security Group rules in the AWS Console

πŸ—ΊοΈ Roadmap

  • --non-interactive flag mode for cloud-init / user-data bootstrapping
  • WordPress fast-deploy module (on top of LEMP)
  • healthcheck.sh β€” audit an existing server's config and services
  • PostgreSQL stack option
  • Slack / email notification on install complete

🀝 Contributing

PRs welcome. If you add support for a new distro or service, follow the existing module pattern β€” one file per concern, source-able standalone, OS functions via the os_* abstraction layer.

git checkout -b feat/your-feature
# make changes
git commit -m "feat: description"
git push origin feat/your-feature

πŸ“œ License

MIT β€” free to use, fork, and adapt for your own infrastructure.


Built by @Xbot-me Β· build it Β· break it Β· fix it Β· automate it

About

πŸ–₯️ One-command VPS & AWS server setup β€” LEMP Β· LAMP Β· Node.js Β· Docker Β· Redis Β· SSL Β· Firewall Β· Multi-distro

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages