3.1 KiB
🚀 GitLab Docker Installation and Configuration Guide
Welcome! This guide helps you install and configure GitLab in a Docker container inside your Proxmox LXC environment in an easy and friendly way. 🐳💻
📋 Prerequisites
- Proxmox LXC container with Linux OS (Ubuntu/Debian recommended).
- Network access to the container and ability to run
sudo. - SMTP email credentials for sending notifications.
- A preferred domain name (e.g.
gitlab.innovator.bh) pointing to your server.
🛠 Installation Steps
1. Run the interactive install script
Run this command inside your container terminal:
curl -sSL https://your-server/path/install_gitlab.sh | sudo bash
You'll be prompted to enter:
- Your container's IP (for info only)
- Admin email
- SMTP email and password
- SMTP server address and port
- Initial root admin password
2. Wait for the installation to complete
The script will:
- Install Docker and dependencies ⚙️
- Create persistent directories 📂
- Pull and launch GitLab Docker container 🐙
- Configure SMTP email settings ✉️
- Set the admin password you provided 🔐
You'll see your admin login details printed at the end.
🌐 Accessing GitLab
Open your browser and go to:
http://<your-container-ip>
Log in as:
- Username:
root - Password: (the password you entered during install)
✍️ Editing /etc/gitlab/gitlab.rb
If you need to update settings like the domain URL (external_url):
Option A: Use nano editor inside the container
Nano is pre-installed during installation. Use it like this:
sudo docker exec -it gitlab bash
nano /etc/gitlab/gitlab.rb
Update the line starting with:
external_url 'http://localhost'
To your actual domain:
external_url 'https://gitlab.innovator.bh'
Save with Ctrl+O, exit with Ctrl+X.
Then run:
gitlab-ctl reconfigure
to apply changes.
Option B: Edit on host and copy back
If you prefer, you can edit the file on your host and copy it into the container:
docker cp gitlab:/etc/gitlab/gitlab.rb ./gitlab.rb
nano ./gitlab.rb
docker cp ./gitlab.rb gitlab:/etc/gitlab/gitlab.rb
docker exec -it gitlab gitlab-ctl reconfigure
🛠 Troubleshooting
- To watch GitLab logs live:
sudo docker logs -f gitlab
- Reset root password if needed:
sudo docker exec -it gitlab gitlab-rails runner "user = User.where(id: 1).first; user.password = 'NEWPASS'; user.password_confirmation = 'NEWPASS'; user.save!"
✅ Summary Checklist
- Installed Docker and GitLab container
- Configured SMTP email with your credentials
- Set initial root password
- Nano text editor installed inside container for easy editing
- Instructions provided for editing important config (
external_url) - Encouraged secure password practices and password reset options
📚 Additional References
Thank you for choosing this GitLab Docker installer! 🎉
For support or questions, please reach out to the project maintainer.