Repository navigation
First stable release. Provisions a fresh Ubuntu LTS cloud instance with a single
paste into your CSP's user-data field.
What it does
- Creates a sudo user and migrates SSH keys from
/root/.ssh/authorized_keys - Disables root SSH login and password authentication (public-key only)
- Installs Docker Engine and the Docker Compose plugin from Docker's official apt repo
- Enables
unattended-upgradesfor automatic security patches
Usage
Paste the contents of bootstrap.sh
into your CSP's user-data field when creating the instance. Customize USERNAME
or SSH_PORT at the top of the script if needed.
To pin to this release (recommended for production over the moving main
target), use this URL in your bootstrap:
https://raw.githubusercontent.com/sjy5386/cloud-startup-script/refs/tags/v1.0.0/setup.sh
Supported
- Ubuntu 22.04 LTS / 24.04 LTS / 26.04 LTS
- Any CSP whose user-data runs as root (AWS, GCP, Oracle, Vultr, DigitalOcean,
Linode, etc.) - Works on cloud images with or without
curlpre-installed — the bootstrap
installs it on demand.
Design notes
- SSH hardening runs as the last step, so any earlier failure leaves the
existing root SSH path intact (no lockout). - Aborts early if
/root/.ssh/authorized_keysis empty or missing. - Idempotent: re-running on an instance is safe.
Full changelog: https://github.com/sjy5386/cloud-startup-script/commits/v1.0.0