curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | sudo bash<\/code><\/pre>\r\n\r\n\r\n\r\nWith this package added, we need to install the gitlab instance on our domain. On this step, please consider pointing one domain or subdomain to your VPS server. You can use gitlab.yourdomain or whatever subdomain do you want. It just needs to be pointed and propagated to your VPS, because we’ll require this propagation to install the SSL and access our instance later.<\/p>\r\n\r\n\r\n\r\n
When you choose your subdomain, you need to run the following command on your SSH session to install the gitlab:<\/p>\r\n\r\n\r\n\r\n
sudo EXTERNAL_URL=\"https:\/\/gitlabtest.rosehostingtest.com\" apt install gitlab-ce\r\n<\/code><\/pre>\r\n\r\n\r\n\r\n\r\nMake sure to change the EXTERNAL_URL=”https:\/\/gitlab.example.com” to match your subdomain.<\/strong><\/p>\r\n<\/blockquote>\r\n\r\n\r\n\r\nBefore we proceed with all, you’ll need to enable Let’s Encrypt on your gitlab instance. Please edit the Let’s Encrypt section from the file \/etc\/gitlab\/gitlab.rb <\/strong>to match the following:<\/p>\r\n\r\n\r\n\r\nletsencrypt['enable'] = true\r\nletsencrypt['contact_emails'] = ['admin@example.com'] # This should be an array of email addresses to add as contacts\r\nletsencrypt['auto_renew'] = true<\/code><\/pre>\r\n\r\n\r\n\r\nAlso, if you want to auto renew this SSL certificate, please edit the following sentences to match this, on the same file:<\/p>\r\n\r\n\r\n\r\n
letsencrypt['auto_renew_hour'] = 3\r\nletsencrypt['auto_renew_day_of_month'] = \"*\/7\"<\/code><\/pre>\r\n\r\n\r\n\r\nAfter editing and saving this file, run this command to reconfigure the gitlab instance:<\/p>\r\n\r\n\r\n\r\n
gitlab-ctl reconfigure<\/code><\/pre>\r\n\r\n\r\n\r\nOnce the installation finishes, your instance will be up and running and you can access it by typing your hostname. When you first access it a username and password will be requested. You can get the admin default password on the following file (\/etc\/gitlab\/initial_root_password<\/code><\/strong>) as shown below:<\/p>\r\n\r\n\r\n\r\n <\/figure>\r\n\r\n\r\n\r\nYou just need to copy this password and fill on the gitlab page with the user root.<\/strong><\/p>\r\n\r\n\r\n\r\nAnd we are done, you successfully installed your gitlab community instance and can use it with your custom hostname as shown below:<\/p>\r\n\r\n\r\n\r\n <\/figure>\r\n\r\n\r\n\r\nAnd your installation is done, you can use your gitlab normally. There are some recommended configuration steps to apply in your instance.<\/p>\r\n\r\n\r\n\r\n
Also, you can access the admin page on the Menu at the top and then Admin. There you can create new users and configure your gitlab instance.<\/p>\r\n\r\n\r\n\r\n <\/figure>\r\n\r\n\r\n\r\n <\/figure>\r\n\r\n\r\n\r\nAnd that\u2019s it, GitLab has been successfully installed and running on your Debian 10 server, you and your team can start working with it now.<\/p>\r\n\r\n\r\n\r\n