# Requirements of Single Server mode

What does Single Server mode need from the server?

Single Server mode (The mode in which the Backend and all its jobs run on one Linux machine, the server, with no Kubernetes cluster.) does not use the [Kubernetes contract](/infrastructure-contract/). It needs one machine with network access, the correct operating system, and enough disk space and memory. MiLaboratories provides the Backend (The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs.) as one binary file or as a Docker image that runs on this machine.

## Network access

The server needs only a few connections to the internet, and all of them use HTTPS on TCP port 443. Thus the operator (The person who installs and runs Platforma in your company, for example an IT engineer or a bioinformatician.) can write the firewall rules from the two tables in this section. Only the license service cannot have a mirror in the company: for the registries, the operator can set mirrors and then allow only the license service. For all hosts, including the hosts of a Kubernetes (A system that runs programs on a group of machines (a cluster). Platforma can run in a Kubernetes cluster.) cluster, see [Outbound connections](/security-outbound-connections/).

### Connections from the server

| Host                                                                                                                                        | Port                | Used by                                                                                                                                                                      | Required?                                                                                                                                                                        | What for                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `licensing-api.milaboratories.com`                                                                                                          | 443 (HTTPS)         | Backend; jobs (One run of a tool on data. The Backend starts jobs on the server where it runs, or in a Kubernetes cluster.) of tools that check their license, such as MiXCR | Required, no mirror                                                                                                                                                              | Checks the license                                                                                                                                                                                                                                                                               |
| `bin.pl-open.science`, or `bin-ga.pl-open.science` in the restricted network mode                                                           | 443 (HTTPS)         | Backend                                                                                                                                                                      | Required, or a mirror                                                                                                                                                            | Gets the software packages of the tools and the assets, for example reference genomes                                                                                                                                                                                                            |
| `blocks.pl-open.science`, or `blocks-ga.pl-open.science` in the restricted network mode                                                     | 443 (HTTPS)         | Backend                                                                                                                                                                      | Required, or a mirror                                                                                                                                                            | Gets the workflows (The part of a Block that runs in the Backend. It starts the tools on the data and collects the results. Users do not edit it.) of the Blocks (A small application for one step of an analysis, for example the import of reads or clustering. It can combine several tools.) |
| `containers.pl-open.science`                                                                                                                | 443 (HTTPS)         | Docker on the server                                                                                                                                                         | Only with Docker; or a mirror                                                                                                                                                    | Gets the images of the tools                                                                                                                                                                                                                                                                     |
| `quay.io` and the content delivery hosts of quay.io, for example `cdn01.quay.io`                                                            | 443 (HTTPS)         | Docker on the server                                                                                                                                                         | Only with Docker, when there is no mirror                                                                                                                                        | `containers.pl-open.science` forwards the requests to quay.io. Docker gets its access token from `quay.io` and the image layers from a `cdn*.quay.io` host                                                                                                                                       |
| Identity provider or LDAP (The directory of users of a company. The Backend can check logins and passwords in it.) directory of the company | Set by the operator | Backend                                                                                                                                                                      | With SSO (Sign-in through the identity service of the company, with the same account as for other company systems.) or LDAP                                                      | Signs in (To show the Backend who you are, with a sign-in provider or a single-user token. The verb is "sign in"; the noun and the adjective are "sign-in".) the users                                                                                                                           |
| Storage of the company: a bucket, or a network folder                                                                                       | Set by the operator | Backend                                                                                                                                                                      | Required when the primary storage (The bucket (Amazon S3 or Google Cloud Storage) or folder where Platforma keeps all results and uploaded files.) is not a folder on the server | Keeps the data and the results                                                                                                                                                                                                                                                                   |

In Single Server mode, the Backend does not send [usage records](/security-outbound-connections/#usage-records), so it does not connect to the monitoring service `mon.pl-open.science`.

### Connections from the computers of the users

| Host                                                                                           | Port                                                                         | Used by                                                                                                                        | Required?                                                         | What for                                                                                                                           |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| The server                                                                                     | 6345 (gRPC API) and 6347 (data address), or the ports that the operator sets | Desktop App (The program that each user installs on their own computer to work with Platforma. It is a client of the Backend.) | Required; 6347 when the primary storage is a folder on the server | Connects to the Backend, and uploads and downloads the files of a folder storage. See [Open ports](/security-overview/#open-ports) |
| Storage bucket of the company                                                                  | Set by the operator                                                          | Desktop App                                                                                                                    | When the primary storage is a bucket                              | Uploads and downloads the files directly                                                                                           |
| `blocks.pl-open.science`, and `blocks-ga.pl-open.science` when the first host is not available | 443 (HTTPS)                                                                  | Desktop App                                                                                                                    | Required, or a mirror                                             | Gets the Blocks                                                                                                                    |
| `cdn-ga.platforma.bio`                                                                         | 443 (HTTPS)                                                                  | Desktop App                                                                                                                    | Optional                                                          | Gets the updates of the Desktop App                                                                                                |
| `intercom-api.platforma.bio`, then `help.platforma.bio`                                        | 443 (HTTPS)                                                                  | Desktop App                                                                                                                    | Only when users open the help                                     | Support chat                                                                                                                       |
| Identity provider of the company                                                               | Set by the operator                                                          | Browser on the computer                                                                                                        | With SSO                                                          | Signs in the users                                                                                                                 |

### Restricted network mode

A restricted network mode exists for a network with only limited access to the internet. In this mode, the Backend uses the `-ga` hosts, `bin-ga.pl-open.science` and `blocks-ga.pl-open.science`, instead of `bin.pl-open.science` and `blocks.pl-open.science`. The `-ga` hosts are AWS Global Accelerator addresses: they answer on two fixed IP addresses, `75.2.96.100` and `99.83.215.63`. Thus a firewall that cannot allow by host name can allow these two IP addresses. The other services of MiLaboratories in the table, `licensing-api.milaboratories.com`, `containers.pl-open.science` and `cdn-ga.platforma.bio`, resolve to the same two IP addresses, so the firewall can also allow them by IP address. To turn on the mode, see [Restricted network mode](/configuration-proxy-and-custom-ca/#restricted-network-mode). The hosts of quay.io and `help.platforma.bio` do not have fixed IP addresses: with Docker in such a network, use a mirror of the images.

## Operating system

The server must be Linux on amd64 (x86-64), because the tools that Blocks use, run in Docker, are built for amd64. Docker is optional: when the Backend is set up to use it, each job runs in its own container and the tools come as images. For the ports on which the Backend listens, see [Open ports](/security-overview/#open-ports).

The Backend binary also needs these items from the system:

- **glibc 2.28 or later.** At start, the Backend reads the glibc version (`ldd --version`). If the version is older than 2.28 (Rocky Linux 8), the Backend stops with the error `glibc version is too old`. If the version is newer than 2.39 (Ubuntu 24.04), the Backend writes a warning, because MiLaboratories did not test this version, and continues.
- **The C++ runtime of the system** (`libstdc++.so.6` and `libgcc_s.so.1`). The archive of the Backend contains RocksDB and the compression libraries in `binaries/libs`, but not the C++ runtime. The RocksDB library needs `GLIBCXX_3.4.22` and `CXXABI_1.3.11`, that is, the `libstdc++` of GCC 7 or later.
- **A limit of at least 500,000 open files.** At start, if the soft limit of open files is less than 500,000, the Backend tries to increase it to 500,000. This is possible only when the hard limit is 500,000 or more. If the Backend cannot increase the limit, it writes the error `Open file limit is too low.` and continues, but jobs can fail when they open many files. Set the limit for the user that runs the Backend: `LimitNOFILE=500000` in the systemd unit of the Backend, or the `nofile` lines in `/etc/security/limits.conf` for a Backend that you start from a shell.

The Backend does not need cgroups. The Backend can run in a cgroup with a memory limit (cgroup v2 or v1), for example in a container or in a systemd unit with `MemoryMax`. Then it uses this limit as the memory of the server. When there is no limit, it uses all the memory of the server. The Backend does not check the Docker version: at start, it runs `docker version`, and if Docker is not available, it writes a warning.

## Disk space

Use at least 1 TiB, and more is better. The Backend keeps the downloaded software archives for 3 months and the installed tools for 2 weeks after their last use. One reference genome is up to 26 GiB (human), and one tool image is up to about 3 GiB compressed. The results (the primary storage, when it is a folder on the server) and the working folders of the jobs need more space, by the size of the data.

## Memory

The main limits of Single Server mode are the memory and the CPUs (The compute units of a node or of the server, as Kubernetes and the operating system count them. A job asks for a number of CPUs. The cloud quotas call them vCPUs.) of the server, and more is better. For real computation work, use at least 128 GiB of RAM; 256 GiB is recommended, but with some raw data even this memory lets the server process the samples only one after another. The tools need this memory to process raw sequencing data (FASTQ). The actual demand depends on the quality and the size of the raw data and on the analysis.

## Memory examples

These examples use MiXCR Clonotyping, the main Block of most analyses, with the same inputs as [Size and cost of an analysis](/plan-analysis-size-and-cost/#examples-10-and-100-million-reads-per-sample). The Block splits its work into separate jobs, and each job asks only for the memory and the CPUs that it needs. The Backend starts a job when the memory and the CPUs that the running jobs leave free fit its request. Thus the requests of the jobs that run at the same time set how many samples run in parallel. The numbers include a safety margin:

|                      | 10 M reads per sample × 10 samples                                     | 100 M reads per sample × 100 samples                                                                             |
| -------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| For each sample      | Jobs of up to 32 GiB and 16 CPUs; about 12 GiB of temporary disk space | Jobs of up to 74 GiB (up to 256 GiB for very diverse data) and 16 CPUs; at least 120 GiB of temporary disk space |
| Once for all samples | 64 GiB, 8 CPUs                                                         | At least 64 GiB, 8 CPUs; more for a very large project                                                           |

For the time and the cost of these examples, and for the same examples in a cluster, see [Size and cost of an analysis](/plan-analysis-size-and-cost/#how-much-an-analysis-needs).

**Example:**

A server with 256 GiB of memory (memory modules use binary units: 1 GiB = 1024³ bytes). The operating system keeps a part for itself and reports a little less, for example 250 GiB. By default, the Backend gives 95% of this memory to the jobs: about 237 GiB. The other 5% stays for the operating system and the Backend. Of the 237 GiB, the Backend keeps 5 GiB for the jobs that update the user interface. Of the other 232 GiB, the large jobs of the samples can use all but 5 GiB: about 227 GiB. Thus 7 jobs of 32 GiB can run at the same time (7 × 32 = 224 GiB), or 3 jobs of 74 GiB (3 × 74 = 222 GiB). The jobs that run at the same time can ask for up to 4 times the CPUs of the server. Each of these jobs asks for 16 CPUs. So the 7 jobs need a server with at least 28 CPUs (7 × 16 = 112 = 4 × 28). The 3 jobs need at least 12 (3 × 16 = 48 = 4 × 12).

## Next

- [Permissions](/plan-permissions/)
- [Prerequisites checklist](/plan-prerequisites-checklist/)
- [Install in Single Server mode](/install-single-server/)

Source: https://docs.platforma.bio/plan-single-server-requirements/
