Load testing is easier when you can check a staging site before a real traffic spike finds slow pages or fragile application code. To install Siege on Ubuntu, use the repository package for the quickest setup or compile the upstream HTTP benchmarking tool when you want the newest release in /usr/local/bin.
Here, Siege means the command-line HTTP load tester, not Rainbow Six Siege or R6 game compatibility. Ubuntu 26.04 packages Siege 4.1.6, Ubuntu 24.04 and 22.04 package Siege 4.0.7, and the source path currently builds Siege 4.1.7 from the official tarball.
Install Siege on Ubuntu
Two installation paths are available for Siege on Ubuntu. The APT package is the fastest option for most benchmarks, while the source build installs the current upstream release in /usr/local/bin.
| Method | Channel | Version | Updates | Best For |
|---|---|---|---|---|
| APT Package Manager | Ubuntu repositories | 4.1.6 on Ubuntu 26.04; 4.0.7 on Ubuntu 24.04 and 22.04 | Automatic through APT | Most users who want the quickest setup |
| Source Compilation | Official Siege downloads | Current upstream tarball, 4.1.7 | Manual rebuilds | Users who want the newest upstream build in /usr/local/bin |
For most users, the APT method is recommended because it keeps Siege tied to Ubuntu updates and takes less maintenance. Compile from source only when you specifically want the upstream release ahead of Ubuntu’s packaged version.
These steps support Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS. The APT and source workflows stay consistent across all three releases, and the source build uses an explicit configure line so Siege 4.1.7 compiles cleanly on Ubuntu 26.04.
Update Ubuntu Before Installing Siege
Refresh package metadata first so Ubuntu sees the latest repository state before you install anything new.
sudo apt update && sudo apt upgrade
These commands use
sudofor tasks that need root privileges. If your account is not in the sudoers file yet, follow the guide on how to add a new user to sudoers on Ubuntu before continuing.
Install Siege from Ubuntu Repositories
Ubuntu ships the siege package in its default repositories, so no PPA or vendor repository is needed. Ubuntu 26.04 currently installs Siege 4.1.6, while Ubuntu 24.04 and 22.04 install Siege 4.0.7.
sudo apt install siege
Verify that the package is installed and available in your shell:
siege --version
SIEGE 4.1.6 Copyright (C) 2023 by Jeffrey Fulmer, et al. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On Ubuntu 24.04 LTS and 22.04 LTS, the same version check currently reports
SIEGE 4.0.7.
Compile Siege from Source on Ubuntu
Compile Siege from source when you want the upstream release instead of Ubuntu’s packaged build. If you keep both methods installed, the source build in /usr/local/bin takes priority over the repository binary in /usr/bin.
Install Siege Build Dependencies
Install the compiler toolchain, zlib headers, and wget before you download the upstream source archive. The wget command examples guide is useful if you want more download options later.
sudo apt install build-essential zlib1g-dev wget
Download the Siege Source Archive
Use a dedicated build directory under your home folder so the extracted source tree is easy to remove later.
mkdir -p ~/src/siege-build
cd ~/src/siege-build
wget https://download.joedog.org/siege/siege-latest.tar.gz
tar -xzf siege-latest.tar.gz
cd siege-*/
A successful download ends with a saved archive. The timestamp and transfer rate will vary:
--[timestamp]-- https://download.joedog.org/siege/siege-latest.tar.gz HTTP request sent, awaiting response... 200 OK Length: [archive size] [application/x-tar] Saving to: 'siege-latest.tar.gz' [timestamp] ([transfer rate varies]) - 'siege-latest.tar.gz' saved [archive size]
Compile and Install Siege
The extra CPPFLAGS and CFLAGS keep Siege 4.1.7 building on Ubuntu 26.04’s newer toolchain and still work on Ubuntu 24.04 and 22.04.
CPPFLAGS="-DHAVE_STRCASECMP -DHAVE_STRNCASECMP" CFLAGS="-std=gnu17" ./configure --with-zlib
make
sudo make install
Relevant output from a successful configure and install run includes:
Configuration is complete Run the following commands to complete the installation: make make install HTML pages not installed
Verify the Source Build
Check that the source build is the active binary and that it reports the upstream version:
which siege
siege --version
/usr/local/bin/siege SIEGE 4.1.7 Copyright (C) 2024 by Jeffrey Fulmer, et al. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If both installation methods are present,
/usr/local/bin/siegefrom the source build stays first in Ubuntu’s default PATH. Removing the source build later returns control to the APT package at/usr/bin/siege.
Create a Siege Update Script
Save this helper script when you want an easy way to compare your installed version with the latest upstream tarball and rebuild Siege in the same way later.
nano ~/update-siege.sh
Paste the script below into that file, save it, and then make it executable. The chmod command guide explains permission changes in more detail if you want to review what the executable bit does.
If you use nano, press Ctrl+O, then Enter to save the file, and Ctrl+X to exit the editor.
#!/usr/bin/env bash
set -euo pipefail
# Install location and update workspace
INSTALL_PREFIX="/usr/local"
BUILD_ROOT="$HOME/src/siege-update"
ARCHIVE_NAME="siege-latest.tar.gz"
LOG_FILE="$HOME/siege-update.log"
# Confirm the required build tools are available
for cmd in gcc make wget tar awk sed; do
if ! command -v "$cmd" > /dev/null 2>&1; then
echo "Missing required command: $cmd"
echo "Install the dependencies first with: sudo apt install build-essential zlib1g-dev wget"
exit 1
fi
done
mkdir -p "$BUILD_ROOT"
cd "$BUILD_ROOT"
echo "Downloading the latest Siege source archive..."
rm -f "$ARCHIVE_NAME"
wget -q "https://download.joedog.org/siege/$ARCHIVE_NAME"
# Read the version from the tarball's top-level directory
LATEST_DIR=$(tar -tzf "$ARCHIVE_NAME" | sed -n '1{s#/.*##;p;}')
if [ -z "$LATEST_DIR" ]; then
echo "Could not determine the latest Siege version from $ARCHIVE_NAME"
exit 1
fi
LATEST_VERSION=${LATEST_DIR#siege-}
if [ -x "$INSTALL_PREFIX/bin/siege" ]; then
CURRENT_VERSION=$("$INSTALL_PREFIX/bin/siege" --version 2>&1 | awk '/^SIEGE / { print $2; exit }')
if [ -z "$CURRENT_VERSION" ]; then
echo "Could not determine the installed Siege version from $INSTALL_PREFIX/bin/siege"
exit 1
fi
else
CURRENT_VERSION="none"
fi
echo "Current version: $CURRENT_VERSION"
echo "Latest version: $LATEST_VERSION"
if [ "$CURRENT_VERSION" = "$LATEST_VERSION" ]; then
echo "Siege is already up to date."
exit 0
fi
if ! sudo true; then
echo "This script needs sudo access to install Siege into $INSTALL_PREFIX."
exit 1
fi
echo "Extracting Siege $LATEST_VERSION..."
rm -rf "$LATEST_DIR"
tar -xzf "$ARCHIVE_NAME"
cd "$LATEST_DIR"
echo "Configuring the build..."
CPPFLAGS="-DHAVE_STRCASECMP -DHAVE_STRNCASECMP" CFLAGS="-std=gnu17" ./configure --with-zlib
echo "Compiling Siege..."
make
echo "Installing Siege to $INSTALL_PREFIX..."
sudo make install
NEW_VERSION=$("$INSTALL_PREFIX/bin/siege" --version 2>&1 | awk '/^SIEGE / { print $2; exit }')
if [ -z "$NEW_VERSION" ]; then
echo "Installed Siege, but could not verify the installed version."
exit 1
fi
echo "$(date '+%Y-%m-%d %H:%M:%S') Updated Siege to $NEW_VERSION" >> "$LOG_FILE"
echo "Installed version: $NEW_VERSION"
echo "Cleaning up the extracted source tree..."
cd "$BUILD_ROOT"
rm -rf "$LATEST_DIR"
echo "Update complete."
chmod +x ~/update-siege.sh
~/update-siege.sh
Downloading the latest Siege source archive... Current version: 4.1.7 Latest version: 4.1.7 Siege is already up to date.
If upstream publishes a newer release, the script continues into the configure, build, and install stages automatically.
Run this script manually instead of scheduling it with cron. Rebuilding source packages can fail because of dependency changes, compiler changes, or upstream tarball updates, and manual runs let you review the output before anything changes under
/usr/local.
Configure Siege on Ubuntu
Both installation methods create the active user config in ~/.siege/siege.conf on first run. The APT package keeps its templates in /etc/siege/, while the source build uses /usr/local/etc/.
View the Active Siege Configuration
Run siege -C to print the currently active configuration, including the resource file, URL list, and log destination.
siege -C
Relevant output includes the installed version and default runtime settings:
CURRENT SIEGE CONFIGURATION Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/[installed version] Edit the resource file to change the settings. ---------------------------------------------- version: [installed version] verbose: true color: true quiet: false debug: false protocol: HTTP/1.1 HTML parser: enabled get method: HEAD connection: close concurrent users: 25
Edit Siege Defaults
Edit the user config file when you want to change your default concurrency, delays, logging, or CSV output.
nano ~/.siege/siege.conf
These settings are the ones most readers change first:
verbose: Show detailed request output during each testcsv: Write output in CSV format for later analysisconcurrent: Set the number of simulated userstime: Set how long the test runs, such as1Mor30Sdelay: Add a pause between requests from each userbenchmark: Remove delays so Siege fires requests as fast as possible
Example settings for a 25-user test with one-second pauses between requests:
verbose = false csv = true concurrent = 25 time = 1H delay = 1S internet = false benchmark = false
Check the Active Siege Log Path
Confirm the log destination on your system before you enable logging, because the APT package and the source build report different default paths.
siege -C | grep "log file"
APT package: log file: /var/log/log/siege.log Source build: log file: /usr/local/var/log/siege.log
The APT package currently reports /var/log/log/siege.log through siege -C, even though the packaged comments still reference /var/log/siege.log. Check your local output before you rely on either path, then run a test once logging is enabled so Siege can create the file.
Run HTTP Load Tests with Siege on Ubuntu
Only run load tests against systems you own or have explicit permission to test. Unauthorized benchmarking can violate acceptable-use policies, trigger incident response, or be treated as a denial-of-service attack.
Once Siege is installed, you can use it for quick checks against a single URL or longer runs against a custom URL list.
Run a Basic Siege Load Test
This command runs a one-minute test against a single URL with Siege’s default concurrency value. Replace the placeholder hostname with a site you control.
siege https://staging.example.com -t 1m
Siege prints a summary at the end of the run with availability, response time, throughput, and completed transactions. The version line reflects your installed build, and the exact numbers depend on your target, network, and test duration:
** SIEGE [installed version] ** Preparing 25 concurrent users for battle. The server is now under siege... Lifting the server siege... Transactions: [varies] hits Availability: [varies] % Elapsed time: [varies] secs Data transferred: [varies] MB Response time: [varies] ms Transaction rate: [varies] trans/sec Throughput: [varies] MB/sec Successful transactions: [varies] Failed transactions: [varies]
Increase Siege Concurrent Users
Use the -c flag when you want more simultaneous users hitting the same target.
siege https://staging.example.com -c 100 -t 2m
Higher concurrency is useful when you want to compare reverse proxy tuning, PHP worker counts, database caching, or other changes under heavier traffic.
Test Multiple URLs with Siege
Put your target URLs in a user-owned file so the same workflow works for the APT package and the source build.
nano ~/siege-urls.txt
https://staging.example.com https://staging.example.com/api/endpoint https://staging.example.com/products
Run the list with -f after you save the file:
siege -f ~/siege-urls.txt
Add Delay Between Siege Requests
Use -d when you want a more natural request pattern instead of nonstop benchmarking traffic.
siege https://staging.example.com -c 50 -d 5
This example keeps 50 concurrent users active and inserts a random pause of up to five seconds between their requests.
Test POST and PUT Requests with Siege
Siege can replay API requests from the same URL file format you use for basic page tests.
nano ~/siege-urls.txt
https://api.example.com/users POST {"name":"testuser","email":"test@example.com"}
https://api.example.com/data PUT {"key":"value"}
https://api.example.com/upload POST </path/to/data.json
Run the request list and send the correct content type header with it:
siege -f ~/siege-urls.txt -H "Content-Type: application/json"
Enable Siege Logging on Ubuntu
Turn logging on in your user config file when you want Siege to keep a persistent run history instead of only printing the end-of-test summary.
nano ~/.siege/siege.conf
logging = true show-logfile = true
After you save the file, rerun siege -C | grep "log file" so you know which path your build is using before you review the logs.
Remove Siege from Ubuntu
Use the removal path that matches the way Siege was installed on your system.
Remove the APT Siege Package
Remove the package first. Keep dependency cleanup separate so you can review APT’s list before removing packages that may belong to other software.
sudo apt remove siege
If APT reports unused dependencies after removal, preview them before you delete anything:
sudo apt autoremove --dry-run
Run sudo apt autoremove only if the preview contains packages you actually want to remove. On reused desktop systems, this list can include unrelated old kernels, desktop helpers, or packages from earlier work.
If you also want to remove the packaged configuration files under /etc/siege/, purge the package after the normal removal step:
sudo apt purge siege
The next command permanently deletes your user config and cookies in
~/.siege/. Back up~/.siege/siege.conffirst if you want to keep custom defaults or saved test data.
rm -rf ~/.siege
Verify that the APT package is no longer installed:
dpkg -l siege | grep '^ii' || echo "siege package is not installed"
siege package is not installed
Remove the Source-Compiled Siege Build
If the source tree still exists, use the upstream uninstall target from the extracted build directory:
cd ~/src/siege-build/siege-*/
sudo make uninstall
If the source tree is gone, remove the files installed by the validated make install run manually:
sudo rm -f /usr/local/bin/siege /usr/local/bin/bombardment /usr/local/bin/siege2csv.pl /usr/local/bin/siege.config
sudo rm -f /usr/local/etc/siegerc /usr/local/etc/urls.txt
sudo rm -f /usr/local/var/log/siege.log
sudo rm -f /usr/local/share/man/man1/siege.1 /usr/local/share/man/man1/siege2csv.1 /usr/local/share/man/man1/siege.config.1 /usr/local/share/man/man1/bombardment.1
The next command permanently deletes your user config, source tree, update workspace, update log, and helper script. Back up
~/.siege/siege.conffirst if you want to keep your current defaults.
rm -rf ~/.siege ~/src/siege-build ~/src/siege-update ~/update-siege.sh ~/siege-update.log
Confirm that the source-installed binary is gone from /usr/local/bin:
test ! -x /usr/local/bin/siege && echo "Source build removed from /usr/local/bin"
Source build removed from /usr/local/bin
If the APT package is still installed, removing the source build exposes
/usr/bin/siegeagain automatically because it remains later in Ubuntu’s default PATH.
Conclusion
Siege is ready on Ubuntu for controlled HTTP benchmarks, either through APT or the newer source build in /usr/local/bin. For realistic targets on your own systems, pair it with Install Nginx on Ubuntu or Install Apache on Ubuntu.


Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>