Cloud-Init Collection: Deploy Apps Instantly on Gozunga Cloud
Over 50 ready-to-paste cloud-init configs for apps, databases, Docker, Kubernetes, networking, observability, security, and more — tested on Ubuntu and Rocky Linux.
Stop spending your first hour on a new server installing packages. Our open-source cloud-init collection gives you over 50 copy-paste configs that turn a bare instance into a running stack — before you even SSH in.
- Overview
- What's in the Collection
- Deploy via the Gozunga Cloud Portal
- Deploy via the OpenStack CLI
- Example: Launch a Next.js App in Minutes
- Example: Docker Engine, One Paste
- Gozunga On-Net Mirrors
- All Tested, Both Distros
- Get Started
1. Overview
When you launch a new cloud server, there's usually a setup process before you can use it — installing packages, configuring services, setting up your application runtime, and making sure everything starts automatically on boot. Depending on the stack, this can take anywhere from a few minutes to well over an hour of manual work.
cloud-init is a tool built into every major Linux cloud image that automates this entire process. It runs once at first boot, before you even SSH in. You provide a YAML configuration when launching your instance, and cloud-init handles the rest — installing packages, writing config files, running setup scripts, and starting services.
We built the Gozunga Cloud-Init Collection — an open-source repository of ready-to-use #cloud-config files covering the stacks and tools developers actually need. Each config is pre-wired to use Gozunga's on-net package mirrors for faster installs, and has been tested on real Gozunga Cloud instances running both Ubuntu and Rocky Linux.
2. What's in the Collection
The collection covers 14 categories and over 50 individual configs, with support for both Ubuntu and Rocky Linux / RHEL-style distros:
App Runtimes & Starters — Production-ready scaffolds with systemd services, ready to serve on first boot:
| Stack | Ubuntu | Rocky | Port |
|---|---|---|---|
| Laravel (PHP-FPM + Nginx) | ✅ | ✅ | 80 |
| Django + Gunicorn | ✅ | ✅ | 8000 |
| Python FastAPI | ✅ | ✅ | 8000 |
| Go HTTP | ✅ | ✅ | 8080 |
| Rust (Axum) | ✅ | ✅ | 8080 |
| Next.js | ✅ | ✅ | 3000 |
| SvelteKit | ✅ | ✅ | 3000 |
| TanStack Start | ✅ | ✅ | 3000 |
Infrastructure & Tooling:
| Category | What's Included |
|---|---|
| Docker | Docker Engine from official repos (Ubuntu + Rocky) |
| Databases | PostgreSQL, Redis (Ubuntu) / Valkey (Rocky) |
| Reverse Proxy | Caddy with auto-HTTPS, Nginx + Certbot |
| CI Runners | GitLab Runner, GitHub Actions runner |
| Networking | WireGuard, Tailscale |
| Kubernetes | k3s single-node |
| Security | HashiCorp Vault, Wazuh all-in-one (SIEM) |
| Observability | Netdata, Prometheus + Grafana, LibreNMS |
| Desktop | GNOME, KDE Plasma, XFCE, MATE (all with xrdp) |
| GPU | NVIDIA open drivers + CUDA |
| PaaS | Coolify |
Every config that has distro-specific package differences ships in both Ubuntu and Rocky variants.
3. Deploy via the Gozunga Cloud Portal
The fastest way to use any config is through the Gozunga Cloud Management Portal:
- Log in and select or create a Project.
- From the Servers pane, click Create a Cloud Server.
- Choose your image — Ubuntu 26.04 or Rocky Linux 10 (match the config variant you want).
- Select an instance type — a General Purpose
gp.small1works for most stacks; choose larger for Coolify, desktop environments, or GPU workloads. - Network — select Internet for a public IP, or your preferred private network.
- SSH key — select your key pair (required for SSH access after boot).
- Security Groups — add rules for the ports your stack needs (e.g. SSH on 22, your app port). Gozunga instances deny all inbound traffic by default.
- Cloud Configuration — this is where the magic happens. Paste the full YAML from the collection. For example, to deploy a Next.js app on Ubuntu:
#cloud-config
# Ubuntu: Node.js (NodeSource 22.x) + create-next-app starter, systemd on :3000
apt:
primary:
- arches: [default]
uri: https://mirror.gozunga.com/ubuntu
security:
- arches: [default]
uri: https://mirror.gozunga.com/ubuntu
package_update: true
package_upgrade: true
packages:
- curl
- ca-certificates
- git
write_files:
- path: /etc/systemd/system/nextjs-app.service
permissions: '0644'
content: |
[Unit]
Description=Next.js app
After=network.target
[Service]
Type=simple
User=www-data
WorkingDirectory=/opt/nextjs-app
Environment=NODE_ENV=production
Environment=PORT=3000
Environment=HOSTNAME=0.0.0.0
ExecStart=/usr/bin/npm run start --prefix /opt/nextjs-app
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
runcmd:
- |
set -e
export HOME=/root
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
npx --yes create-next-app@latest /opt/nextjs-app \
--ts --eslint --app --src-dir --import-alias "@/*" \
--tailwind --use-npm --no-turbopack
cd /opt/nextjs-app
npm run build
chown -R www-data:www-data /opt/nextjs-app
systemctl daemon-reload
systemctl enable --now nextjs-app
final_message: "Next.js app listening on :3000 after $UPTIME seconds"
- Name your server and click Create Server.
That's it. Within a few minutes, your server boots with everything installed, the app built, and the systemd service running. Open the instance's IP on the configured port and you'll see your application.
💡 Pro Tip: You can find every config in the GitHub repo organized by category. Just pick the file, copy the YAML, and paste it into the Cloud Configuration field.
4. Deploy via the OpenStack CLI
If you prefer the command line, the OpenStack CLI gives you the same workflow with more automation potential.
Set up your environment:
Download your OpenStack RC file from the Gozunga Portal (Project → API Access → Download OpenStack RC File) and source it:
source your-project-openrc.sh
Download the config you want:
# Clone the whole collection
git clone https://github.com/gozunga/cloud-init-collection.git
# Or grab a single file
curl -o nextjs.yaml \
https://raw.githubusercontent.com/gozunga/cloud-init-collection/main/apps/ubuntu-nextjs.yaml
Launch the instance:
openstack server create \
--image ubuntu-26.04 \
--flavor gp.small1 \
--key-name my-keypair \
--network Internet \
--security-group SSH \
--security-group web-3000 \
--user-data ./apps/ubuntu-nextjs.yaml \
--wait \
nextjs-demo
The --user-data flag passes the cloud-init config. The --wait flag holds until the instance is active. After that, give cloud-init a few minutes to finish, then SSH in or hit the app port directly.
Check cloud-init progress (optional):
ssh ubuntu@$(openstack server show nextjs-demo -f value -c addresses | grep -oP '[\d.]+') \
"cloud-init status --wait"
Rocky Linux variant:
openstack server create \
--image rocky-10 \
--flavor gp.small1 \
--key-name my-keypair \
--network Internet \
--security-group SSH \
--security-group web-3000 \
--user-data ./apps/rocky-nextjs.yaml \
--wait \
nextjs-demo-rocky
Same config structure, same result — just a different distro.
5. Example: Launch a Next.js App in Minutes
Here's the full flow — portal or CLI — to go from nothing to a running Next.js app:
Portal:
- Create a server with Ubuntu 26.04,
gp.small1, Internet network - Add security groups for SSH (22) and your app port (3000)
- Paste the ubuntu-nextjs.yaml into Cloud Configuration
- Click Create. Wait ~3 minutes. Visit
http://<your-ip>:3000
CLI:
openstack server create \
--image ubuntu-26.04 \
--flavor gp.small1 \
--key-name my-keypair \
--network Internet \
--security-group SSH \
--security-group web-3000 \
--user-data ./apps/ubuntu-nextjs.yaml \
--wait \
nextjs-demo
The config installs Node.js 22 from NodeSource, scaffolds a new Next.js app with TypeScript and Tailwind, builds it, and starts it under systemd. When cloud-init finishes, you have a production build running on port 3000 with automatic restart on failure.
The same pattern works for every stack in the collection. Swap the YAML file, adjust your security group ports, and you're running Django, FastAPI, Laravel, Go, Rust, SvelteKit, or TanStack Start instead.
6. Example: Docker Engine, One Paste
Need Docker on a fresh instance? Don't Google the install steps again:
Portal: Paste docker/ubuntu-docker-official.yaml into Cloud Configuration.
CLI:
openstack server create \
--image ubuntu-26.04 \
--flavor gp.small1 \
--key-name my-keypair \
--network Internet \
--security-group SSH \
--user-data ./docker/ubuntu-docker-official.yaml \
--wait \
docker-host
The config removes any conflicting distro Docker packages, adds Docker's official apt repository, installs Docker CE, and verifies the install with docker run hello-world. SSH in and start deploying containers.
7. Gozunga On-Net Mirrors
Every config in the collection points Ubuntu apt and Rocky dnf traffic at Gozunga's on-net package mirrors:
- Ubuntu:
https://mirror.gozunga.com/ubuntu - Rocky:
https://mirror.gozunga.com/rocky-linux
Because the mirrors live on Gozunga's own network, package downloads are fast — no crossing the public internet for routine apt update and dnf install operations. This is configured automatically in each cloud-init file using the apt: or equivalent directives, so you get the speed benefit without any extra work.
8. Tested on Gozunga Cloud
Every config in this collection has been smoke-tested on live Gozunga Cloud instances using an automated harness. For each YAML, the harness launches a real VM, waits for cloud-init to complete (including reboots where required), and verifies the expected service is running. Failures get diagnosed and fixed before anything lands in the repo.
All tests run on both Ubuntu 26.04 and Rocky Linux 10:
| Category | Configs tested |
|---|---|
| Docker Engine | Ubuntu + Rocky |
| PostgreSQL | Ubuntu + Rocky |
| Redis / Valkey | Ubuntu (Redis) + Rocky (Valkey) |
| Caddy + Let's Encrypt | Ubuntu + Rocky |
| Nginx + Certbot | Ubuntu + Rocky |
| WireGuard | Ubuntu + Rocky |
| Tailscale | Ubuntu + Rocky |
| k3s | Ubuntu + Rocky |
| GitLab Runner | Ubuntu + Rocky |
| GitHub Actions Runner | Ubuntu + Rocky |
| Netdata | Ubuntu + Rocky |
| Prometheus + Grafana | Ubuntu + Rocky |
| LibreNMS | Ubuntu + Rocky |
| HashiCorp Vault | Ubuntu + Rocky |
| Wazuh AIO (SIEM) | Ubuntu + Rocky |
| XFCE Desktop (xrdp) | Ubuntu + Rocky |
| GNOME Desktop (xrdp) | Ubuntu + Rocky |
| KDE Plasma (xrdp) | Ubuntu + Rocky |
| Coolify | Ubuntu + Rocky |
A few Rocky-specific notes worth knowing:
- Redis → Valkey. Rocky Linux 10 (following RHEL 10) ships Valkey — the open-source Redis fork — in place of the original Redis package. The
rocky-redis.yamlconfig uses Valkey; it's fully Redis-compatible. - EPEL packages. Some tools (Certbot, WireGuard, LibreNMS) require EPEL on Rocky. The configs handle this automatically via
bootcmd. - Docker CE. The Rocky Docker configs use Docker's
centosrepository channel, which is the correct path for Rocky Linux 10. - Kernel upgrades + Docker. Installing Docker CE on Rocky 10 occasionally pulls a new kernel module package. When that happens, the config detects the mismatch, skips trying to start Docker immediately, and reboots cleanly — Docker and any Compose stacks start automatically on the new kernel.
9. Get Started
- Browse the collection: github.com/gozunga/cloud-init-collection
- Pick a config that matches your stack and preferred distro
- Launch an instance using the Gozunga Cloud Portal or the OpenStack CLI
- Paste the YAML and let cloud-init do the work
New to Gozunga Cloud? Create an Account and get $100 in free credits — enough to test every config in the collection and still have room to build.
Contributing: The collection is open-source and PRs are welcome. If you have a stack you'd like to see added, open an issue or submit a config on GitHub.