Sm
Developer Tools Azure

SCM-Manager 3.12 on Ubuntu 26.04 on Azure User Guide

| Product: SCM-Manager 3.12 on Ubuntu 26.04 LTS on Azure

Overview

SCM-Manager is an open source server for Git and Subversion repositories. It gives your team one place to host repositories over HTTPS, with a web UI to browse code, history and branches, users, groups and per-repository permissions, and a REST API for automation. The cloudimg image delivers SCM-Manager 3.12.3 installed and running on Ubuntu 26.04 LTS, behind nginx over HTTPS, with an administrator password made on the first boot of your VM, so the server is ready and locked down the moment you sign in. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.

What is included:

  • SCM-Manager 3.12.3, the unmodified scm-server package from SCM-Manager's own signed apt repository, with its four bundled plugins (Git, Subversion, Mercurial and legacy). Mercurial itself is not installed, so the image serves Git and Subversion
  • OpenJDK 17, git and nginx from the Ubuntu 26.04 archive
  • nginx in front of SCM-Manager: HTTPS on :443 with a certificate made for your VM, and :80 redirecting to HTTPS and answering a plain /healthz liveness check. SCM-Manager itself listens on loopback only
  • No default login: the upstream scmadmin / scmadmin login never exists. First boot makes a 24 character scmadmin password unique to your VM and writes it to the root-only file /root/scm-manager-credentials.txt; SCM-Manager keeps only a salted hash of it
  • Anonymous access and self-registration off, the plugin wizard closed (nothing is downloaded at first boot), repository imports for administrators only, and SCM-Manager sandboxed with no access to the Azure instance metadata service
  • Ubuntu 26.04 LTS, fully patched at build time, with unattended security updates switched on
  • cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours

The SCM-Manager sign-in page, with user name and password fields and no registration link

SCM-Manager is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only; the text is on the image at /usr/share/doc/cloudimg/scm-manager-LICENSE-AGPL-3.0.txt). SCM-Manager is a trademark of Cloudogu GmbH. cloudimg is not affiliated with, endorsed by, or sponsored by Cloudogu GmbH or the SCM-Manager project; this image runs the unmodified upstream SCM-Manager release with cloudimg's provisioning and support.

Prerequisites

An active Azure subscription, an SSH key pair, and a VNet plus subnet in the target region. Standard_B2s (2 vCPU, 4 GiB RAM) is a good starting point for a small team; choose a larger size for many users or large repositories. NSG inbound: allow 22/tcp (SSH) from your management network, and 443/tcp (the web UI, the REST API and Git and Subversion over HTTPS) plus 80/tcp (which redirects to HTTPS) from the networks your users work from. SCM-Manager needs no other inbound port.

Step 1: Deploy from the Azure Marketplace

Sign in to the Azure Portal, choose Create a resource, search the Marketplace for SCM-Manager by cloudimg, and select Create. On Basics 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), HTTP (80) and HTTPS (443). SCM-Manager keeps its repositories under /var/lib/scm on the OS disk: on Disks, choose an OS disk size for the repositories you expect. Then 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 cloudimg1647283583153:scm-manager-ubuntu-26-04:default:latest

az vm create \
  --resource-group <your-rg> \
  --name scm-manager \
  --image cloudimg1647283583153:scm-manager-ubuntu-26-04:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

Open HTTPS (and HTTP, which redirects) for your users:

az vm open-port --resource-group <your-rg> --name scm-manager --port 443 --priority 900
az vm open-port --resource-group <your-rg> --name scm-manager --port 80  --priority 910

Step 3: Connect to your VM

ssh azureuser@<vm-public-ip>

The address is on the VM's Overview page in the portal, or from the CLI with az vm show -d -g <your-rg> -n scm-manager --query publicIps -o tsv.

Step 4: Confirm the services are running

First boot works out the VM's address, makes the certificate and the scmadmin password, starts SCM-Manager once to secure it, proves over HTTPS that anonymous requests are refused and the new password is accepted, and only then opens the web server. It takes a minute or two after the VM starts. SCM-Manager, nginx and scmm-admin-check (the local service that decides whether a caller may import repositories, see Step 9) should all report active. Plain HTTP answers the /healthz check and redirects everything else to HTTPS, and HTTPS asks for a login (401 without one):

systemctl is-active scm-server nginx scmm-admin-check
curl -s  -o /dev/null -w 'healthz         -> %{http_code}\n' http://127.0.0.1/healthz
curl -s  -o /dev/null -w 'http redirect   -> %{http_code} %{redirect_url}\n' http://127.0.0.1/scm/
curl -ks -o /dev/null -w 'https, no login -> %{http_code}\n' https://127.0.0.1/scm/api/v2/repositories/
sudo ss -tln | awk 'NR>1 {print $4}' | sort -u

Expected output. Only SSH (22) and nginx (80, 443) listen on the network; SCM-Manager (8080) is on the loopback address only (Java shows it as the IPv4-mapped [::ffff:127.0.0.1]), and the :53 entries are Ubuntu's local DNS resolver:

active
active
active
healthz         -> 200
http redirect   -> 301 https://127.0.0.1/scm/
https, no login -> 401
0.0.0.0:22
0.0.0.0:443
0.0.0.0:80
127.0.0.53%lo:53
127.0.0.54:53
[::]:22
[::ffff:127.0.0.1]:8080

SCM-Manager runs as the unprivileged scm account on OpenJDK 17, started by the package's own scm-server.service with cloudimg's sandbox added:

ps -o user:10=,args= -C java | sed -E 's# -.* sonia# ... sonia#'

Expected output:

scm        /usr/lib/jvm/java-17-openjdk-amd64/bin/java ... sonia.scm.server.ScmServerDaemon

Services, health and listeners

If nginx is not running, first boot has not finished, or it failed, in which case the web server is never opened: check systemctl status scmm-firstboot and sudo tail -40 /var/log/cloudimg/scmm-firstboot.log.

Step 5: Read your administrator password

sudo cat /root/scm-manager-credentials.txt

The file (mode 0600, root only) holds the address, the administrator's user name and password, and the fingerprint of the VM's certificate:

# SCM-Manager - generated on first boot by scmm-firstboot.service. Unique to this VM; keep it safe.
# Sign in at SCMM_URL as SCMM_ADMIN_USER / SCMM_ADMIN_PASSWORD (address: <VM address>).
# The certificate is self-signed and made for this VM: compare SCMM_TLS_SHA256 with the one your browser shows, or
# install your own certificate (see the guide). Rotate the password: sudo scmm-set-password
# Health (plain HTTP): curl http://<VM address>/healthz
SCMM_URL=https://<VM address>/scm/
SCMM_ADMIN_USER=scmadmin
SCMM_ADMIN_PASSWORD=<SCMM_ADMIN_PASSWORD>
SCMM_TLS_SHA256=81:54:F8:2A:3D:47:EE:90:7B:9A:35:40:FD:97:28:8C:AE:65:92:77:EB:31:A2:4C:B5:18:D1:11:0F:13:30:D4

Per-VM credentials, root-only and masked

To see everything but the password:

sudo grep -E '^SCMM_(URL|ADMIN_USER|TLS_SHA256)=' /root/scm-manager-credentials.txt

Expected output (your address and fingerprint differ):

SCMM_URL=https://<VM address>/scm/
SCMM_ADMIN_USER=scmadmin
SCMM_TLS_SHA256=81:54:F8:2A:3D:47:EE:90:7B:9A:35:40:FD:97:28:8C:AE:65:92:77:EB:31:A2:4C:B5:18:D1:11:0F:13:30:D4

You can prove the whole sign-in path from the VM itself. The helper goes through nginx over HTTPS with the certificate pinned. It checks that SCM-Manager's API, its plugin wizard, an import and Git and Subversion all refuse anonymous requests, that wrong and well known default passwords are refused, and that this VM's password signs in, as a token and with HTTP Basic:

sudo /usr/local/sbin/scmm-verify.sh

Expected output:

SCMM_ROUNDTRIP_OK (HTTPS: 9 API routes + the plugin-set wizard + an import + Git + Subversion refused anonymously, default/wrong passwords refused, the per-VM password accepted as a token and HTTP Basic reading as scmadmin, foreign method 405, same-origin guard)

SCM-Manager's user store keeps a salted SHA-512 hash, never the password:

sudo sed -nE 's#.*<password>(\$shiro1\$SHA-512\$[0-9]+\$).*#\1...#p' /var/lib/scm/config/users.xml

Expected output:

$shiro1$SHA-512$8192$...

Change the password with scmm-set-password. With no argument it makes a new 24 character password; with - it reads yours from standard input. It never takes the password as an argument, so it does not appear in the process list or your shell history. It updates the credentials file, and it is also the way back in if the password is lost:

sudo scmm-set-password
read -rs NEWPW && printf '%s' "$NEWPW" | sudo scmm-set-password - ; unset NEWPW

Step 6: Sign in to the web UI

Browse to SCMM_URL, https://<vm-public-ip>/scm/. The certificate is self-signed and made for your VM, so your browser shows a one-time certificate warning on the first visit: compare the SHA-256 fingerprint it shows with SCMM_TLS_SHA256, then continue, or install your own domain's certificate first (Step 10). SCM-Manager shows its sign-in page (above): sign in as scmadmin with the password from the credentials file. There is no registration link and no anonymous view.

Repositories lists every repository you can see, by namespace. A repository is filed under the namespace of the user who creates it, so the administrator's repositories are scmadmin/<name>. Here are a Git repository, scmadmin/website, and a Subversion repository, scmadmin/docs:

The repository overview: the Subversion repository docs and the Git repository website in the scmadmin namespace

Open a repository to browse its files, commits, branches and tags, and to find its clone URL. The Sources view of scmadmin/website on its main branch, with each file's last commit:

The Sources view of scmadmin/website: css, README.md and index.html with their last commits

Administration > Settings > General holds the server-wide settings. On this image Anonymous Access is disabled and the Base URL is the VM's HTTPS address, which cloudimg-set-public-address keeps in step (Step 10). Leave anonymous access disabled unless you mean to publish repositories to anyone who can reach the VM.

Step 7: Create a Git repository, push and clone

In the web UI choose Add Repository on the Repositories page, pick Git, enter a name and save. The repository's page shows its clone URL, https://<vm-public-ip>/scm/repo/<namespace>/<name>; git signs in with your SCM-Manager user name and password. While the certificate is self-signed, save it on your workstation, check its fingerprint against SCMM_TLS_SHA256, and tell git to trust it for this address (git checks the IP address in the certificate, so this works by address as well as by name):

openssl s_client -connect <vm-public-ip>:443 </dev/null 2>/dev/null | openssl x509 > scm-manager.crt
openssl x509 -in scm-manager.crt -noout -fingerprint -sha256
git config --global http.https://<vm-public-ip>/.sslCAInfo "$PWD/scm-manager.crt"
git clone https://<vm-public-ip>/scm/repo/scmadmin/<name>

The same from a script, with SCM-Manager's REST API and git. This round trip on the VM itself creates a Git repository through the API, pushes a first commit to it over HTTPS, clones it back into a fresh directory, reads the branch from the API and shows that a clone without credentials is refused. On the VM the server is https://localhost, a name the certificate carries; from your workstation use the address in SCMM_URL. The password goes from the credentials file into a curl config file and a git credential file in a private directory, never onto a command line or the screen:

D=$(mktemp -d) && cd "$D" && umask 077
B=https://localhost/scm; CRT=/etc/ssl/scm-manager/scm-manager.crt
PW=$(sudo sed -n 's/^SCMM_ADMIN_PASSWORD=//p' /root/scm-manager-credentials.txt)
printf 'user = "scmadmin:%s"\n' "$PW" > auth.cfg
printf 'https://scmadmin:%s@localhost\n' "$PW" > git-credentials; unset PW
A=(-s --max-time 60 --cacert "$CRT" -K "$D/auth.cfg")
G=(git -c http.sslCAInfo="$CRT" -c credential.helper="store --file=$D/git-credentials" -c user.name=cloudimg -c user.email=guide@example.com)
# 1. a Git repository, created through the REST API
curl "${A[@]}" -o /dev/null -w 'create repository: %{http_code}\n' -H 'Content-Type: application/vnd.scmm-repository+json;v=2' \
  --data '{"namespace":"scmadmin","name":"hello-git","type":"git","description":"cloudimg guide example"}' "$B/api/v2/repositories/"
# 2. a first commit, pushed over HTTPS
git init -q -b main work && cd work
echo "Hello from SCM-Manager on cloudimg" > README.md
"${G[@]}" add README.md && "${G[@]}" commit -qm 'First commit'
"${G[@]}" push -q "$B/repo/scmadmin/hello-git" main 2>/dev/null && echo "push: OK"
# 3. cloned back into a fresh directory
cd "$D" && "${G[@]}" clone -q "$B/repo/scmadmin/hello-git" copy && cat copy/README.md
git -C copy log --format='clone: %h %s (%an)'
# 4. what SCM-Manager now holds, from the API
curl "${A[@]}" "$B/api/v2/repositories/scmadmin/hello-git/branches/" \
  | python3 -c 'import json,sys; [print("branch:", b["name"], b["revision"][:7]) for b in json.load(sys.stdin)["_embedded"]["branches"]]'
# 5. without credentials, the clone is refused
GIT_TERMINAL_PROMPT=0 git -c http.sslCAInfo="$CRT" ls-remote "$B/repo/scmadmin/hello-git" 2>&1 | tail -1
cd / && rm -rf "$D"

Expected output (the commit id differs):

create repository: 201
push: OK
Hello from SCM-Manager on cloudimg
clone: ada4075 First commit (cloudimg)
branch: main ada4075
fatal: could not read Username for 'https://localhost': terminal prompts disabled

From your workstation, use the same calls with https://<vm-public-ip>/scm/api/v2/.... The API takes your user name and password (HTTP Basic, rate-limited per client address like the sign-in form) or, better for scripts, an API key you create under your user's Profile > API Keys: keep either in a file (curl -K), not on the command line.

Step 8: A Subversion repository

Choose Add Repository and pick Subversion; the checkout URL has the same form, https://<vm-public-ip>/scm/repo/<namespace>/<name>. Install the Subversion client where you work (on the VM itself: sudo apt-get install -y subversion).

Subversion and the self-signed certificate. Subversion's TLS library matches a certificate only against DNS names, never against an IP address, so by IP address svn reports certificate issued for a different hostname even for the VM's own certificate. Until you serve SCM-Manager on your own domain with a trusted certificate (Step 10), a client that connects by IP address must tolerate both the unknown issuer and the name mismatch, so check the fingerprint against SCMM_TLS_SHA256 first:

svn checkout --trust-server-cert-failures=unknown-ca,cn-mismatch https://<vm-public-ip>/scm/repo/scmadmin/<name>

With a DNS name that the certificate carries, only unknown-ca is needed for the self-signed certificate, and nothing once the certificate is trusted. On the VM itself, https://localhost is such a name. This round trip creates a Subversion repository through the API, checks it out, commits a file, then checks it out again into a fresh directory and reads the file and the log. The password goes to svn on standard input, never on the command line, and is not cached:

D=$(mktemp -d) && cd "$D" && umask 077
B=https://localhost/scm; CRT=/etc/ssl/scm-manager/scm-manager.crt
PW=$(sudo sed -n 's/^SCMM_ADMIN_PASSWORD=//p' /root/scm-manager-credentials.txt)
printf 'user = "scmadmin:%s"\n' "$PW" > auth.cfg; printf '%s' "$PW" > svn.pw; unset PW
O=(--non-interactive --no-auth-cache --trust-server-cert-failures=unknown-ca --username scmadmin --password-from-stdin)
# 1. a Subversion repository, created through the REST API
curl -s --max-time 60 --cacert "$CRT" -K auth.cfg -o /dev/null -w 'create repository: %{http_code}\n' \
  -H 'Content-Type: application/vnd.scmm-repository+json;v=2' \
  --data '{"namespace":"scmadmin","name":"hello-svn","type":"svn","description":"cloudimg guide example"}' "$B/api/v2/repositories/"
# 2. check it out, add a file and commit it
svn checkout -q "${O[@]}" "$B/repo/scmadmin/hello-svn" work < svn.pw
echo "Hello from SCM-Manager on cloudimg" > work/README.txt
svn add -q work/README.txt
svn commit -q -m 'First commit' "${O[@]}" work < svn.pw && echo "commit: OK"
# 3. a fresh checkout has the file, at revision 1
svn checkout -q "${O[@]}" "$B/repo/scmadmin/hello-svn" copy < svn.pw && cat copy/README.txt
svn log -q "${O[@]}" "$B/repo/scmadmin/hello-svn" < svn.pw | sed -n 2p
cd / && rm -rf "$D"

Expected output (your date differs):

create repository: 201
commit: OK
Hello from SCM-Manager on cloudimg
r1 | scmadmin | 2026-12-03 15:06:17 +0000 (Thu, 03 Dec 2026)

Step 9: Users, groups and permissions

Add users under Users > Create User. A new user can sign in and sees only the repositories they are given. Grant access per repository under the repository's Settings > Permissions (read, write or owner, for a user or a group), and server-wide under the user's or group's Settings > Permissions, for example Create repositories. Keep the administrator role for the people who run the server: on this image only administrators can import repositories or install plugins.

A repository's Settings > Permissions: on scmadmin/website, the user developer has WRITE and scmadmin is OWNER, and new permissions are added below for a user or a group:

The permissions of scmadmin/website: developer WRITE, scmadmin OWNER

The same through the API. This creates a user alice with a password made on the spot, gives her READ on hello-git, then signs in as her: she sees only that repository, can clone it, cannot push to it and cannot import a repository. It removes her again at the end:

D=$(mktemp -d) && cd "$D" && umask 077
B=https://localhost/scm; CRT=/etc/ssl/scm-manager/scm-manager.crt
printf 'user = "scmadmin:%s"\n' "$(sudo sed -n 's/^SCMM_ADMIN_PASSWORD=//p' /root/scm-manager-credentials.txt)" > admin.cfg
APW=$(openssl rand -hex 12)   # alice's password, made here and kept in files only
printf '{"name":"alice","displayName":"Alice Example","mail":"alice@example.com","password":"%s","active":true,"external":false}' "$APW" > alice.json
printf 'user = "alice:%s"\n' "$APW" > alice.cfg
printf 'https://alice:%s@localhost\n' "$APW" > alice-git; unset APW
A=(-s --max-time 60 --cacert "$CRT" -K "$D/admin.cfg"); U=(-s --max-time 60 --cacert "$CRT" -K "$D/alice.cfg")
# 1. as scmadmin: create the user, then give alice READ on hello-git
curl "${A[@]}" -o /dev/null -w 'create user alice: %{http_code}\n' -H 'Content-Type: application/vnd.scmm-user+json;v=2' --data @alice.json "$B/api/v2/users/"
curl "${A[@]}" -o /dev/null -w 'grant READ on hello-git: %{http_code}\n' -H 'Content-Type: application/vnd.scmm-repositoryPermission+json;v=2' \
  --data '{"name":"alice","role":"READ","verbs":[],"groupPermission":false}' "$B/api/v2/repositories/scmadmin/hello-git/permissions/"
# 2. as alice: only the repository she was given; clone yes, push and import no
curl "${U[@]}" "$B/api/v2/repositories/" | python3 -c 'import json,sys; print("alice sees:", [r["namespace"]+"/"+r["name"] for r in json.load(sys.stdin)["_embedded"]["repositories"]])'
G=(git -c http.sslCAInfo="$CRT" -c credential.helper="store --file=$D/alice-git" -c user.name=alice -c user.email=alice@example.com)
"${G[@]}" clone -q "$B/repo/scmadmin/hello-git" copy && echo "alice clone: OK"
cd copy && echo "A change" >> README.md && "${G[@]}" commit -qam 'Try a change'
"${G[@]}" push -q origin main 2>/dev/null && echo "alice push: accepted" || echo "alice push: refused"
cd "$D" && curl "${U[@]}" -o /dev/null -w 'alice import from URL: %{http_code}\n' -H 'Content-Type: application/vnd.scmm-repository+json;v=2' \
  --data '{"namespace":"alice","name":"imported","type":"git","importUrl":"https://example.com/x.git"}' "$B/api/v2/repositories/import/git/url"
# 3. remove the example user again
curl "${A[@]}" -o /dev/null -w 'delete user alice: %{http_code}\n' -X DELETE "$B/api/v2/users/alice"
cd / && rm -rf "$D"

Expected output:

create user alice: 201
grant READ on hello-git: 201
alice sees: ['scmadmin/hello-git']
alice clone: OK
alice push: refused
alice import from URL: 403
delete user alice: 204

Imports are for administrators. Add Repository > Import repository creates a repository from a URL, a bundle or a full export. On this image nginx passes an import on only when SCM-Manager confirms the caller holds full administrator rights (the global * permission, directly or through a group); everyone else gets 403, as alice did. scmm-admin-check makes that decision; if it is stopped, every import is refused (500) until it runs again. An import from a URL, like a plugin install, is a connection from this VM: it can reach your virtual network and the internet (only the Azure instance metadata service is blocked), so restrict outbound NSG rules if that matters to you.

To remove the example repositories from Steps 7 and 8:

D=$(mktemp -d) && cd "$D" && umask 077
printf 'user = "scmadmin:%s"\n' "$(sudo sed -n 's/^SCMM_ADMIN_PASSWORD=//p' /root/scm-manager-credentials.txt)" > auth.cfg
for R in hello-git hello-svn; do
  curl -s --max-time 60 --cacert /etc/ssl/scm-manager/scm-manager.crt -K auth.cfg -o /dev/null \
    -w "delete $R: %{http_code}\n" -X DELETE "https://localhost/scm/api/v2/repositories/scmadmin/$R"
done
cd / && rm -rf "$D"

Expected output:

delete hello-git: 204
delete hello-svn: 204

Step 10: Your own domain and certificate

nginx answers the VM's own address, any IP address and localhost; a request for any other host name is dropped without an answer, so a name someone else points at your VM is never served. To use your own name, point a DNS record (for example scm.example.com) at the VM's public address, then move the certificate, nginx's host name, SCM-Manager's base URL and the credentials file to it in one step:

sudo cloudimg-set-public-address scm.example.com

Run it with no argument to go back to the VM's public IP, and again whenever the VM's address changes (sudo scmm-set-hostname <name> does the SCM-Manager part on its own). For a browser-trusted certificate, put your CA's full chain and key at /etc/ssl/scm-manager/scm-manager.crt and scm-manager.key. With Let's Encrypt, once DNS points at the VM and port 80 is open to the internet, certbot's standalone mode briefly stops nginx to answer the challenge on port 80, copies the certificate into place, and saves the same steps for its automatic renewals:

sudo apt-get update && sudo apt-get install -y certbot
sudo certbot certonly --standalone -d scm.example.com \
  --pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx' \
  --deploy-hook 'install -m 0644 "$RENEWED_LINEAGE/fullchain.pem" /etc/ssl/scm-manager/scm-manager.crt && install -m 0600 "$RENEWED_LINEAGE/privkey.pem" /etc/ssl/scm-manager/scm-manager.key'

A certificate you install is never replaced. The image's tools re-create only a certificate they made themselves: its SHA-256 fingerprint is recorded, root owned, in /var/lib/cloudimg/scmm-cert.sha256, and anything at those paths that does not match the record is yours. To go back to a self-signed certificate, remove both files and run sudo scmm-set-hostname <name> again.

Step 11: Confirm the version and the stack

dpkg-query -W -f '${Package} ${Version}\n' scm-server openjdk-17-jre-headless nginx git
java -version 2>&1 | sed -n 1p
lsb_release -ds
head -1 /usr/share/doc/cloudimg/scm-manager-BUILD-INFO.txt
sudo dpkg --verify scm-server && echo "scm-server files: unmodified"

Expected output (Ubuntu's packages move on with security updates):

git 1:2.53.0-1ubuntu1.2
nginx 1.28.3-2ubuntu1.14
openjdk-17-jre-headless 17.0.21.1+2-1~26.04.1
scm-server 3.12.3
openjdk version "17.0.21.1" 2026-11-17
Ubuntu 26.04.1 LTS
SCM-Manager 3.12.3 on Ubuntu 26.04 LTS (cloudimg, Azure)
scm-server files: unmodified

SCM-Manager's own version and its plugins, from the API:

D=$(mktemp -d) && cd "$D" && umask 077
printf 'user = "scmadmin:%s"\n' "$(sudo sed -n 's/^SCMM_ADMIN_PASSWORD=//p' /root/scm-manager-credentials.txt)" > auth.cfg
curl -s --max-time 60 --cacert /etc/ssl/scm-manager/scm-manager.crt -K auth.cfg https://localhost/scm/api/v2/ \
  | python3 -c 'import json,sys; print("SCM-Manager", json.load(sys.stdin)["version"])'
curl -s --max-time 60 --cacert /etc/ssl/scm-manager/scm-manager.crt -K auth.cfg https://localhost/scm/api/v2/plugins/installed \
  | python3 -c 'import json,sys; [print(p["name"], p["version"]) for p in json.load(sys.stdin)["_embedded"]["plugins"]]'
cd / && rm -rf "$D"

Expected output:

SCM-Manager 3.12.3
scm-hg-plugin 3.12.3
scm-legacy-plugin 3.12.3
scm-git-plugin 3.12.3
scm-svn-plugin 3.12.3

Version and stack

Server components

Component Version Runs as Listens on
SCM-Manager (scm-server) 3.12.3, with the Git, Subversion, Mercurial and legacy plugins 3.12.3 scm (scm-server.service) 127.0.0.1:8080, under /scm
nginx 1.28 (Ubuntu archive) nginx.service :80 (health check and redirect), :443 (HTTPS)
scmm-admin-check cloudimg a dynamic user (scmm-admin-check.service) a local socket only
OpenJDK 17 (Ubuntu archive)
git 2.53 (Ubuntu archive)
Ubuntu 26.04 LTS

Filesystem layout

Path What it holds
/opt/scm-server SCM-Manager, as installed by the scm-server package
/var/lib/scm Everything SCM-Manager keeps: its configuration, users, permissions, cipher key, plugins and every repository (repositories/)
/var/log/scm SCM-Manager's own log (scm-manager.log)
/etc/systemd/system/scm-server.service.d/ cloudimg's settings for SCM-Manager: loopback binding, the /scm path, the sandbox, the metadata block
/etc/nginx/sites-available/cloudimg-scm-manager The nginx site
/etc/ssl/scm-manager/scm-manager.crt, scm-manager.key The TLS certificate and key (the key is root-only)
/root/scm-manager-credentials.txt The per-VM administrator sign-in (root-only)
/usr/local/sbin/scmm-set-password, scmm-set-hostname, scmm-verify.sh, cloudimg-set-public-address cloudimg's helpers (password, host name and certificate, the sign-in check, the VM's address)
/var/log/cloudimg/scmm-firstboot.log What first boot did
/usr/share/doc/cloudimg/ The build record, the AGPL licence text and where SCM-Manager's source is
/ The OS disk, 30 GiB by default (about 25 GiB free)
/mnt The Azure temporary disk: lost on deallocation, never for repositories

First-boot service and security model

The image ships with no administrator, no password, no keys and no certificate: they are made on your VM by scmm-firstboot.service, which runs once. Until it has, SCM-Manager and nginx cannot start at all: both are gated on a marker only first boot writes. First boot makes the certificate and the scmadmin password, closes the plugin wizard, starts SCM-Manager once with the password from a root-only temporary file, so SCM-Manager makes its cipher key and signing keys on your VM, deletes that file and restarts SCM-Manager without it, and only then opens nginx:

systemctl status scmm-firstboot.service --no-pager | sed -n 1,3p
sudo grep -h 'scmm-firstboot:' /var/log/cloudimg/scmm-firstboot.log | cut -c 27-

Expected output:

● scmm-firstboot.service - SCM-Manager first boot (per-VM scmadmin password, certificate, base URL; cloudimg)
     Loaded: loaded (/etc/systemd/system/scmm-firstboot.service; disabled; preset: enabled)
     Active: active (exited) since ...
 scmm-firstboot: SCM-Manager up: scmadmin accepts the per-VM password
 scmm-firstboot: SCM-Manager restarted without the seed: the plugin-set wizard closed, scmadmin accepted, base URL https://<VM address>/scm
 scmm-firstboot: SCMM_ROUNDTRIP_OK (HTTPS: 9 API routes + the plugin-set wizard + an import + Git + Subversion refused anonymously, default/wrong passwords refused, the per-VM password accepted as a token and HTTP Basic reading as scmadmin, foreign method 405, same-origin guard)
 scmm-firstboot: first boot complete

The upstream default login is refused, a host name the VM does not serve gets no answer (000), SCM-Manager cannot be reached on the VM's private address, SCM-Manager and nginx cannot reach the Azure instance metadata service or the platform address 168.63.129.16, both are gated on first boot, and SCM-Manager runs with no privileges and cannot execute anything under its data, cache and log directories, so a hook file inside a repository never runs:

C=(-ks -o /dev/null --max-time 15 -w '%{http_code}')
echo "upstream default scmadmin/scmadmin -> $(printf 'user = "scmadmin:scmadmin"\n' | curl "${C[@]}" -K - https://127.0.0.1/scm/api/v2/me/)"
echo "a host name this VM does not serve -> $(curl "${C[@]}" --resolve other.example:443:127.0.0.1 https://other.example/scm/)"
echo "Jetty on the private address       -> $(curl -s -o /dev/null --max-time 5 -w '%{http_code}' "http://$(hostname -I | awk '{print $1}'):8080/scm/")"
systemctl show scm-server nginx -p Id -p IPAddressDeny
grep -h '^ConditionPathExists' /etc/systemd/system/scm-server.service.d/10-cloudimg.conf /etc/systemd/system/nginx.service.d/10-cloudimg.conf
systemctl show scm-server -p User -p NoNewPrivileges -p CapabilityBoundingSet -p ProtectSystem -p NoExecPaths

Expected output:

upstream default scmadmin/scmadmin -> 401
a host name this VM does not serve -> 000
Jetty on the private address       -> 000
Id=scm-server.service
IPAddressDeny=169.254.169.254/32 168.63.129.16/32

Id=nginx.service
IPAddressDeny=169.254.169.254/32 168.63.129.16/32
ConditionPathExists=/var/lib/cloudimg/scmm-ready
ConditionPathExists=/var/lib/cloudimg/scmm-ready
CapabilityBoundingSet=
User=scm
NoExecPaths=/var/lib/scm /var/cache/scm /var/log/scm
ProtectSystem=strict
NoNewPrivileges=yes

The certificate is made for your VM (its address, its private address, 127.0.0.1 and localhost) and cannot sign other certificates, and the secrets are readable only by their owners:

echo | openssl s_client -connect 127.0.0.1:443 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName,basicConstraints
sudo stat -c '%a %U:%G %n' /root/scm-manager-credentials.txt /etc/ssl/scm-manager/scm-manager.key /var/lib/scm/config/users.xml

Expected output (your addresses differ):

subject=CN=<VM address>, O=cloudimg
X509v3 Subject Alternative Name: 
    IP Address:<VM address>, IP Address:10.20.0.13, IP Address:127.0.0.1, DNS:localhost
X509v3 Basic Constraints: critical
    CA:FALSE
600 root:root /root/scm-manager-credentials.txt
600 root:root /etc/ssl/scm-manager/scm-manager.key
640 scm:scm /var/lib/scm/config/users.xml

First boot and security model

nginx also sets the forwarded headers SCM-Manager sees to fixed values, refuses HTTP methods SCM-Manager does not use, refuses state-changing requests from other origins, rate-limits sign-ins (10 a minute per client address) and API calls, and sends HSTS.

Managing the services

systemctl status scm-server --no-pager | sed -n 1,5p

Expected output:

● scm-server.service - SCM-Manager Server
     Loaded: loaded (/etc/systemd/system/scm-server.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/scm-server.service.d
             └─10-cloudimg.conf, 50-cloudimg-imds-deny.conf
     Active: active (running) since ...

Restart SCM-Manager with sudo systemctl restart scm-server (it takes about half a minute to answer again), and nginx with sudo systemctl reload nginx. Logs: journalctl -u scm-server, /var/log/scm/scm-manager.log, /var/log/nginx/access.log and error.log.

Updating SCM-Manager

SCM-Manager comes from SCM-Manager's own apt repository, which stays configured, pinned to its signing key:

grep -E '^(URIs|Suites|Signed-By):' /etc/apt/sources.list.d/scm-manager.sources
apt-cache policy scm-server | sed -n 1,3p

Expected output:

URIs: https://packages.scm-manager.org/repository/apt-v2-releases/
Suites: stable
Signed-By: /usr/share/keyrings/scm-manager.gpg
scm-server:
  Installed: 3.12.3
  Candidate: 3.12.3

Ubuntu's own packages (OpenJDK, git and nginx included) are updated by unattended security upgrades, which are switched on. That does not cover SCM-Manager's repository, so SCM-Manager is never upgraded behind your back. To move to a newer release, back up first (below), read SCM-Manager's release notes, then:

sudo apt-get update && sudo apt-get install --only-upgrade scm-server

SCM-Manager migrates its data when it starts. Keep the rest of the OS current with sudo apt-get update && sudo apt-get upgrade.

Backup

SCM-Manager keeps everything in /var/lib/scm: its configuration, users, permissions, cipher key and every repository. Snapshot the OS disk from the Azure portal for a point-in-time copy, or stop SCM-Manager and archive the folder. A backup holds the cipher key and every repository, so keep it as safe as the VM:

sudo systemctl stop scm-server
sudo tar -C / -czf /var/backups/scm-manager-$(date +%F).tar.gz var/lib/scm
sudo systemctl start scm-server

For large repositories, attach a data disk and move /var/lib/scm onto it while SCM-Manager is stopped.

Troubleshooting

  • The browser shows a certificate warning. Expected with the self-signed certificate: compare the fingerprint with SCMM_TLS_SHA256 and continue, or install your own (Step 10).
  • The sign-in page refuses the password. Read it again from /root/scm-manager-credentials.txt (the user name is scmadmin). After scmm-set-password the old one is refused.
  • 429 Too Many Requests. Too many sign-in attempts or API calls from one address (10 sign-ins a minute). Wait a minute.
  • The connection is dropped with no answer. The request named a host name this VM does not serve. Use the address in SCMM_URL, or set your name with cloudimg-set-public-address (Step 10).
  • git says the certificate is not trusted. Trust the saved certificate for this address (Step 7) or install your own (Step 10).
  • svn says the certificate was issued for a different hostname. You are connecting by IP address: add cn-mismatch to --trust-server-cert-failures, or use a DNS name (Step 8).
  • 403 on an import. Only full administrators can import repositories on this image. 500 on an import: run sudo systemctl restart scmm-admin-check.
  • The web UI does not answer after the VM starts. First boot may still be running or may have failed: systemctl status scmm-firstboot and sudo tail -40 /var/log/cloudimg/scmm-firstboot.log name the reason.

Security recommendations

  • Restrict 22/tcp in the NSG to your management network, and expose 443/tcp (and 80/tcp for the redirect) only to the networks your users work from.
  • Keep the administrator password somewhere safe, then delete /root/scm-manager-credentials.txt if you no longer need it; give each person their own SCM-Manager user rather than sharing scmadmin.
  • Serve SCM-Manager on your own domain with a browser-trusted certificate before sharing it widely.
  • Keep anonymous access off and give administrator rights only to the people who run the server.
  • Restrict outbound NSG rules to the hosts your imports and plugin installs need.
  • Install only the plugins you need and keep SCM-Manager updated; SCM-Manager's security advisories are published on GitHub.

Support

Support is by email from cloudimg's team at support@cloudimg.co.uk, on hand 24 hours a day, with a guaranteed response within 24 hours, for deployment, signing in, Git and Subversion clients, users and permissions, your own domain and certificates, backups and upgrades. Include the output of sudo /usr/local/sbin/scmm-verify.sh with your message. For SCM-Manager itself, see the SCM-Manager documentation.