Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to host an SVN server (or git or mercurial or whatever). I have two options:

  1. Install it on a small box sitting in the office closet, only connected to the LAN.

  2. Install it on a server at a data center in another state that has a publicly accessible IP address and currently hosts a public facing website.

My concern with #1 is the only way people can connect from outside the office is to VPN, but this is the ONLY point of VPN in my office right now... so it seems heavy duty. Also, if the office catches fire or someone decides to steal the box from the closet, well... the server is gone. Which means I will have to keep backups somewhere anyway...

My concern with #2 is that having the source code on a public facing server means that theoretically, someone can gain access to the server and steal the code. The fact that there is already a public facing service being run on it worries me even more since there could be an exploit for that software discovered.

How do most companies manage their source control servers and backups securely?

share|improve this question
    
My answer to the question "Would You Host Source Control Server Like This?" is no. As for How do most companies...", how could we possibly know? Perhaps you should rephrase it into an answerable question. –  John Gardeniers Nov 9 '10 at 4:21
    
Surely there are industry standard solutions. And what would you do instead to host your source control, as you pointed out you would not do it either of these ways? –  user59617 Nov 9 '10 at 5:05

4 Answers 4

Generally, you have 3 secure options. I'll preface this with the disclaimer that I work for ProjectLocker, so I am generally biased toward a hosted solution for most companies.

Host It Yourself, Internally

Advantages:

  • Code is only accessible on the corporate network, limiting sources of risk
  • You can piggyback on your company's existing security infrastructure rather than figuring out security

Disadvantages:

  • You'll need to manage the server software so you or someone on your team will need to become a Subversion administrator, doing the user adds, bouncing the server, and the like.
  • If the people that need access to the repository are on client sites where VPN access is prohibited, they won't be able to get to the code where they need it. In my former life as a software consultant, I saw this frequently.

Use A Hosting Provider

Advantages:

  • Most hosting providers have interfaces to manage users, project creation, and access control, as well as other bells and whistles that make project management easier. This means you don't have to learn the ins and outs of Subversion administration, and you can turn over management duties to team leads or other trusted personnel.
  • Hosting providers provide secure access from anywhere, and work through most firewalls.
  • Hosting providers have nothing to do except make sure the servers stay up, running, and protected, so it's easier and cheaper for them to do 24x7 access and support.

Disadvantages:

  • It is true that public-facing servers are exposed to more risk by definition. I would argue that the risk is greater for disruption than theft; if you're not dealing with money or government secrets, it's more likely that someone would try to take over the server to deliver malicious mail or code and stomp on your code as collateral damage than that they would steal your code and try to compete with you in the marketplace or hack your system. That said, a disrupted project is a disrupted project, and this is a legitimate concern.

Set Up A Server At A Hosting Company

Advantages:

  • You have full control over the system, monitoring, and security
  • Your team has access to the code from anywhere

Disadvantages:

  • You are responsible for administration and security without the benefit of your company's security infrastructure.

Based on this, I would recommend either hosting internally or going with a hosting provider (you can see a list of them by Googling for "subversion hosting"). It seems that hosting yourself with an external provider would be the worst of both worlds - you'd have to deal with the security and administration without the benefits of your company infrastructure. Hosting providers stake their business on making sure customers' data are safe, and some will execute NDAs to provide additional assurance, so it's reasonable to trust them enough to let them host your code.

share|improve this answer

I generaly keep a second server in the datacenter (a very small box) for that, however if that is not an option there are many hosted services out there.

share|improve this answer

If you're asking about 'most companies' I would probably answer VPN intranet. And on top of that they probably have some kind of redundancy built on top (Raid, Some kind of tape robot).

If you're wondering what you should do, set up a backup server, just get some NAS. If you're afraid of theft then put that server in some other closet. If you're afraid of fire then don't smoke near your office... You have to make some compromise when working with a small budget in a small company (if that is your case).

share|improve this answer
    
but do 'most companies' run their intranet (and source server) box/boxes within the walls of their office, or at some datacenter with their public facing stuff? –  user59617 Nov 9 '10 at 2:39
    
I know that sometimes these companies will have external facing apps on the same physical machine as their internal facing servers. The catch is they are virtualized and are given completely different network segments/routing rules. I'm sure you could benefit from virtualization if you haven't already, and implement something similar. –  Marm0t Nov 9 '10 at 2:41
    
also, could you clarify how a NAS is used in your scenario? –  user59617 Nov 9 '10 at 2:50
    
you could buy a small rack (or tower) of storage devices, and then have it set up to be network storage. If you are currently using a hypervisor, you could automate backups of your vms to that network space. –  Marm0t Nov 9 '10 at 3:04

I would run the SVN server locally and use an off-site backup (tape, rsync, online, cloudy, etc). If concerned about the confidentiality of data on an off-site backup service I'd encrypt the data and keep a copy of the encryption keys at a third location (e.g. home) or in a fireproff data-safe in the office.

It may not be useful to know what most companies do, because they probably do it in a myriad of ways and the most common way may not suit your specific situation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.