From Dreamhost to

Well, I’d toyed around with the idea for quite a while, but when SSH when down for a few days at Dreamhost, I decided it was time to finally make the switch.

The easy part was moving off static sites and getting my personally hosted blog onto Then of course is the real challenge: a Haskell site.

First shot: compile on the server

Since (henceforce NFS) claims support for GHC, I thought I’d try out compiling on their servers. My first issue was that they only have 6.8.3, whereas some of my libraries require 6.10. I e-mailed them about this, and they let me know that their unstable server had it available. Switching over was painless.

However, I had a few problems with this approach:

  1. cabal-install would not link due to memory constraints. I can manually install all the libraries I need, but that’s a real pain.
  2. All the files I ended up using used up 250MB. NFS charges per megabyte of storage, so I didn’t feel like wasting time.
  3. As usual with shared hosting, compiling is slow. It’s not as horrible as Dreamhost, where they kill the compiles regularly, but still not as nice as using my shiny new system at home.

Upload binaries

So I can of course just compile my binaries locally and upload them, right? Well, I don’t happen to run a FreeBSD box. I’ve been itching to try out VirtualBox for a while though, and this seemed like a good time to do it.

I know what you’re thinking: I’m a masochist, and this is overkill for this kind of project. However, setting this up didn’t actually require too much work, and it’s a much more durable solution than trying to compile binaries on some flaky shared host (looking at you again Dreamhost).

Anyway, the process was very straightforward:

  1. Download the FreeBSD 7.2 ISO (NFS beta realm runs 7.2).
  2. Install VirtualBox locally.
  3. Install FreeBSD. It’s not too complicated. But make sure you set aside enough hard disk and RAM.
  4. Update ports collection. This was the worst part for me, since I’ve never used FreeBSD before. Also, I tried a selective update at first: bad idea. Just update the whole thing.
  5. Install ghc. Basically, “cd /usr/ports/lang/ghc && make install”. It takes a *long* time as it installs everything.
  6. Compile the binaries inside FreeBSD. I used git/ssh to transfer to projects over to the virtual machine, which was very convenient.
  7. Upload binaries and call it a day.

Other notes

I have opted not to use NFS for my large static file hosting. I’m using the Amazon S3 service, which so far I’ve found to be much faster than Dreamhost. It’s a little tricky to get started though. I was able to sync all my photos using s3sync.

Also, don’t forget to strip your binaries before uploading them, it can save a lot of time.

NFS only supports CGI. This is fine for my purposes, but others may not be so happy with it.

Finally, NFS recently started charging $0.01/day for dynamic sites. It’s only $3.65 a year, but if you’re like me and like to have lots of different sites running, it might add up. I’ll probably just end up running services under the same domain name instead of separate subdomains.


Well, I won’t give my full stamp of approval on this yet, but so far I’m impressed. I’ll try to post some follow-up on this in the future.


7 Responses to “From Dreamhost to”

  1. Anonymous Says:

    if you want haskell you should be using a VPS like linode or slicehost. Dreamhost is not competitive anymore and they don’t even realize it yet. VPS cost less than dreamhost and offer more in the way of just about everything including uptime!

    • Michael Snoyman Says:

      I really don’t like the “you should be using” attitudes out there. Anyway, let me ask you a few questions:

      1. With Dreamhost, I was paying $8/month and storing well over 2GB of media. How much would that cost on a VPS?
      2. How do their static file serving speeds compare to Amazon S3?
      3. Since I’m not really interested in comparing to Dreamhost anymore (notice the title of the article?), do they offer the ability to only get charged for the bandwidth that I actually use?
      4. How complicated is it to manage them?

      I think that for 90% of websites, a VPS is overkill. In fact, when dealing with a fast compiled language like Haskell, anything more than CGI is often times overkill.

      • Alan Says:

        At you can get 6GiB of storage and 256MiB of RAM for $8 a month, so a VPS can be pretty cheap. However, managing a VPS takes time. I use both Dreamhost and for different things since Dreamhost makes some things easy and my VPS gives me more control.

  2. Mikey Says:

    @Alan is correct. Why try to force a host like nfs or dreamhost into something it’s not. VPS hosting has taken a dive and prgmr(if you can be patient and wait for prgmr to get a server up). Having a VPS is not really overkill unless you are overpaying for it.

  3. Josh Says:

    @Michael, I’m looking at making the same transition. Have you hit any “gotcha’s” since posting this?

    • Michael Snoyman Says:

      I’ve since left NFS because I need something more powerful than just CGI scripts. The main issues I had there were needing to provide FreeBSD binaries and dealing with Apache rewrite rules. I’m much happier being able to compile on my own VPS and using Nginx config files. But if you need something cheap for PHP/Perl/Python, you’ll probably be OK.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: