--- comments: false --- # From 10.3 to 10.4 Make sure you view this update guide from the tag (version) of GitLab you would like to install. In most cases this should be the highest numbered production tag (without rc in it). You can select the tag in the version dropdown at the top left corner of GitLab (below the menu bar). If the highest number stable branch is unclear please check the [GitLab Blog](https://about.gitlab.com/blog/archives.html) for installation guide links by version. ### 1. Stop server ```bash sudo service gitlab stop ``` ### 2. Backup ```bash cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production ``` ### 3. Update Ruby NOTE: GitLab 9.0 and higher only support Ruby 2.3.x and dropped support for Ruby 2.1.x. Be sure to upgrade your interpreter if necessary. You can check which version you are running with `ruby -v`. Download and compile Ruby: ```bash mkdir /tmp/ruby && cd /tmp/ruby curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.gz echo '4e6a0f828819e15d274ae58485585fc8b7caace0 ruby-2.3.6.tar.gz' | shasum -c - && tar xzf ruby-2.3.6.tar.gz cd ruby-2.3.6 ./configure --disable-install-rdoc make sudo make install ``` Install Bundler: ```bash sudo gem install bundler --no-ri --no-rdoc ``` ### 4. Update Node GitLab now runs [webpack](http://webpack.js.org) to compile frontend assets and it has a minimum requirement of node v4.3.0. You can check which version you are running with `node -v`. If you are running a version older than `v4.3.0` you will need to update to a newer version. You can find instructions to install from community maintained packages or compile from source at the nodejs.org website. Since 8.17, GitLab requires the use of yarn `>= v0.17.0` to manage JavaScript dependencies. ```bash curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update sudo apt-get install yarn ``` More information can be found on the [yarn website](https://yarnpkg.com/en/docs/install). ### 5. Update Go NOTE: GitLab 9.2 and higher only supports Go 1.8.3 and dropped support for Go 1.5.x through 1.7.x. Be sure to upgrade your installation if necessary. You can check which version you are running with `go version`. Download and install Go: ```bash # Remove former Go installation folder sudo rm -rf /usr/local/go curl --remote-name --progress https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz echo '1862f4c3d3907e59b04a757cfda0ea7aa9ef39274af99a784f5be843c80c6772 go1.8.3.linux-amd64.tar.gz' | shasum -a256 -c - && \ sudo tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/ rm go1.8.3.linux-amd64.tar.gz ``` ### 6. Get latest code ```bash cd /home/git/gitlab sudo -u git -H git fetch --all sudo -u git -H git checkout -- db/schema.rb # local changes will be restored automatically sudo -u git -H git checkout -- locale ``` For GitLab Community Edition: ```bash cd /home/git/gitlab sudo -u git -H git checkout 10-4-stable ``` OR For GitLab Enterprise Edition: ```bash cd /home/git/gitlab sudo -u git -H git checkout 10-4-stable-ee ``` ### 7. Update gitlab-shell ```bash cd /home/git/gitlab-shell sudo -u git -H git fetch --all --tags sudo -u git -H git checkout v$(