title: GitLab with Docker on Synology NAS - HTTPS
body: <p>I would like to set up GitLab with https on Synology DS918+.</p>
  
  <p>I am using DOCKER in DSM. I downloaded the latest GitLab Community docker image.</p>
  
  <p><a href="https://i.stack.imgur.com/nP0iP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nP0iP.jpg" alt="enter image description here"></a></p>
  
  <p>And I used Putty to ssh into the NAS and create keys using openssl.</p>
  
  <p>1) Create a key into cert folder:</p>
  
  <pre><code>mkdir /volume1/docker/gitlab/certs
  cd /volume1/docker/gitlab/certs
  openssl genrsa -out gitlab.key 2048
  openssl req -new -key gitlab.key -out gitlab.csr
  openssl x509 -req -days 3650 -in gitlab.csr -signkey gitlab.key -out gitlab.crt
  openssl dhparam -out dhparam.pem 2048
  chmod 400 gitlab.key
  </code></pre>
  
  <p>2) I added two additional variables in custom image to set up the environment for HTTPS:</p>
  
  <p><a href="https://i.stack.imgur.com/sn87v.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sn87v.jpg" alt="enter image description here"></a></p>
  
  <p>3) In the last part:</p>
  
  <ul>
  <li>I remove port 80 that was first set in the default image. </li>
  <li>And add ports 30000/30001 for 22/443 port bindings that were set to auto in the default image:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/xEMRU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xEMRU.jpg" alt="enter image description here"></a></p>
  
  <p>When I go to browser for <a href="https://synologyip.com:30000" rel="nofollow noreferrer">https://synologyip.com:30000</a> GitLab can't be reached.</p>
  
  <p>Any guesses on what have I missed or done wrong?</p>
  
  <p>Thanks!</p>