requirements: Require some swap space if installed on < 5GB RAM.

This commit is contained in:
Alex Vandiver
2024-12-20 16:11:14 +00:00
committed by Tim Abbott
parent 2709e7a636
commit 3eb501fa18
2 changed files with 19 additions and 7 deletions

View File

@@ -11,9 +11,9 @@ To run a Zulip server, you will need:
- x86-64 - x86-64
- aarch64 - aarch64
- At least 2 GB RAM, and 10 GB disk space - At least 2 GB RAM, and 10 GB disk space
- If you have < 5 GB RAM, we require some swap space; we recommend configuring
2 GB of swap
- If you expect 100+ users: 4 GB RAM, and 2 CPUs - If you expect 100+ users: 4 GB RAM, and 2 CPUs
- If you intend to [upgrade from Git][upgrade-from-git]: 3 GB RAM, or
2G and at least 1G of swap configured.
- A hostname in DNS - A hostname in DNS
- Credentials for sending email - Credentials for sending email
@@ -63,11 +63,10 @@ sudo apt update
- CPU and memory: For installations with 100+ users you'll need a - CPU and memory: For installations with 100+ users you'll need a
minimum of **2 CPUs** and **4 GB RAM**. For installations with fewer minimum of **2 CPUs** and **4 GB RAM**. For installations with fewer
users, 1 CPU and 2 GB RAM is sufficient. We strongly recommend against users, 1 CPU and 2 GB RAM with 2 GB of swap is sufficient. We
installing with less than 2 GB of RAM, as you will likely experience recommend against using highly CPU-limited servers like the AWS `t2`
out of memory issues installing dependencies. We recommend against style instances for organizations with hundreds of users (active or
using highly CPU-limited servers like the AWS `t2` style instances no).
for organizations with hundreds of users (active or no).
- Disk space: You'll need at least 10 GB of free disk space for a - Disk space: You'll need at least 10 GB of free disk space for a
server with dozens of users. We recommend using an SSD and avoiding server with dozens of users. We recommend using an SSD and avoiding

View File

@@ -327,6 +327,19 @@ if [ "$mem_kb" -lt 1860000 ]; then
exit 1 exit 1
fi fi
# Anything under 5GB, we recommended allocating 2GB of swap. Error
# out if there's no swap.
swap_kb=$(grep SwapTotal /proc/meminfo | awk '{print $2}')
if [ "$mem_kb" -lt 5000000 ] && [ "$swap_kb" -eq 0 ]; then
set +x
echo -e '\033[0;31m' >&2
echo "No swap allocated; when running with < 5GB of RAM, we recommend at least 2GB of swap." >&2
echo "https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04" >&2
echo >&2
echo -e '\033[0m' >&2
exit 1
fi
# Do package update, e.g. do `apt-get update` on Debian # Do package update, e.g. do `apt-get update` on Debian
if [ "$package_system" = apt ]; then if [ "$package_system" = apt ]; then
# setup-apt-repo does an `apt-get update` # setup-apt-repo does an `apt-get update`