Deployment guide

Strapi

Overview

Strapi is a leading open-source headless CMS built on Node.js. Teams model content with a visual Content-Type Builder, manage entries in a rich admin panel, and deliver everything through an automatically generated REST and GraphQL API.

This SecureAnyCloud image installs Strapi 5.48.1 on Node.js 22 LTS and builds the admin panel. It runs Strapi as a systemd service behind an nginx reverse proxy on port 80. All application secrets and a unique admin user are generated on the first boot of every VM.

What you get:

  • Strapi 5.48.1 on Node.js 22 LTS with the admin panel pre-built
  • The admin panel (/admin) and REST + GraphQL content API published on port 80 via nginx
  • A dedicated Azure data disk at /var/lib/strapi for the SQLite database and uploaded media
  • Per-VM application secrets and a unique admin user generated on first boot
  • strapi.service 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_B2ms (2 vCPU / 8 GiB RAM) is a good starting size.

Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the admin panel and API. For public exposure, put TLS in front of the VM (see Enabling HTTPS).

Step 1 - Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Strapi 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).

Review the dedicated data disk on the Disks tab, then select Review + create and Create.

Step 2 - Deploy from the Azure CLI

Accept the Marketplace terms once per subscription, then create the VM and open port 80.

# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:strapi-ubuntu-24-04:default:latest
az vm create \
  --resource-group <your-rg> \
  --name strapi \
  --image sac1647283583153:strapi-ubuntu-24-04:default:latest \
  --size Standard_B2ms \
  --admin-username azureuser \
  --ssh-key-values ~/.ssh/id_ed25519.pub \
  --vnet-name <your-vnet> --subnet <your-subnet> \
  --public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name strapi --port 80 --priority 1010

Step 3 - Connect to your VM

Connect over SSH as azureuser.

ssh azureuser@<vm-public-ip>

Step 4 - Confirm the services are running

Check that Strapi and nginx are both active:

systemctl is-active strapi.service nginx.service

Both should report active. On first boot, Strapi generates its secrets, creates the admin user and builds a clean database.

Step 5 - Retrieve your admin credentials

The admin password is generated on the first boot of your VM and written to a root-only file. Read it with sudo:

sudo cat /root/strapi-credentials.txt

The file contains strapi.admin.email (admin@sac.local) and strapi.admin.pass. Store the password somewhere safe.

Step 6 - Check the health endpoint

Strapi exposes a liveness endpoint that returns 204:

curl -s -o /dev/null -w '%{http_code}\n' http://localhost/_health

Step 7 - Open the admin panel

Browse to http://<vm-public-ip>/admin. Sign in with admin@sac.local and the password from Step 5.

The admin home gives you an overview of your content and workspace.

Use the Content-Type Builder to model collection types, single types and their fields. Strapi generates a REST and GraphQL API for every type you create.

Create and manage entries in the Content Manager. It supports draft and publish workflows, the media library and fine-grained roles.

Step 8 - Authenticate against the admin API

Strapi issues an admin JWT from /admin/login. Run the following to confirm that the generated credentials work:

curl -s -H 'Content-Type: application/json' --data '{"email":"admin@sac.local","password":"<STRAPI_ADMIN_PASSWORD>"}' http://localhost/admin/login | head -c 80; echo

A successful login returns a JSON object containing a "token".

Step 9 - Use the content API

Once you have modelled content and created entries, Strapi serves them over REST and GraphQL on the same port 80. For example, after you create an article collection type with some published entries, request them like this:

# REST curl http://<vm-public-ip>/api/articles
# Generate an API token under Settings -> API Tokens, then:
curl -H "Authorization: Bearer <api-token>" http://<vm-public-ip>/api/articles

To use GraphQL, install the GraphQL plugin from the Marketplace in the admin panel.

Step 10 - Confirm content lives on the dedicated disk

The SQLite database and uploaded media are stored on the dedicated Azure data disk. They survive OS changes, and you can resize the disk independently. Confirm the mount:

findmnt /var/lib/strapi

The mount is backed by a separate Azure data disk that is captured into the image and re-provisioned on every VM.

Security notes: enabling HTTPS

The nginx reverse proxy serves plain HTTP on port 80. For public exposure, put a certificate in front of it. Add a DNS name for the VM and install certbot, or use the companion SecureAnyCloud nginx-ssl-certbot image as a TLS reverse proxy.

Keep Strapi bound to loopback (127.0.0.1:1337) so the only public surface is the TLS-terminating proxy. Set the url in /opt/strapi/config/server.js to your HTTPS address, then restart Strapi.

Maintenance

  • Backups: snapshot the /var/lib/strapi data disk to back up the database and media.
  • Database: the image uses SQLite, which suits a single server. For production scale, configure PostgreSQL in /opt/strapi/config/database.js and .env.
  • Service: run sudo systemctl restart strapi after configuration changes. Read logs with journalctl -u strapi.
  • Security patches: unattended-upgrades stays 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 Strapi 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