Admin Quick Start

This quick start gives an overview of installation of SingularityCE from source, a description of the architecture of SingularityCE, and pointers to configuration files. More information, including alternate installation options and detailed configuration options can be found later in this guide.

Architecture of SingularityCE

SingularityCE is designed to allow containers to be executed as if they were native programs or scripts on a host system. No daemon is required to build or run containers, and the security model is compatible with shared systems.

As a result, integration with clusters and schedulers such as Univa Grid Engine, Torque, SLURM, SGE, and many others is as simple as running any other command. All standard input, output, errors, pipes, IPC, and other communication pathways used by locally running programs are synchronized with the applications running locally within the container.

SingularityCE favors an ‘integration over isolation’ approach to containers. By default only the mount namespace is isolated for containers, so that they have their own filesystem view. Access to hardware such as GPUs, high speed networks, and shared filesystems is easy and does not require special configuration. Default access to user home directories, /tmp space, and installation specific mounts makes it simple for users to benefit from the reproducibility of containerized applications without major changes to their existing workflows. Where more complete isolation is important, SingularityCE can use additional Linux namespaces and other security and resource limits to accomplish this.

SingularityCE Security


See also the security section of this guide, for more detail.

SingularityCE uses a number of strategies to provide safety and ease-of-use on both single-user and shared systems. Notable security features include:

  • The user inside a container is the same as the user who ran the container. This means access to files and devices from the container is easily controlled with standard POSIX permissions.

  • Container filesystems are mounted nosuid and container applications run with the prctl NO_NEW_PRIVS flag set. This means that applications in a container cannot gain additional privileges. A regular user cannot sudo or otherwise gain root privilege on the host via a container.

  • The Singularity Image Format (SIF) supports encryption of containers, as well as cryptographic signing and verification of their content.

  • SIF containers are immutable and their payload is run directly, without extraction to disk. This means that the container can always be verified, even at runtime, and encrypted content is not exposed on disk.

  • Restrictions can be configured to limit the ownership, location, and cryptographic signatures of containers that are permitted to be run.

To support the SIF image format, automated networking setup etc., and older Linux distributions without user namespace support, Singularity runs small amounts of privileged container setup code via a starter-setuid binary. This is a ‘setuid root’ binary, so that SingularityCE can perform filesystem loop mounts and other operations that need privilege. The setuid flow is the default mode of operation, but can be disabled on build, or in the singularity.conf configuration file if required.


Running SingularityCE in non-setuid mode requires unprivileged user namespace support in the operating system kernel and does not support all features, most notably direct mounts of SIF images. This impacts integrity/security guarantees of containers at runtime.

See the non-setuid installation section for further detail on how to install SingularityCE to run in non-setuid mode.

Installation from Source

SingularityCE can be installed from source directly, or by building an RPM package from the source. Linux distributions may also package SingularityCE, but their packages may not be up-to-date with the upstream version on GitHub.

To install SingularityCE directly from source, follow the procedure below. Other methods are discussed in the Installation section.


This quick-start that you will install as root using sudo, so that SingularityCE uses the default setuid workflow, and all features are available. See the non-setuid installation section of this guide for detail of how to install as a non-root user, and how this affects the functionality of SingularityCE.

Install Dependencies

On Red Hat Enterprise Linux or CentOS install the following dependencies:

# Install basic tools for compiling
sudo yum groupinstall -y 'Development Tools'
# Install RPM packages for dependencies
sudo yum install -y \
   wget \
   libseccomp-devel \
   glib2-devel \
   squashfs-tools \
   cryptsetup \

On Ubuntu or Debian install the following dependencies:

# Ensure repositories are up-to-date
sudo apt-get update
# Install debian packages for dependencies
sudo apt-get install -y \
   wget \
   build-essential \
   libseccomp-dev \
   libglib2.0-dev \
   pkg-config \
   squashfs-tools \
   cryptsetup \

_Note - runc can be ommitted if you will not use the singularity oci commands._

Install Go

SingularityCE v3 is written primarily in Go, and you will need Go installed to compile it from source. Versions of Go packaged by your distribution may not be new enough to build SingularityCE.

{SingularityCE} aims to maintain support for the two most recent stable versions of Go. This corresponds to the Go Release Maintenance Policy and Security Policy, ensuring critical bug fixes and security patches are available for all supported language versions.

The method below is one of several ways to install and configure Go.


If you have previously installed Go from a download, rather than an operating system package, you should remove your go directory, e.g. rm -r /usr/local/go before installing a newer version. Extracting a new version of Go over an existing installation can lead to errors when building Go programs, as it may leave old files, which have been removed or replaced in newer versions.

Visit the Go download page and pick a package archive to download. Copy the link address and download with wget. Then extract the archive to /usr/local (or use other instructions on go installation page).

$ export VERSION=1.18.1 OS=linux ARCH=amd64 && \
    wget$VERSION.$OS-$ARCH.tar.gz && \
    sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \
    rm go$VERSION.$OS-$ARCH.tar.gz

Finally, add /usr/local/go/bin to the PATH environment variable:

echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc

Download SingularityCE from a GitHub release

You can download SingularityCE from one of the releases. To see a full list, visit the GitHub release page. After deciding on a release to install, you can run the following commands to proceed with the installation.

$ export VERSION=3.10.0 && # adjust this as necessary \
    wget${VERSION}/singularity-ce-${VERSION}.tar.gz && \
    tar -xzf singularity-ce-${VERSION}.tar.gz && \
    cd singularity-ce-${VERSION}

Compile & Install SingularityCE

SingularityCE uses a custom build system called makeit. mconfig is called to generate a Makefile and then make is used to compile and install.

$ ./mconfig && \
    make -C ./builddir && \
    sudo make -C ./builddir install

By default SingularityCE will be installed in the /usr/local directory hierarchy. You can specify a custom directory with the --prefix option, to mconfig:

$ ./mconfig --prefix=/opt/singularity

This option can be useful if you want to install multiple versions of Singularity, install a personal version of SingularityCE on a shared system, or if you want to remove SingularityCE easily after installing it.

For a full list of mconfig options, run mconfig --help. Here are some of the most common options that you may need to use when building SingularityCE from source.

  • --sysconfdir: Install read-only config files in sysconfdir. This option is important if you need the singularity.conf file or other configuration files in a custom location.

  • --localstatedir: Set the state directory where containers are mounted. This is a particularly important option for administrators installing SingularityCE on a shared file system. The --localstatedir should be set to a directory that is present on each individual node.

  • -b: Build SingularityCE in a given directory. By default this is ./builddir.

  • --without-conmon: Do not build conmon, a container monitor that is used by the singularity oci commands. conmon is bundled with SingularityCE and will be built and installed by default. Use --without-conmon if you wish to use a version of conmon >=2.0.24 that is provided by your distribution rather than the bundled version. You can also specify --without-conmon if you know you will not use the singularity oci commands.

Installation from RPM/Deb Packages

Sylabs provides .rpm packages of SingularityCE, for mainstream-supported versions of RHEL and derivatives (e.g. Alma Linux / Rocky Linux). We also provide .deb packages for current Ubuntu LTS releases.

These packages can be downloaded from the GitHub release page and installed using your distribution’s package manager.

The packages are provided as a convenience for users of the open source project, and are built in our public CircleCI workflow. They are not signed, but SHA256 sums are provided on the release page.


SingularityCE is configured using files under etc/singularity in your --prefix, or --syconfdir if you used that option with mconfig. In a default installation from source without a --prefix set you will find them under /usr/local/etc/singularity. In a default installation from RPM or Deb packages you will find them under /etc/singularity.

You can edit these files directly, or using the SingularityCE config global command as the root user to manage them.

singularity.conf contains the majority of options controlling the runtime behavior of SingularityCE. Additional files control security, network, and resource configuration. Head over to the Configuration files section where the files and configuration options are discussed.

Test SingularityCE

You can run a quick test of SingularityCE using a container in the Sylabs Container Library:

$ singularity exec library://alpine cat /etc/alpine-release

See the user guide for more information about how to use SingularityCE.