Swift 6.3 Server-Side Runtime on Ubuntu 24.04 on Azure User Guide
Overview
This guide covers the deployment and use of the Swift 6.3 Server-Side Runtime on Ubuntu 24.04 on Azure from the cloudimg Azure Marketplace images.
This image is a server-side Swift development and runtime environment. You connect to it over SSH and use it to build, run, test and debug your own Swift services. It ships the complete official toolchain — the Swift compiler, Swift Package Manager, the LLDB debugger and the Foundation library — so a project can be compiled and run the moment the instance is up. It runs no network service of its own: after first boot the only listening socket reachable from outside the machine is SSH on port 22. There is no web console and no credential of any kind ships in the image — there is nothing to log in to and nothing to rotate.
The toolchain is Swift 6.3.3 (swift-6.3.3-RELEASE, released 2026-06-30, the current stable release), installed from the official signed swift.org tarball for Ubuntu 24.04. At build time cloudimg imports the Swift release-signing key, verifies the tarball's GPG signature (a "Good signature from the Swift 6.x Release Signing Key"), and additionally pins the exact bytes by SHA-256 — so the compiler in the image is provably the one swift.org published, not a source rebuild and not a distribution package.
This is not a managed hosting product. You develop and deploy your own Swift applications on it. A small, real server-side Swift sample built on SwiftNIO — the event-driven networking framework that Vapor and Hummingbird are built on — is included as source so you can prove the toolchain end to end straight away.
What is included
- Swift 6.3.3 from the official swift.org Ubuntu 24.04 tarball, at
/opt/swift, withswift,swiftcandsourcekit-lspon the defaultPATH(they work in login shells, non-interactive SSH commands and systemd units alike) - Swift Package Manager (
swift build,swift run,swift test,swift package) for resolving and building package dependencies - LLDB for debugging and Foundation for the standard library beyond the core
- sourcekit-lsp, the Swift language server, so VS Code Remote-SSH, Zed, Neovim or any other LSP editor gives you completion and navigation the moment you connect
- A working SwiftNIO HTTP server sample in source form at
/srv/swift-workspace/sample(a copy is placed there for your admin user on first boot; the pristine copy lives at/usr/local/share/cloudimg-swift/sample) cloudimg-swift-selftest, a single command that compiles and runs a native program, then builds and runs the SwiftNIO sample and calls it withcurl, so you can confirm the machine works before trusting it with your own code- Every upstream Apache-2.0 licence and notice harvested into
/usr/share/doc/cloudimg-swift/licenses/
Deploying on Azure
- Launch the Swift 6.3 Server-Side Runtime on Ubuntu 24.04 image from the Azure Marketplace.
- Choose a size.
Standard_B2s(2 vCPU, 4 GB) is sufficient — a clean build of the SwiftNIO sample peaks well under 1 GB of memory. For larger builds or many parallel compile jobs, a larger size with more vCPUs will compile faster. - Provide your SSH public key when prompted. Azure injects it for the
azureuseraccount; this is the only login credential and it is unique to your VM. - Once the VM is running, connect over SSH:
$ ssh azureuser@<public-ip>
On first login the message of the day summarises the toolchain, the sample location and the verify command.
Verifying the toolchain
Confirm the pinned toolchain and the resolved environment:
swift --version
which swift swiftc sourcekit-lsp
cat /var/lib/cloudimg/swift-workspace.env
swift --version reports Swift version 6.3.3 (swift-6.3.3-RELEASE). The environment manifest at /var/lib/cloudimg/swift-workspace.env is written once by the first-boot service and records the toolchain version, its location and your workspace path. It contains no secrets — this image runs no network service.

The fastest way to prove the whole toolchain — compiler, linker, package manager and runtime — is the bundled self-test. It compiles and runs a native Swift program, then builds the SwiftNIO sample, starts it on the loopback interface and calls it with curl:
cloudimg-swift-selftest
Every check should print a line beginning ok and the run ends with cloudimg-swift-selftest: ALL CHECKS PASSED.

Building and running a server-side Swift app
The included sample is a minimal HTTP server built on SwiftNIO. Copy it into a scratch directory, build it, run it and call it:
$ cp -a /srv/swift-workspace/sample ~/myserver
$ cd ~/myserver
$ swift build
Fetching https://github.com/apple/swift-nio.git
...
Build complete!
$ swift run &
cloudimg-swift-sample listening on 127.0.0.1:8080
$ curl http://127.0.0.1:8080/
CLOUDIMG_SWIFT_OK Swift 6.3.3 server-side runtime on SwiftNIO
The first swift build resolves SwiftNIO from its pinned version in Package.resolved and compiles it; subsequent builds are incremental. By default the sample binds 127.0.0.1; set CLOUDIMG_SWIFT_HOST=0.0.0.0 and CLOUDIMG_SWIFT_PORT=<port> to expose it, and open that port in your Azure network security group.
The self-contained round trip below builds the sample, starts the server, calls it and stops it — a single block you can run to prove the compile, link, dependency resolution and run path end to end:
D="$(mktemp -d)"; cp -a /usr/local/share/cloudimg-swift/sample/. "$D/"; cd "$D"
swift build -j 1 2>&1 | tail -2
BIN="$(swift build --show-bin-path)/SwiftSample"
CLOUDIMG_SWIFT_HOST=127.0.0.1 CLOUDIMG_SWIFT_PORT=18080 "$BIN" >/tmp/swift-demo.log 2>&1 &
SRV=$!; for i in $(seq 1 20); do curl -fsS -m2 http://127.0.0.1:18080/ >/dev/null 2>&1 && break; sleep 1; done
curl -s http://127.0.0.1:18080/
kill "$SRV" 2>/dev/null; cd /; rm -rf "$D"

Writing your own service
Start a fresh package and add a server-side framework. SwiftNIO is already proven on this image; Vapor and Hummingbird both build on it and resolve the same way:
$ mkdir ~/myapi && cd ~/myapi
$ swift package init --type executable
$ # edit Package.swift to add, for example:
$ # .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0")
$ swift build
$ swift run
swift build fetches and pins dependencies into Package.resolved; commit that file so your builds are reproducible. Run swift test to execute your test targets. For an editor experience, point any LSP-capable editor at the sourcekit-lsp binary on this machine over Remote-SSH — it is already on the PATH.
To run your service under systemd so it survives reboots, build a release binary with swift build -c release, install it to a fixed path, and write a unit that runs it as an unprivileged user. The image intentionally ships no enabled service of its own, so nothing competes with yours.
Security and licences
This image has a deliberately small attack surface. It runs no network service: the only listening socket on a fresh instance is SSH on port 22 (plus the loopback-only systemd DNS stub resolver, which is not reachable off-box). There is no default credential anywhere, because there is nothing to authenticate against. Confirm it yourself:
ss -Hltn
head -16 /usr/share/doc/cloudimg-swift/licenses/NOTICE
find /usr/share/doc/cloudimg-swift/licenses -type f | wc -l
Every bundled component — the Swift compiler and standard library, Swift Package Manager, Foundation, and the bundled LLDB/LLVM/clang — is Apache-2.0 (the compiler and standard library carry the Swift Runtime Library Exception; the bundled LLVM tools carry the LLVM Exception). SwiftNIO, the sample's only dependency, is Apache-2.0. There is no GPL, AGPL, BSL or SSPL component in the image. Every upstream licence and notice is harvested verbatim into /usr/share/doc/cloudimg-swift/licenses/ and indexed by a single NOTICE file.

The image ships fully patched and keeps unattended security updates enabled, so a customer VM continues to receive OS security updates after launch.
Trademarks
Swift is a trademark of Apple Inc. The open-source Swift programming language and its swift.org toolchain are stewarded by the Swift project community. cloudimg is not affiliated with, sponsored by, or endorsed by Apple Inc. The Swift name is used here only to identify the software this image contains.
Support
cloudimg images ship fully patched with a paired deployment guide and 24/7 support. If you need help deploying or using this image, contact cloudimg support.