Skip to content
Xbot-me edited this page Jun 23, 2026 · 1 revision

Flags & Non-Interactive Mode

PulseDeploy v1.1.0 supports full CLI flags and environment variables for automated, non-interactive deployments in CI pipelines, AWS EC2 user-data, and cloud-init scripts.


Quick reference

Short Long Env var Default Description
-s --stack PULSE_STACK Stack: lemp | lamp | node | none
-P --php PULSE_PHP 8.2 PHP version: 8.1 | 8.2 | 8.3
-N --node PULSE_NODE 20 Node.js LTS: 18 | 20 | 22
-S --services PULSE_SERVICES Comma-separated: redis,docker,firewall,certbot,swap,phptune
  --domain PULSE_DOMAIN Primary domain name
  --email PULSE_EMAIL Email for Certbot SSL notifications
  --hostname PULSE_HOSTNAME Set server hostname
  --timezone PULSE_TIMEZONE System timezone (e.g. Asia/Dhaka, UTC)
  --ssh-port PULSE_SSH_PORT 22 SSH port to allow through firewall
  --disable-root-ssh PULSE_DISABLE_ROOT_SSH=1 off Disable root SSH login
  --app-port PULSE_APP_PORT 3000 Node.js app port for Nginx proxy
  --db-name PULSE_DB_NAME Create MySQL database with this name
  --db-user PULSE_DB_USER Create MySQL user with access to --db-name
  --swap-size PULSE_SWAP_SIZE auto Swap file size e.g. 2G, 4G
-y --non-interactive PULSE_NON_INTERACTIVE=1 off Skip all prompts
-h --help Print help and exit
-v --version Print version and exit

Examples

Interactive wizard (default)

sudo bash bootstrap.sh

Full automated LEMP server

sudo bash bootstrap.sh \
  --stack lemp --php 8.2 \
  --services redis,firewall,swap,certbot,phptune \
  --domain example.com --email admin@example.com \
  --db-name myapp --db-user myuser \
  --hostname web01 --timezone Asia/Dhaka \
  --disable-root-ssh --non-interactive

Node.js server, short flags

sudo bash bootstrap.sh -s node -N 20 -S firewall,swap,docker -y

Core only — firewall + swap + docker, no web stack

sudo bash bootstrap.sh --stack none --services firewall,swap,docker -y

Partial flags — wizard fills in the rest

# Flags set stack and PHP, wizard still asks about services
sudo bash bootstrap.sh --stack lemp --php 8.3

AWS EC2 user-data

Paste this into the User data field when launching an EC2 instance for a fully automated setup on first boot:

#!/bin/bash
yum install -y git 2>/dev/null || apt-get install -y git

git clone https://github.com/Xbot-me/PulseDeploy.git /opt/PulseDeploy cd /opt/PulseDeploy chmod +x bootstrap.sh scripts/**/*.sh

export PULSE_STACK=lemp export PULSE_PHP=8.2 export PULSE_SERVICES=redis,firewall,swap,certbot,phptune export PULSE_DOMAIN=example.com export PULSE_EMAIL=admin@example.com export PULSE_HOSTNAME=web01 export PULSE_TIMEZONE=UTC export PULSE_DB_NAME=myapp export PULSE_DB_USER=myuser export PULSE_SWAP_SIZE=2G export PULSE_DISABLE_ROOT_SSH=1 export PULSE_NON_INTERACTIVE=1

sudo -E bash bootstrap.sh >> /var/log/pulsedeploy-userdata.log 2>&1


cloud-init

#cloud-config
runcmd:
  - git clone https://github.com/Xbot-me/PulseDeploy.git /opt/PulseDeploy
  - chmod +x /opt/PulseDeploy/bootstrap.sh /opt/PulseDeploy/scripts/**/*.sh
  - |
    cd /opt/PulseDeploy
    PULSE_STACK=lemp \
    PULSE_PHP=8.2 \
    PULSE_SERVICES=redis,firewall,swap \
    PULSE_HOSTNAME=web01 \
    PULSE_TIMEZONE=UTC \
    PULSE_NON_INTERACTIVE=1 \
    bash bootstrap.sh

Man page

Install the man page for offline reference:

sudo bash docs/install-man.sh
man pulsedeploy

How flags, env vars, and interactive mode interact

PulseDeploy resolves values in this priority order:

CLI flag  >  Environment variable  >  Interactive prompt  >  Default
  • If a value is set via flag or env var, the interactive prompt for that value is skipped
  • If --non-interactive / PULSE_NON_INTERACTIVE=1 is set, all prompts are skipped and defaults are used for anything not explicitly set
  • You can mix: set some flags and let the wizard handle the rest

Notes

  • --db-user requires --db-name to also be set
  • --disable-root-ssh reloads sshd immediately — ensure you have a sudo user before your next SSH session
  • --email is required by Certbot for certificate expiry notifications; if omitted and certbot is in --services, you will be prompted
  • Use sudo -E bash bootstrap.sh when passing env vars through sudo to preserve the environment

Clone this wiki locally