Most GitLab guides for Amazon Linux assume the package does the hard part: you add a repository, pass EXTERNAL_URL to dnf, and a working HTTPS site appears. On Amazon Linux 2023 that assumption breaks in three places before you ever see a sign-in page. The stock image ships curl-minimal, which blocks the documented first command. The free tier sizes people reach for can’t finish the install at all. And the certificate request fails if port 80 is not reachable from the internet, because GitLab’s Let’s Encrypt integration only speaks HTTP-01.
We rebuilt this guide from a fresh run of the official AL2023 KVM image on a cloud VM with ports 22, 80 and 443 open, and kept every error along the way. The behavior described here was checked against GitLab CE 19.6.2 on Amazon Linux 2023.12.20261127 in November 2026. That run includes a failed 2 GB attempt, two failed certificate requests and memory readings taken after first boot with the default and the trimmed profile.
How much memory GitLab needs on an EC2 instance
Give GitLab 8 GB of RAM if you keep the default profile, or 4 GB plus swap if you are willing to switch off the bundled monitoring and run Puma in single mode. Anything at 2 GB without swap fails during the package’s own post-install step. GitLab’s installation requirements call 8 vCPU and 16 GB the single node baseline and 8 GB the floor for a memory-constrained node. Its memory-constrained guide goes as low as 2 GB plus 1 GB of swap for about five developers. Our numbers sit between those two documents, and the table records what each size actually did in the lab.
| RAM and profile | What happened | Memory in use |
|---|---|---|
| 2 GB, 2 vCPU, no swap, default profile | Install finished with a failed post-install scriptlet, three Ruby processes OOM killed, every request returned 502, load average above 30 | 1,634 MB of 1,970 MB, 14 MB available |
| 8 GB, 4 vCPU, default profile (17 services) | Healthy, HTTPS working, 10 minutes after boot | 4,033 MB used, 3,415 MB available |
| 8 GB, 4 vCPU, lean profile (11 services) | Healthy, about 3.5 minutes after restart | 2,508 MB used, 5,080 MB available |
| 4 GB, 2 vCPU, lean profile plus 4 GB swap | Sign-in page answered 200 within about a minute of boot | 2,369 MB used, 0 MB swap, 6 minutes after boot |
Treat these as a floor for a lab or a small team. What pushes a production instance past them is concurrency, because every CI pipeline, merge request diff and Git clone lands on Puma, Sidekiq and Gitaly at once. For a team of 20 to 50 active users with CI, plan for m7i.xlarge class hardware (4 vCPU, 16 GB) and a gp3 volume of 100 GB or more for repositories, then watch Sidekiq queue latency before you resize. GitLab advises against burstable types such as the t3 family, since a drained CPU credit balance throttles Puma and Gitaly in the middle of a busy afternoon.
Beyond sizing, the instance needs two things. You need an A record (in any DNS provider) pointing your GitLab hostname at the instance’s public IP, and a security group that lets the internet reach the ports in the next table. If you’d rather test locally first, the same steps work on the Amazon Linux 2023 qcow2 image under KVM, which is what our lab ran.
| Port | Source | Why GitLab needs it |
|---|---|---|
| 22/tcp | Your admin IP, plus developers for Git over SSH | Shell access and git@ clones (both use port 22 unless you move sshd) |
| 80/tcp | 0.0.0.0/0 | Let’s Encrypt HTTP-01 validation, then the redirect to HTTPS |
| 443/tcp | 0.0.0.0/0 or your users’ ranges | The web UI, API and Git over HTTPS |
Port 80 must stay open to everyone after the certificate is issued, because renewals use the same HTTP-01 challenge. Locking it down to your office range once the site works is an easy way to break the first renewal two months later, and nothing warns you until browsers start rejecting the certificate.
Why the GitLab repository setup fails on a stock AL2023 image
GitLab’s install page tells you to run sudo dnf install -y curl first, and on AL2023 that command fails. The image ships curl-minimal, which conflicts with the full curl package, so dnf refuses to replace one with the other on its own. Start by bringing the instance up to date.
sudo dnf -y upgrade
Our image was already current, so dnf had nothing to apply.
Dependencies resolved.
Nothing to do.
Complete!
Now try the documented curl install so you can see the conflict for yourself.
sudo dnf install -y curl
Every curl-minimal build in the repository shows up as a conflict. Here are the first two lines of the problem report.
Error:
Problem: problem with installed package curl-minimal-8.21.0-5.amzn2023.0.5.x86_64
- package curl-minimal-8.21.0-5.amzn2023.0.5.x86_64 from @System conflicts with curl provided by curl-7.87.0-2.amzn2023.0.2.x86_64 from amazonlinux
Letting dnf erase the minimal package as part of the transaction solves it. Both packages come from the same source build, so nothing else on the system loses its curl.
sudo dnf install -y --allowerasing curl
One package goes in and the other comes out in a single transaction.
Installed:
curl-8.21.0-5.amzn2023.0.5.x86_64
Removed:
curl-minimal-8.21.0-5.amzn2023.0.5.x86_64
Complete!
AL2023 does not ship firewalld either (systemctl status firewalld returns “Unit firewalld.service could not be found”), so the firewall-cmd step on GitLab’s own AL2023 install page fails and can be skipped. Your security group is the only firewall in play, which is why the port table above matters so much. With full curl in place, run GitLab’s repository script.
curl --location "https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh" | sudo bash
After importing GitLab’s signing keys and writing the repo file, it ends with two short lines.
Repository installed successfully.
Packages are ready to install.
GitLab’s script detects AL2023 as its own platform rather than mapping it to an EL release, and that matters because the package is built and tested for it. You can confirm the detection in the repo file it wrote.
cat /etc/yum.repos.d/gitlab_gitlab-ce.repo
Look for a baseurl under the amazon/2023 tree, with both GPG checks switched on.
[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/amazon/2023/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gpgkey/gpg.key
https://packages.gitlab.com/gpgkey/gitlab/3D645A26AB9FBD22.pub.gpg
https://packages.gitlab.com/gpgkey/gitlab/CB947AD886C8E8FD.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
Before installing, check which release dnf will pull and how big it is. The size is the first hint about what the package will do to a small instance.
dnf info gitlab-ce
A single package of nearly a gigabyte carries NGINX, PostgreSQL, Redis, Gitaly and the Rails app.
Available Packages
Name : gitlab-ce
Version : 19.6.2
Release : ce.0.amazon2023
Architecture : x86_64
Size : 954 M
Repository : gitlab_gitlab-ce
Summary : GitLab Community Edition (including NGINX, Postgres, Redis)
Make sure the root volume has room for it. The package unpacks to several times its download size under /opt/gitlab before any repository data arrives, which is one reason GitLab asks for 40 GB of storage on application nodes.
How the gitlab-ce package configures itself on install
The RPM does more than copy files. Its post-install step runs a full gitlab-ctl reconfigure, a Chef run of roughly a thousand resources that creates the database, migrates it, writes every service config and starts everything under runit. Because all of that happens inside dnf, the install takes minutes and is the step that fails on small instances. We pass an http:// URL on purpose, so the install and the certificate request happen in separate runs and a DNS or port problem cannot take the install down with it.
sudo EXTERNAL_URL="http://gitlab.example.com" dnf install -y gitlab-ce
GitLab’s own docs pass the https:// URL here, which works when DNS and port 80 are already right. If they are not, the install ends in a certificate error and you’re debugging two things at once. When the package finishes on an instance with enough memory, rerun the configuration once and read the warnings at the end.
sudo gitlab-ctl reconfigure
On our 8 GB run it completed in 16 seconds and flagged a PostgreSQL setting that only applies after a restart.
Infra Phase complete, 10/920 resources updated in 13 seconds
Warnings:
PostgreSQL has settings that require a restart before their values become active:
- shared_buffers = '62976' (active), '1986MB' (pending)
The next PostgreSQL restart may fail if pending settings conflict with the current configuration.
Review the pending values and restart PostgreSQL at a controlled time.
To restart, run: sudo gitlab-ctl restart postgresql
gitlab Reconfigured!
GitLab sizes shared_buffers at about a quarter of RAM. Our disk had been installed on a smaller instance first, so the running value still reflected the old size until PostgreSQL restarted. Do the restart now, while nobody depends on the instance.
sudo gitlab-ctl restart postgresql
Then list the services. On the default profile you get 15 at this point, and 17 once HTTPS adds crond and the container registry. The list below was taken just before the PostgreSQL restart, so yours will show a younger postgresql uptime.
sudo gitlab-ctl status
Every line should start with run:. A service whose uptime keeps resetting to a few seconds is usually being killed and restarted by runit.
run: alertmanager: (pid 1979) 106s; run: log: (pid 1978) 106s
run: gitaly: (pid 1961) 106s; run: log: (pid 1955) 106s
run: gitlab-exporter: (pid 1964) 106s; run: log: (pid 1963) 106s
run: gitlab-kas: (pid 1953) 106s; run: log: (pid 1952) 106s
run: gitlab-workhorse: (pid 1962) 106s; run: log: (pid 1957) 106s
run: logrotate: (pid 1951) 106s; run: log: (pid 1948) 106s
run: nginx: (pid 3245) 74s; run: log: (pid 1958) 106s
run: node-exporter: (pid 1971) 106s; run: log: (pid 1970) 106s
run: postgres-exporter: (pid 1956) 106s; run: log: (pid 1954) 106s
run: postgresql: (pid 1960) 107s; run: log: (pid 1959) 107s
run: prometheus: (pid 1976) 107s; run: log: (pid 1975) 107s
run: puma: (pid 3469) 41s; run: log: (pid 1967) 107s
run: redis: (pid 1946) 107s; run: log: (pid 1943) 107s
run: redis-exporter: (pid 1966) 107s; run: log: (pid 1965) 107s
run: sidekiq: (pid 1974) 107s; run: log: (pid 1973) 107s
A 502 from curl http://localhost/users/sign_in in the first minute or two is normal, because NGINX and Workhorse come up before Puma has finished loading Rails. If it is still 502 after five minutes, the next section is probably what you’re looking at.
What happens when you install GitLab on a 2 GB instance
On 2 GB the install appears to succeed, which is the trap. We ran the same command on a 2 GB, 2 vCPU guest with no swap. dnf ran for 971 seconds and printed Complete!. A few lines above that, though, the post-install reconfigure had died while clearing the Rails cache, so the package was on disk while the application behind it was never finished. Here is the end of that run, trimmed to the failure lines.
Infra Phase failed. 643 resources updated in 12 minutes 59 seconds
[2026-11-29T17:42:07+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[clear the gitlab-rails cache] (gitlab::gitlab-rails line 691) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0],
---- Begin output of /opt/gitlab/bin/gitlab-rake cache:clear ----
---- End output of /opt/gitlab/bin/gitlab-rake cache:clear ----
warning: %posttrans(gitlab-ce-19.6.2-ce.0.amazon2023.x86_64) scriptlet failed, exit status 1
Error in POSTTRANS scriptlet in rpm package gitlab-ce
Our kernel log explains why. Three Ruby processes from GitLab’s services, each holding 450 to 620 MB of anonymous memory, were OOM killed, runit restarted them, and they were killed again. The instance never recovered on its own: an hour and a half after boot the load average was still above 30 and every request returned 502.

Retrying the reconfigure on the same instance doesn’t help, since the same workers start and get killed again. Stop the instance, change its type to one with 8 GB (or 4 GB if you also apply the lean profile and swap described further down), start it and run sudo gitlab-ctl reconfigure. Our lab recovered that way on 8 GB. The disk carried over, and the run finished in 16 seconds because only the failed resources were left to apply.
How the built-in Let’s Encrypt integration gets a certificate
You do not need certbot. The Omnibus package has its own ACME client, and it switches on when external_url starts with https:// and no other certificate is configured. In order, a reconfigure with HTTPS does five things.
- Challenge on port 80: bundled NGINX serves
/.well-known/acme-challenge/over plain HTTP, and Let’s Encrypt fetches it from the internet. HTTP-01 is the only challenge type this integration supports. - Staging first: it requests a certificate from the staging endpoint, so a broken DNS record or a closed port burns staging attempts instead of production rate limits.
- Production certificate: only after staging works does it request the real one and write it to
/etc/gitlab/ssl/. - NGINX reload: NGINX switches to 443 and port 80 starts answering with a 301 to HTTPS.
- Renewal job: a cron entry runs
gitlab-ctl renew-le-certsevery fourth day, and it renews only when the certificate has 30 days or less left.
Each step has its own failure, and the troubleshooting section shows the two we hit. To turn the integration on, open the main configuration file.
sudo vim /etc/gitlab/gitlab.rb
Change the external_url line to HTTPS with your own hostname, and set the two letsencrypt keys. These are the exact lines from our run.
external_url 'https://gitlab.example.com'
letsencrypt['enable'] = true
letsencrypt['contact_emails'] = []
A contact address is optional. If you set one, it has to be a mailbox on a real domain, because Let’s Encrypt rejects example.com and the whole reconfigure fails over it. Save the file and apply it.
sudo gitlab-ctl reconfigure
With DNS and port 80 in order, the run took 28 seconds. The staging and production requests, the NGINX reloads and the new cron job all appear in the output, matching the five moves above.

Check the result from the instance itself rather than a browser, which might be showing a cached redirect. The first request should return a 301, the second a 200 over HTTP/2.
curl -sI http://gitlab.example.com/ | head -3
curl -sI https://gitlab.example.com/users/sign_in | head -1
Next, read the certificate NGINX is serving. A Let’s Encrypt issuer and a 90 day window confirm the production request worked and you are not looking at the staging certificate.
echo | openssl s_client -connect gitlab.example.com:443 -servername gitlab.example.com 2>/dev/null | openssl x509 -noout -issuer -subject -dates
Both checks from our instance came back clean.

Renewal is the part people forget to check. GitLab runs its own cron daemon as a runit service (it appeared as crond in the service list after this reconfigure), so the job won’t show up in crontab -l or /etc/cron.d. Read the job file and the certificate directory directly.
sudo cat /var/opt/gitlab/crond/letsencrypt-renew
sudo ls -l /etc/gitlab/ssl/
Our schedule fires at 00:36 every fourth day of the month, and the key files are readable by root only.
36 0 */4 * * root /opt/gitlab/bin/gitlab-ctl renew-le-certs
total 24
-rw-r--r--. 1 root root 5706 Nov 29 19:12 gitlab.example.com.crt
-rw-r--r--. 1 root root 5873 Nov 29 19:12 gitlab.example.com.crt-staging
-r--------. 1 root root 1679 Nov 29 19:09 gitlab.example.com.key
-r--------. 1 root root 1675 Nov 29 19:09 gitlab.example.com.key-staging
GitLab derives the minute (36 here) from your external_url, so it differs between instances and spreads the load on Let’s Encrypt. To force a check outside the schedule, run sudo gitlab-ctl renew-le-certs; it does nothing until the certificate is within 30 days of expiry.
What to do when port 80 can’t be public
An instance in a private subnet, behind a VPN or behind an internal load balancer cannot pass HTTP-01, and the built-in integration has no DNS-01 mode. GitLab’s SSL docs describe the supported route: issue the certificate elsewhere with a DNS-01 client, set letsencrypt['enable'] = false so reconfigure stops trying to replace it, and copy the full chain and key to /etc/gitlab/ssl/gitlab.example.com.crt and /etc/gitlab/ssl/gitlab.example.com.key. Certbot has DNS plugins for most providers.
| DNS provider | Certbot plugin | Flag |
|---|---|---|
| AWS Route 53 | certbot-dns-route53 | --dns-route53 |
| Cloudflare | certbot-dns-cloudflare | --dns-cloudflare |
| DigitalOcean | certbot-dns-digitalocean | --dns-digitalocean |
| Google Cloud DNS | certbot-dns-google | --dns-google |
| BIND or any RFC 2136 server | certbot-dns-rfc2136 | --dns-rfc2136 |
On AWS, Route 53 is the natural pick because an instance role can grant the plugin its DNS permissions without stored keys. Run sudo gitlab-ctl reconfigure once after placing the files. You then own renewal, so add a certbot deploy hook (it runs as root) that copies the renewed files into /etc/gitlab/ssl/ and runs gitlab-ctl hup nginx and gitlab-ctl hup registry. Without that hook, certbot renews on schedule while GitLab keeps serving the old certificate until it expires.
Why the first login should end with sign-up switched off
A new instance accepts self-registration from anyone who can reach it, and with port 443 open to the world that means the whole internet. The install also generates a root password and stores it in a file that is deleted on the first reconfigure after 24 hours, so read it now.
sudo cat /etc/gitlab/initial_root_password
Its header warns that the value only holds if nobody has changed it since the database was created.
# WARNING: This password is only valid if ALL of the following are true:
# • You set it manually via the GITLAB_ROOT_PASSWORD environment variable
# OR the gitlab_rails['initial_root_password'] setting in /etc/gitlab/gitlab.rb
# • You set it BEFORE the initial database setup (typically during first installation)
# • You have NOT changed the password since then (via web UI or command line)
#
# If this password doesn't work, reset the admin password using:
# https://docs.gitlab.com/security/reset_user_password/#reset-the-root-password
Password: <redacted>
# NOTE: This file is automatically deleted after 24 hours on the next reconfigure run.
Open https://gitlab.example.com and sign in as root with that password. Note the “Register now” link under the form, which is the open sign-up you’re about to close.

After signing in, set a new root password in your user settings before anything else. Then click Admin in the top bar, open Settings > General and expand New user account restrictions. Two checkboxes at the top of that section decide who can create an account.

- 1Allow new user accounts
- 2Require admin approval for new user accounts
- Allow new user accounts: controls whether the sign-up page exists at all. Clear it for an instance where an admin creates every account.
- Require admin approval for new user accounts: ticked by default. If you leave sign-up on, this keeps new accounts in a pending state until an admin approves them.
We cleared the first box and clicked Save changes at the bottom of the section. The Admin area dashboard confirms it, because under Features the Sign up row now reads “Not enabled”, and the Components card shows the exact GitLab version you are running. Our older walkthrough on disabling user sign-up on the GitLab welcome page covers the same switch on earlier releases.

A yellow banner about the Web IDE single origin fallback appears on every new instance. It’s a security setting rather than an install problem, so you can leave it until the instance is in use and review it then.
How much RAM GitLab uses after first boot, and how to cut it
On the default profile, our 8 GB instance used 4,033 MB ten minutes after boot. Six Ruby processes for Puma and Sidekiq sat at roughly 950 MB of resident memory each, followed by Gitaly and Prometheus. RSS double counts the memory those Ruby workers share, so summing the column gives a misleading 8.5 GB, and the “used” column from free is the honest number.
uptime; free -m
ps -eo rss,comm --sort=-rss | head -9
Our lean profile is a subset of GitLab’s memory-constrained guide (KAS stays on), and it attacks the biggest consumers directly. Puma in single mode drops the worker processes, Sidekiq gets fewer threads, and the Prometheus stack (Prometheus, Alertmanager and four exporters) goes away entirely. Open the configuration file again.
sudo vim /etc/gitlab/gitlab.rb
Append this block at the end. Both MALLOC_CONF settings make jemalloc hand freed memory back to the kernel after a second instead of holding on to it.
puma['worker_processes'] = 0
sidekiq['concurrency'] = 10
prometheus_monitoring['enable'] = false
gitlab_rails['env'] = {
'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000'
}
gitaly['env'] = {
'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000',
'GITALY_COMMAND_SPAWN_MAX_PARALLEL' => '2'
}
Reconfigure, then restart so every service starts with the new settings. In our lab the reconfigure took 1 minute 50 seconds, longer than usual, because it tears down the monitoring services.
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
After the restart only 11 services remain instead of 17, with every exporter, Prometheus and Alertmanager gone.
ok: run: crond: (pid 12293) 0s
ok: run: gitaly: (pid 12301) 0s
ok: run: gitlab-kas: (pid 12328) 1s
ok: run: gitlab-workhorse: (pid 12339) 0s
ok: run: logrotate: (pid 12351) 1s
ok: run: nginx: (pid 12357) 0s
ok: run: postgresql: (pid 12369) 0s
ok: run: puma: (pid 12401) 0s
ok: run: redis: (pid 12407) 0s
ok: run: registry: (pid 12415) 1s
ok: run: sidekiq: (pid 12458) 0s
Used memory fell from 4,033 MB to 2,508 MB on the same instance, a saving of about 1.5 GB. The screenshot puts both readings side by side.

A 2.5 GB idle figure makes a 4 GB instance workable, but only with swap behind it, because a git gc or a large merge request diff can spike well above it. GitLab’s requirements page says to disable swap where possible, and that is right for an instance sized to never need it. On a 4 GB instance the choice is between swap and the OOM killer, and AL2023 instances have no swap by default, so add a swap file.
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 status=none
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab
sudo sysctl vm.swappiness=10
Low swappiness keeps the kernel from paging out Puma while there is still free RAM. The sysctl call only lasts until reboot, so add vm.swappiness=10 to a file under /etc/sysctl.d/ if you want it to stick. Confirm the swap is active.
swapon --show
You should see a 4 GB file with nothing used yet.
NAME TYPE SIZE USED PRIO
/swapfile file 4G 0B -2
We then shrank the guest to 4 GB and 2 vCPU and booted it with the lean profile and this swap file. GitLab answered HTTPS within about a minute of boot. Six minutes after boot we checked memory, swap and the sign-in page again.
uptime; free -m; swapon --show; curl -s -o /dev/null -w "%{http_code} %{time_total}s\n" https://gitlab.example.com/users/sign_in
Swap was still untouched and the page came back fast.
19:29:41 up 6 min, 0 users, load average: 0.37, 0.38, 0.22
total used free shared buff/cache available
Mem: 3919 2369 399 121 1149 1227
Swap: 4095 0 4095
NAME TYPE SIZE USED PRIO
/swapfile file 4G 0B -2
200 0.056599s
Zero swap in use and a 56 ms response for the sign-in page is a comfortable idle state. The swap file is there for the bursts, so if you see it grow steadily under normal use, treat that as the signal to move up an instance size rather than adding more swap.
Troubleshooting GitLab install errors on Amazon Linux 2023
Every error below came up in our runs, with the message exactly as GitLab or dnf printed it.
Error: “package curl-minimal from @System conflicts with curl provided by curl”
Stock AL2023 curl is blocking the full package. Run sudo dnf install -y --allowerasing curl, which swaps them in a single transaction. Strictly, curl-minimal can fetch the repo script, so the swap matters mainly because the documented command fails without it. If the repo script then ends with repomd.xml GPG signature verification error: Bad GPG signature, as our first run did, rerun it: the error came right after the key import prompts and cleared on the second attempt.
Error: “scriptlet failed, exit status 1” and “Error in POSTTRANS scriptlet in rpm package gitlab-ce”
Package files are installed but the post-install reconfigure died, usually on execute[clear the gitlab-rails cache]. Check sudo dmesg | grep "Killed process". If Ruby processes were OOM killed, resize the instance to 8 GB (or to 4 GB with swap and the lean profile), then run sudo gitlab-ctl reconfigure. There is no need to reinstall the package, because reconfigure picks up where the failed run stopped.
502 Bad Gateway after the install or a restart
In the first two minutes after a start or restart, a 502 means Puma is still booting and needs nothing from you. If it lasts longer, run free -m and sudo gitlab-ctl status. A Puma or Sidekiq uptime that keeps resetting to a few seconds means it’s being killed and restarted, which on our 2 GB guest went on indefinitely, so the memory section above is the fix.
Acme::Client::Error::InvalidContact: contact email has forbidden domain “example.com”
Let’s Encrypt validates the contact address before it issues anything, and reserved or invalid domains are refused. Our run failed after 2 minutes with this message. Put a real mailbox in letsencrypt['contact_emails'], or leave the list empty as we did, and reconfigure again.
Error: “Timeout during connect (likely firewall problem)” from acme-staging
Let’s Encrypt could not reach port 80. We reproduced it by leaving port 80 closed in the cloud firewall, and the reconfigure failed in 21 seconds with this line.
[gitlab.example.com] Validation failed, unable to request certificate, Errors: [{url: https://acme-staging-v02.api.letsencrypt.org/acme/chall/380419074/7499595204/nNLOjg, status: invalid, error: {"type"=>"urn:ietf:params:acme:error:connection", "detail"=>"203.0.113.10: Fetching http://gitlab.example.com/.well-known/acme-challenge/4U5spAi0vmKdwL2aGw9S4yzNQyA2veg_nblh4nERR_E: Timeout during connect (likely firewall problem)", "status"=>400}} ]
Whatever IP appears in the detail field is the address Let’s Encrypt resolved for your hostname, so first confirm it matches the instance’s public IP. Then open 80/tcp from 0.0.0.0/0 in the security group (and in any network ACL) and rerun sudo gitlab-ctl reconfigure. Because this failed on staging, it cost nothing against the production rate limit. If the DNS record is wrong instead, the error type changes to dns or the fetch goes to another host, and the fix is the A record.
Warning: “PostgreSQL has settings that require a restart”
You’ll see this after resizing an instance, because shared_buffers follows the RAM size and PostgreSQL only reads it at startup. Run sudo gitlab-ctl restart postgresql at a quiet moment, since the database is down for a few seconds while it restarts and any push in flight will fail.
Where this setup breaks down
A single AL2023 instance running the Omnibus package is the right shape for a team that wants its own GitLab without running Kubernetes, and it holds up well into dozens of users. It stops being the right shape in a few predictable places, and these are the limits we’d plan around before relying on it.
- CI on the same box: runners compete with Puma and Gitaly for the same RAM. Put them on separate instances; our GitLab Runner install guide covers that, and the runner host can be a cheap Docker host on Amazon Linux.
- The lean profile: it removes the bundled Prometheus, so the instance’s own metrics pages go blank. A small team can live with that, but a production instance should be monitored from outside.
- Private networks: the built-in certificate flow needs public port 80 for as long as the instance runs, not just once. Anything internal belongs on the manual certificate route described above.
- Backups: one EBS volume holds repositories, the database and the secrets in
/etc/gitlab. Schedulegitlab-backup createand copygitlab-secrets.jsonseparately, since a backup without it cannot decrypt CI variables.
If you run GitLab on other distributions too, the same Omnibus behavior applies with distro-specific details in our guides for GitLab CE on Ubuntu 26.04 and GitLab on Rocky Linux and AlmaLinux. For a throwaway test instance, running GitLab with Docker Compose skips the package entirely. And if all you need is lightweight Git hosting on a small instance, Gitea on Amazon Linux runs in a fraction of the memory measured here.