Deployment guide

Afanasy 3.4.1

Overview

Afanasy is the render farm manager from CGRU (github.com/CGRU/cgru, LGPL-3.0), an open source computer graphics tools pack. Its afserver is the central coordinator that dispatches rendering work. Render nodes connect to it, pull tasks and report progress, while artists and administrators submit jobs and watch the farm through afserver's built-in browser Web Monitor, a live dashboard of jobs, render nodes, pools and users.

This guide covers deploying Afanasy 3.4.1 on Ubuntu 24.04 on Azure from the SecureAnyCloud Azure Marketplace image. The image ships the afserver coordinator and its Web Monitor as a secure, standalone, single-VM appliance. It boots ready to run, with the server live and the Web Monitor rendering the farm, and you add your own render nodes (afrender) afterwards.

The image is built from the official CGRU 3.4.1 source, verified against a sha256 checksum at build time, and compiled server-only (no Qt desktop tools). The result is a lightweight C++ service that fits comfortably on a Standard_B2s.

What you get:

  • Afanasy afserver 3.4.1 (github.com/CGRU/cgru, LGPL-3.0), compiled from a sha256-pinned source tarball, server-only (--nogui --nosql)
  • The Afanasy browser Web Monitor (the render farm dashboard), served by afserver's built-in HTTP server
  • afserver.service systemd unit running the coordinator as a dedicated unprivileged afanasy account
  • cgru-firstboot.service systemd oneshot that mints the per-VM Web Monitor credential, generates a per-VM TLS certificate and starts the server before anything is exposed
  • nginx fronting :443 (per-VM self-signed certificate) with :80 redirecting to :443, reverse proxying the Web Monitor behind HTTP Basic auth
  • An unauthenticated /healthz endpoint (HTTP 200) wired to the server for load balancer and probe checks
  • All render farm state (the afserver store) on a dedicated 30 GiB Azure data disk mounted at /var/lib/cgru
  • Ubuntu 24.04 LTS base with latest security patches applied at build time and unattended security updates enabled
  • Azure Linux Agent for cloud integration and SSH key injection
  • 24/7 SecureAnyCloud support with a guaranteed 24 hour response SLA

Architecture

afserver binds 0.0.0.0:51000, a single port that carries both the binary render-node protocol (how afrender nodes connect) and the built-in HTTP server that serves the Web Monitor. On the shipped image, the Azure Network Security Group opens only ports 22, 80 and 443, so :51000 is never reachable from outside the VM.

nginx terminates :443 with a per-VM self-signed certificate and reverse proxies the Web Monitor to 127.0.0.1:51000, gated by per-VM HTTP Basic auth. :80 redirects to :443. Afanasy has no built-in Web Monitor login, so this authenticated front door is what keeps the dashboard private. The image ships with no credential baked in.

1

Deploy the image

Launch the Afanasy 3.4.1 on Ubuntu 24.04 by SecureAnyCloud image from the Azure Marketplace on a Standard_B2s or larger VM. In the Network Security Group, open inbound ports 22 (SSH), 80 (HTTP) and 443 (HTTPS). The image provisions the 30 GiB data disk that holds the afserver store automatically.

When the VM is running, connect over SSH as azureuser with the SSH key you selected at launch:

ssh azureuser@<public-ip>
2

Confirm the services are running

The Afanasy server and nginx start automatically on boot. Confirm both are active:

systemctl is-active afserver nginx

Each command should print active. For the full status view:

systemctl --no-pager status afserver nginx | grep -E 'afserver.service|nginx.service|Active:' | head
3

Retrieve the per-VM Web Monitor credential

HTTP Basic auth protects the Web Monitor with a username and password that are unique to your VM and generated on first boot. Read them from the credentials file:

sudo cat /var/lib/sac/secrets/sac-credentials.txt

The AFANASY_WEB_USER and AFANASY_WEB_PASSWORD values are your Web Monitor credential. Keep the password secret, because it grants full access to the render farm dashboard.

4

Check server health

The /healthz endpoint is unauthenticated and confirms that the server is up, so you can safely use it for a load balancer or availability probe. The server's own HTTP port 51000 is reachable only from inside the VM:

curl -ks https://127.0.0.1/healthz echo
curl -s -o /dev/null -w 'afserver HTTP %{http_code}\n' http://127.0.0.1:51000/

Both should report HTTP 200. nginx answers /healthz, and afserver answers on its own port on the loopback interface.

5

Prove the authenticated front door

The Web Monitor requires the per-VM credential. A request that authenticates with it returns HTTP 200. A request with no credential, or the wrong one, is rejected by nginx with HTTP 401, because the image ships no default login:

WEB_USER=$(sudo grep '^AFANASY_WEB_USER=' /var/lib/sac/secrets/sac-credentials.txt | cut -d= -f2-)
WEB_PASS=$(sudo grep '^AFANASY_WEB_PASSWORD=' /var/lib/sac/secrets/sac-credentials.txt | cut -d= -f2-)
echo "authenticated: $(curl -ks -o /dev/null -w '%{http_code}' -u "$WEB_USER:$WEB_PASS" https://127.0.0.1/)"
echo "no credential: $(curl -ks -o /dev/null -w '%{http_code}' https://127.0.0.1/)"
echo "wrong password: $(curl -ks -o /dev/null -w '%{http_code}' -u "$WEB_USER:wrong" https://127.0.0.1/)"

The authenticated request returns 200. The other two return 401.

6

Open the Web Monitor

Browse to https://<public-ip>/ and accept the per-VM self-signed certificate. Your browser prompts for the Basic auth credential. Enter the AFANASY_WEB_USER and AFANASY_WEB_PASSWORD from Step 3. The Afanasy Web Monitor opens on its Jobs view, which shows the live server and its built-in system jobs (post_commands, wake-on-lan, events) that keep the farm running:

7

Review the render farm

Select Farm in the top navigation to see the render pool tree. On a fresh appliance the farm is empty. The root pool / is present and ready, and you add render nodes to it. The left-hand panel gives you the full pool controls: create pools, free or heal hosts, and manage power and tickets.

Open the Users view to see the users the server knows about, with their job and error-solving settings.

Open the Monitors view to see the connected Web Monitors. Your live dashboard session appears here, which confirms that it is registered with the server.

8

Add your own render nodes

The appliance ships the coordinator only, so you connect your own render machines to it. On each render machine, install CGRU, point it at this server's address and start afrender so that it registers with the farm.

The server port 51000 is closed at the Network Security Group by default. Open it, or a private subset of it, to the machines that will run afrender. Treat it as a trusted-network port rather than a public one, because the Basic auth that protects the Web Monitor does not front the render protocol.

As nodes come online, they appear in the Farm view and start taking tasks from any jobs you submit.

9

Where the data lives

The afserver store holds jobs, the render-node registry and the server's working state. It lives on the dedicated Azure data disk mounted at /var/lib/cgru. Confirm that the store is on the data disk:

mountpoint /var/lib/cgru ls -la /var/lib/cgru/store

The store directory is /var/lib/cgru/store. Your render farm state is independent of the OS disk, and you can resize the volume on its own.

Managing the service

Restart or check the Afanasy services with systemd:

sudo systemctl restart afserver
sudo systemctl status afserver --no-pager | head

afserver is a lightweight C++ service and idles in a few hundred megabytes, so a Standard_B2s (2 vCPU / 4 GB) comfortably runs the coordinator for a small-to-medium farm. For very large farms with many nodes and heavy job volumes, launch on a larger VM size. The server picks up the additional resources automatically.

Security notes

  • No default credential. The image ships with no Web Monitor password and no TLS certificate; first boot mints a unique Basic auth credential and generates a per-VM certificate. The image contains no shared login.
  • Rotate the Web Monitor credential for production use: generate a new entry with sudo htpasswd -B /etc/nginx/.htpasswd afadmin and reload nginx.
  • The Web Monitor is only reachable over :443 (nginx, TLS, Basic auth); afserver's :51000 binds inside the VM and is firewalled by the Network Security Group, which opens only 22, 80 and 443.
  • Treat the render port 51000 as a trusted-network port. Open it only to the trusted machines that run afrender, not to the public internet. The render protocol has no Basic auth.
  • Replace the per-VM self-signed certificate under /etc/nginx/ssl/ with a CA-issued certificate for your DNS name in production.
  • Keep the VM patched. Unattended security updates are enabled by default.

Troubleshooting

  • Browser shows a certificate warning: This is expected, because the image generates a per-VM self-signed certificate. Install a CA-issued certificate for production.
  • The Web Monitor prompts for a password again: confirm that you are entering the exact AFANASY_WEB_USER and AFANASY_WEB_PASSWORD from /var/lib/sac/secrets/sac-credentials.txt.
  • A render node does not appear in the Farm view: confirm the node can reach the server on port 51000 (open it at the Network Security Group for that machine) and that afrender is pointed at this server's address.
  • Inspect logs: journalctl -u afserver and journalctl -u nginx.

Support

SecureAnyCloud images come with 24/7 support and a guaranteed 24 hour response SLA. Contact support through the Azure Marketplace listing or at secureanycloud.com.

Deploy on Azure

Launch Afanasy 3.4.1 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