Rushing Labs

Setup Basic GitLab Server


Previously, I tried to build an all-in-one server with Unraid. As Unraid is purpose-built first to be a file server, and has applications, VMs, and container support tacked on...I thought it might be a worthwhile effort. It was sort of successful.

I'm still slowly doing more video production, but with that comes increased data storage demands. Currenly, I'm hovering around 3.5TB in total data to be stored. Definitely enough to safely fit on an external drive! I wanted to start delving into running a home server, though. I've also had ideas for a while of what could be done running my own media server. Also...I'd like to try out running an at-home GitLab server.

The details are outside the scope of this brief guide—however, the concept of CI/CD pipelines intrigue me. GitHub has made taken great leaps lately offering impressive features, and even enabling GitHub Actions on code repos without payment. Could we replicate this on our own hardware? Further, is it possible to introduce improved SDLC practices, directly integrated into a CI/CD pipeline? Code + automatic testing, yes... but what about: architecture diagrams, documentation, threat modeling, code attestation, security testing, or even new faked data stubs? All kept within source control? All (more or less) automated?

This calls for a server! And Unraid proved problematic for anything (like GitLab) requiring fair amount of configuration.

An "Intro" Server§

I originally wanted to utilize Unraid because it's like a "hypervisor-lite". Another popular choice in this area is TrueNAS, but I wasn't ready to commit to it's more robust filesystem. I needed turn-key; go play.

So, as soon as Unraid started giving me problems stopping VMs, and I was having difficulty troubleshooting a broken GitLab Docker startup...I turned to Windows.

Windows PC§

A basic Windows install on a spare gaming PC.

Enable RDP§

This is purely for easier administration.

  • Enable Hyper-V

    • Create "external network switch" (for outside of host access)
    • Create Ubuntu VM
      • Enable SSH
      • Install Docker
      • Configure SSH to run on non-22 port
  • GitLab

    • Run GitLab from Docker container
    • Get root password for GitLab

Install GitLab: Docker§

Directory Permissions for GitLab home directory§

Installing, Configuring SSH§

Run SSH on different port§

Need to edit /etc/ssh/sshd_config. Then run service sshd restart

This is necessary because GitLab needs port 22 for SSH access. So, one of these services needs to be sent to a different port. It's easier to configure system SSH once, rather than risk GitLab needing more attention upon upgrades, etc.

root password for GitLab§