Cloud-init user-data generator
Describe how a fresh server should look after its first boot and get a #cloud-config file: a sudo user with your SSH key, updates, ufw, fail2ban, automatic security updates, swap and Docker. Paste it into the cloud-init field when you deploy.
How to use it
- On Neckrez: press the button under the file, or turn on Cloud-init on the deploy page and paste it. With the CLI: neckrez deploy web-1 --plan … --cloud-init cloud-init.yaml.
- Put your SSH key into this file. When cloud-init is on, the separate SSH key field of the deploy form is not used.
- The first line must be exactly #cloud-config, or cloud-init ignores the file. Setup runs once, on the first boot: give it two or three minutes after the server shows as running.
Check what happened
Log in and run cloud-init status --long. The full log is in /var/log/cloud-init-output.log. To check a file before deploying, run cloud-init schema -c cloud-init.yaml on any machine with cloud-init installed.
Ubuntu and Debian
The file uses apt, the sudo group and ufw, which fit Ubuntu and Debian images. On Rocky or AlmaLinux, use the wheel group and firewalld instead.
More tools
- VPS ping test
- VPS cost calculator
- chmod calculator
- Cron generator
- Subnet calculator
- SSH key generator
- Bandwidth calculator
- What is my IP
- SSH hardening generator
- UFW firewall generator
- Fail2ban config generator
- WireGuard config generator
- Nginx reverse proxy generator
- Docker Compose generator
- Systemd service generator
- Swap size calculator
- DNS lookup