Deployment guide

Baby Buddy

Overview

Baby Buddy is an open-source, self-hosted web application that helps caregivers track a baby's daily activities and growth. It records feedings, sleep, diaper changes, tummy time, pumping, temperature and measurements, and presents them as an at-a-glance dashboard of cards, a chronological timeline and a set of reporting charts.

This SecureAnyCloud image installs Baby Buddy as a Django 5.2 application in a dedicated Python virtual environment, served by gunicorn behind an nginx reverse proxy. gunicorn is bound to loopback 127.0.0.1:8000 and never exposed directly. nginx on port 80 is the only way in, plus an unauthenticated /healthz endpoint for load balancer probes.

Baby Buddy has its own built-in authentication, so the image is secure by default in a Django-specific way. The well-known default admin/admin account is removed at build time. On the first boot of every VM, a fresh Django secret key is generated and the administrator account is created with a unique, randomly generated password written to a root-only file.

A demo child with several weeks of sample entries ships with the image, so the dashboard, timeline and charts are populated out of the box. Delete it and add your own child whenever you are ready.

What you get:

  • Baby Buddy 2.9.2 installed in a dedicated Python virtual environment and running as the babybuddy gunicorn systemd service
  • The full Baby Buddy web application on :80, fronted by nginx with gunicorn bound to loopback only
  • Built-in Django authentication, with the default admin/admin account removed and a unique administrator password generated on first boot
  • A per-VM Django secret key generated on first boot, never baked into the image
  • Host settings configured so sign-in works on the public IP address or a custom domain, with no baked-in hostname
  • A demo child with roughly a month of feedings, sleep, diaper changes, tummy time and pumping, so the dashboard and charts are populated
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes
  • babybuddy.service (gunicorn) and nginx.service as enabled, active systemd units
  • 24/7 SecureAnyCloud support

Prerequisites

You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region. Standard_B2s (2 vCPU / 4 GiB RAM) is a comfortable starting size, because Baby Buddy is light on resources.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network, 80/tcp for the web application, and 443/tcp if you add TLS.

Baby Buddy serves plain HTTP on port 80. For production, terminate TLS in front of it with your own domain and restrict access to trusted IP ranges (see Maintenance).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Baby Buddy by SecureAnyCloud, and select Create.

On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).

Then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:baby-buddy-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name baby-buddy \
  --image sac1647283583153:baby-buddy-ubuntu-24-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Open port 80 to your network so that you can reach the web application:

az vm open-port --resource-group <your-rg> --name baby-buddy --port 80

Step 3 - Connect to your VM

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

systemctl is-active babybuddy.service nginx.service

Both services report active. Baby Buddy runs under gunicorn on the loopback address 127.0.0.1:8000, and nginx fronts it on port 80. The application is never bound to a public interface, so nginx is the only way in.

Step 5 - Retrieve your admin password

Baby Buddy uses its own Django login. The username is admin. Your VM generates a unique password on first boot and writes it to a root-only file:

sudo cat /root/babybuddy-credentials.txt

The file contains BABYBUDDY_USERNAME, BABYBUDDY_PASSWORD and the BABYBUDDY_URL to open in a browser. Its mode is 0600 root:root.

The default admin/admin account that Baby Buddy normally ships is removed at build time, so no shared or default credential exists in the image. Store the password somewhere safe and change it after your first sign-in (see Maintenance).

Step 6 - Confirm the health endpoint

nginx serves an unauthenticated health endpoint for load balancers and probes. Request it from the VM:

curl -s http://localhost/healthz

It returns ok. This endpoint never requires authentication, so it is safe to use for an Azure Load Balancer health probe.

Step 7 - Confirm authentication is required

Baby Buddy manages its own login, so nobody can reach the dashboard without signing in. An unauthenticated request to the dashboard returns HTTP 302 and redirects to the sign-in page, while the health endpoint stays open:

echo "health : $(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1/healthz)"
echo "dashboard: $(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1/dashboard/)"

It prints health : 200 and dashboard : 302. The dashboard, timeline and every tracking view require the per-VM admin password, and only the health endpoint is open. gunicorn is bound to loopback, so nginx is the only way in.

Step 8 - Confirm the installed version and components

Baby Buddy runs on Django in a dedicated virtual environment. Confirm the framework version and check that the core components are in place:

/opt/babybuddy/venv/bin/python -c "import django; print('Django', django.get_version())"
sudo ls /opt/babybuddy/venv/bin/gunicorn /opt/babybuddy/app/data/db.sqlite3 /etc/systemd/system/babybuddy.service

It reports Django 5.2 and lists the gunicorn binary, the SQLite database on the OS disk and the systemd unit. The image ships Baby Buddy 2.9.2 with a demo child, so the dashboard is populated on first boot.

Step 9 - Sign in

Browse to http://<vm-public-ip>/. When Baby Buddy shows its sign-in page, enter admin and the password from Step 5.

You land on the dashboard for the demo child. It is a grid of at-a-glance cards: last feeding, last sleep, last diaper change, last pumping, recent activity counts and rolling statistics. The sample entries that ship with the image populate all of them.

Step 10 - Explore the timeline

Open a child from the Children menu, or open Timeline from the top navigation. You see the chronological record of everything tracked, including feedings, sleep, diaper changes, tummy time and notes, with timestamps and quick edit links.

Use this view to review and correct individual entries.

Step 11 - View the reporting charts

Open a child and choose Reports to reach the charting views.

Baby Buddy renders interactive charts for feeding amounts and types, sleep patterns, diaper change frequency, tummy time and growth (weight, height and head circumference). The Feeding Amounts report, for example, breaks daily intake down by type across the tracked period.

Step 12 - Add your own child and remove the demo data

The image ships a demo child so the dashboard is not empty. When you are ready, add your own child from the Children menu (Children -> Add Child). Then start tracking from the Activities and Measurements menus, or with the quick-add buttons on the dashboard.

To remove the demo child once you have your own, open it from the Children list and choose Delete. This removes the demo child and all of its sample entries.

Maintenance

  • Password. The administrator password is generated on first boot and stored in /root/babybuddy-credentials.txt (mode 0600 root:root). Change it in the web interface under the admin user menu -> Settings, or reset it from the command line: cd /opt/babybuddy/app && sudo runuser -u babybuddy -- env DJANGO_SETTINGS_MODULE=babybuddy.settings.production SECRET_KEY=$(grep '^SECRET_KEY=' /opt/babybuddy/babybuddy.env | cut -d= -f2-) /opt/babybuddy/venv/bin/python manage.py changepassword admin.
  • Add users. Invite additional caregivers from Users in the top navigation, or create one on the command line with Baby Buddy's createuser management command.
  • Restrict access. Baby Buddy serves plain HTTP on port 80. For production, restrict access to trusted IP ranges in your NSG, and front it with TLS (for example, certbot with your own domain) terminating on :443. If you use a custom hostname, add your domain to CSRF_TRUSTED_ORIGINS and ALLOWED_HOSTS in /opt/babybuddy/babybuddy.env, then run sudo systemctl restart babybuddy.
  • Loopback binding. gunicorn is bound to 127.0.0.1:8000 in /etc/systemd/system/babybuddy.service, so nginx is the only path in. Do not change the bind address to a public interface.
  • Database. The SQLite database lives at /opt/babybuddy/app/data/db.sqlite3 (owned babybuddy:babybuddy). Back it up by copying the file while the service is stopped, or use Baby Buddy's built-in Import / Export under the Database menu.
  • Upgrades. Baby Buddy is installed from a pinned release into its virtual environment. To upgrade, replace the source under /opt/babybuddy/app, reinstall requirements with /opt/babybuddy/venv/bin/pip, and run manage.py migrate and manage.py collectstatic. Then run sudo systemctl restart babybuddy.
  • Security patches. unattended-upgrades remains enabled, so the OS keeps receiving security updates automatically.

Support

SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.

Deploy on Azure

Launch Baby Buddy on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure