Prerequisites
- A VPS with at least 4GB RAM (8GB recommended)
- Ubuntu or Debian operating system
- A domain name pointing to your VPS (recommended)
Installation Steps
1
Update system packages
2
Install dependencies
3
Add GitLab repository
4
Install GitLab
5
Configure external URL
Edit the GitLab configuration file:Find and update the
external_url setting:6
Reconfigure GitLab
7
Access GitLab
Navigate to your configured URL. On first visit, you’ll be prompted to set up the administrator account.
Post-Installation
Update GitLab
Keep your GitLab instance up to date:
Backup GitLab
Create a backup of your GitLab data:
Configuration Options
Enable HTTPS
Enable HTTPS
GitLab can automatically obtain SSL certificates via Let’s Encrypt. Ensure your
external_url uses https:// and run gitlab-ctl reconfigure.Configure SMTP
Configure SMTP
Edit
/etc/gitlab/gitlab.rb to configure email notifications via SMTP. This enables GitLab to send notification emails.Resource Optimization
Resource Optimization
For VPS with limited RAM, you can reduce GitLab’s memory usage by disabling unused features in
/etc/gitlab/gitlab.rb.
