Umbraco was an IIS-only world for fifteen years; the modern release line runs on .NET 8 and ships fully Linux-compatible binaries. Operators coming from PHP or Node who inherit an Umbraco site mostly need to understand three things: the build/publish model (this is a compiled .NET app, not a “drop files in webroot” CMS), the database choice (SQL Server still works, but PostgreSQL is now supported), and where Umbraco writes runtime media. This article walks through Umbraco 13 on Ubuntu 22.04 with Kestrel behind Nginx, PostgreSQL as the database, and the systemd unit you actually want.
How to verify
A correctly running Umbraco on Linux shows:
systemctl status umbraco
# Active: active (running) since ...
curl -sI https://example.org/umbraco/ | head -1
# HTTP/2 200 (admin UI loads)
curl -s https://example.org/umbraco/api/health-check | jq '.status'
# "Healthy"
ss -lntp | grep ':5000'
# 127.0.0.1:5000 dotnet
sudo -u postgres psql -d umbraco -c "\dt umbraco*" | head
# umbracoContent | table | umbraco
# umbracoNode | table | umbraco
# umbracoUser | table | umbraco
If the admin shows “An error has occurred during the installation” and the logs mention Microsoft.Data.SqlClient, the project’s appsettings.json is pointing at SQL Server, not PostgreSQL — fix the connection string before retrying.
What’s happening
Umbraco is a .NET 8 application. The codebase has two halves: the framework NuGet packages (Umbraco.Cms) and your project’s customizations (custom controllers, view models, Razor views, App_Plugins). The deploy unit is the result of dotnet publish — a self-contained or framework-dependent directory you copy to the server and run with dotnet YourSite.dll.
The frontend is Razor (server-rendered HTML); the editor admin is a Vue.js SPA bundled with the framework. Both live in the same .NET process, served by Kestrel. Static content (uploaded media, App_Plugins, wwwroot assets) is served by Kestrel too — but most production setups put Nginx in front and let it serve wwwroot/ directly to avoid waking the .NET process for static files.
Data lives in SQL Server or PostgreSQL — Umbraco 13 added native PostgreSQL support via Npgsql + a custom dialect; SQL Server is still the most common in inherited installs. Media uploaded through the editor lands by default under wwwroot/media/ on the filesystem; the path is configured via Umbraco:CMS:Global:LocalTempStorageLocation and the IFileSystem abstraction lets you swap to Azure Blob, S3, or any provider that has an Umbraco package.
The procedure
-
Install .NET 8 SDK and runtime.
sudo apt update sudo apt install -y wget apt-transport-https wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O /tmp/ms.deb sudo dpkg -i /tmp/ms.deb && rm /tmp/ms.deb sudo apt update && sudo apt install -y dotnet-sdk-8.0 aspnetcore-runtime-8.0 \ postgresql nginx -
Provision the database.
DBPASS=$(openssl rand -hex 24) sudo -u postgres psql <<SQL CREATE USER umbraco WITH PASSWORD '${DBPASS}'; CREATE DATABASE umbraco OWNER umbraco; SQL -
Scaffold a new Umbraco project on a build machine. This is one of the few CMS that does not “install on the server”; you build locally (or in CI) and publish artifacts:
dotnet new install Umbraco.Templates::13.* dotnet new umbraco --friendly-name "Admin" --email admin@example.org --password "$(openssl rand -hex 16)" \ --connection-string "Host=127.0.0.1;Database=umbraco;Username=umbraco;Password=${DBPASS}" \ --connection-string-provider-name "Npgsql" -n MySite cd MySite -
Publish for Linux.
dotnet publish -c Release -r linux-x64 --self-contained false -o ./publish tar -czf MySite-publish.tar.gz publish/ -
Deploy to the server.
scp MySite-publish.tar.gz deployer@host:/tmp/ ssh deployer@host -- <<'BASH' sudo useradd -m -s /bin/bash -d /var/www/umbraco umbraco sudo mkdir -p /var/www/umbraco sudo tar -xzf /tmp/MySite-publish.tar.gz -C /var/www/umbraco --strip-components=1 sudo chown -R umbraco:umbraco /var/www/umbraco BASH -
Write the systemd unit at
/etc/systemd/system/umbraco.service:[Unit] Description=Umbraco CMS After=network.target postgresql.service [Service] Type=simple User=umbraco Group=umbraco WorkingDirectory=/var/www/umbraco ExecStart=/usr/bin/dotnet /var/www/umbraco/MySite.dll Restart=always Environment=ASPNETCORE_ENVIRONMENT=Production Environment=ASPNETCORE_URLS=http://127.0.0.1:5000 Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false LimitNOFILE=65536 [Install] WantedBy=multi-user.targetsudo systemctl daemon-reload sudo systemctl enable --now umbraco -
Reverse-proxy with Nginx.
server { listen 443 ssl http2; server_name example.org; ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem; client_max_body_size 200m; # serve uploaded media directly from disk location /media/ { alias /var/www/umbraco/wwwroot/media/; expires 7d; add_header Cache-Control public; } location / { proxy_pass http://127.0.0.1:5000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } -
Configure runtime settings. Edit
/var/www/umbraco/appsettings.Production.jsonto point at PostgreSQL, setUseHttps=true, and configure logging targets (Serilog can write to a file under/var/log/umbraco/).
Operational notes
- Umbraco’s Examine search (Lucene) writes index files to
umbraco/Data/TEMP/ExamineIndexes/— those are not in the DB. Back them up or accept that they’ll regenerate after a restore. - The first request after a publish/restart is slow (JIT warm-up); use
dotnet publish -p:PublishReadyToRun=trueto AOT-compile critical paths. - Forms, Deploy, and Workflow are commercial add-ons under the Umbraco “Members” license — they install via NuGet and need a license key in env. Without it, they run for 30 days then disable.
appsettings.Production.jsonis loaded last and overridesappsettings.json— keep secrets only in the production file andchmod 600it.- The Examine index can corrupt after an unclean shutdown — Umbraco rebuilds it on next start, but searches return empty until the rebuild finishes. Plan startup time accordingly on big sites.
For organizations that picked Umbraco for editorial reasons but want to leave Windows behind, Stack Harbor operates the Linux stack — .NET 8 LTS pinned, Kestrel behind Nginx, PostgreSQL backed up, Examine indexes regenerated as part of deploy — so the marketing team only sees the editor. That model lives under managed operations, with related notes in the knowledge base.