Technical Anshu
Tutorials Blog
🌐 GitLab Access Safety

Put GitLab on Your LAN or the Internet the Safe Way with HTTPS

Where your GitLab can be reached from decides who gets to knock on its login page. Choose that boundary on purpose - LAN-only, VPN, or public with HTTPS - and never by accident.

✍️ Technical Anshu🦊 GitLab CE on TurnKey Linux⏱️ 7 minute read
🎥 Watch the network and IP setup in the video, then choose your access pattern with this guide

The video gives your server a fixed IP address on your own network, which is exactly right for a team working in one office. The pressure arrives later, usually in one sentence: someone wants to push code from home. There are three honest patterns for answering that request, and they are not equal. One keeps the login page invisible to the internet. One keeps it invisible and still works from home. One shows it to the entire world - and is only acceptable dressed in full HTTPS armour.

Three ways to reach the same GitLab server
LAN only - reachable from the office networkSafest
Through a VPN - reachable from team devices anywhereRecommended
Public internet - reachable from the whole worldHTTPS or do not

👆 Same server, three boundaries. The first two keep your login page invisible to strangers. The third must be dressed for the attention it will get.

1

Pattern One - LAN Only, the Right Starting Point

Keep the server on its fixed internal address, exactly as the video sets it up, and optionally give it a friendly name through your router or local DNS so the team types a name instead of numbers. The security property here is total: nothing is published to the internet, so no scanner on earth can find the login page, because from outside it does not exist. The cost is equally total - no access from home, from a client site, or from a hotel. For many small offices that trade is correct, and it is where every new install should start while the other habits - backups, updates, passwords - are still being formed.

2

Pattern Two - Reach It Through a VPN

When work from home genuinely starts, the professional answer is a VPN into the office network. Each team device joins the office network virtually and then uses the exact same internal GitLab address as if it were sitting at a desk. The GitLab ports are never opened to the internet, the login page stays invisible to scanners, and access is granted per device and can be revoked per device. This is the pattern most small teams should grow into, and it has a side benefit: the same VPN protects every other internal service you run, not just GitLab.

3

Pattern Three - Public, Only with a Real Name and HTTPS

Sometimes public access is the honest requirement. Then do it completely. Point a real domain name at the server, and get a proper certificate for it - the appliance's console tooling supports Let's Encrypt, the free certificate service, so the address becomes a clean https:// name with a valid lock icon. What is not negotiable: never publish the plain HTTP login page to the open internet. Without encryption, passwords travel readable to anyone positioned to watch the traffic, and 'our office is small, nobody will bother' is not how automated scanning works. Public means dressed: name, certificate, sign-ups off, admin two-factor on, updates current.

4

Whichever Pattern - the Standing Rules

Exposure multiplies the value of every other habit in this series. Sign-ups stay off, so accounts exist only for people you created. Two-factor authentication goes on for admins first and ideally for everyone. Updates stay current, because an old GitLab on the internet is a target with published instructions. And every few months, open the user list and ask who each account belongs to - departed staff with live accounts are the quietest hole in any system. Choose the boundary once, on purpose, and then defend the choice with these four habits.

🔴 Port-forwarding GitLab to the internet just for a week is how forgotten servers are born. The week passes, the forwarding stays, the updates stop, and a year later the office has an old, open, unpatched login page it no longer remembers creating. If it must be public, do the full job on day one - or keep it on the LAN.

🎥 Watch the Complete Process in the Video

Watch the network configuration in the video, then decide deliberately which of the three patterns your team actually needs.

▶️ Watch Full Video
❓ Common Questions (FAQ)

The browser warns the certificate is not trusted on our LAN

That is normal when you open the server by its IP address with its built-in certificate - the connection is still encrypted, but the browser cannot verify the name. The proper fix is a real hostname with a proper certificate. Never train the team to click through warnings blindly.

Can attackers even find a small office server

Yes. Automated scanners sweep the entire internet continuously, and new public services are typically found within days. Obscurity is not a defence - assume any public login page is already known, and dress it accordingly.

Is a strong password enough for a public GitLab

It is the minimum, not the plan. Add two-factor authentication for everyone, disable sign-ups, keep GitLab updated - or better, choose the VPN pattern so the login page is not public at all.

This guide is based on the Technical Anshu GitLab server video • Stuck on any step? Ask in the video comments — you will get a reply there 🙏