Running Ghost on an Odroid U3 with Xubuntu

I've been eyeing an Odroid-U3 (http://hardkernel.com/main/products/prdt_info.php) for some time - it's basically a much faster Raspberry Pi. Filled with idealistic notions of not needing a VPS and running everything on my own hardware with dynamic DNS, I clicked "buy", purchasing an Odroid-U3 and the 8GB eMMC module with Xubuntu. The next step was to try out this newfangled Ghost blogging platform, but it seemed like all of the docs were centered around getting it up and running on one VPS or another, or simply using a preconfigured droplet. Where's the fun in that?

Getting Ghost up and running is a bit of a pain. Using Xubuntu 14.04 instead of 12.04 helped quite a bit, as previously I'd run in to issues with apt installing the wrong version of nodejs. That being said, the following steps should get you there. Some of these are written from memory, so comment with corrections!

  • Make a new user for your ghost blog. Why Xubuntu doesn't work well with adduser -m (to create the home directory automatically) I don't know.
    • sudo adduser ghostuser
    • sudo mkdir /home/ghostuser
    • sudo chown ghostuser:ghostuser /home/ghostuser
    • sudo usermod -m -d /home/ghostuser ghostuser
  • Install curl
    • sudo apt-get install curl
  • Install pip (Use the script at http://pip.readthedocs.org/en/latest/installing.html)
    • This addresses the "No module named pkg_resources" issues you're likely to encounter
  • sudo npm install sqlite3 --build-from-source
  • Install node (sudo apt-get nodejs, sudo apt-get npm)
  • Follow the rest of the directions at docs.ghost.org

Then, to try it out use npm start. You should be able to load 127.0.0.1:2368 locally (try curl 127.0.0.1:2368 if you're in the terminal). If you're ssh'ed in to your odroid and want to load the blog on any other machine in your network, change this line in ghost/config.js from 127.0.0.1 to 0.0.0.0 host: '0.0.0.0'. Note that npm start defaults to development settings - you shouldn't launch to production like this!

That should get you started! I had tons of errors with installation, mostly due to sqlite3 issues and not having setuptools, which are addressed above. This is where I'm at now, so I might update this in the future.

(Caveat: if you've forwarded these ports in your router and/or modem, you are now exposing the Odroid to the open internet, and should consider all normal cautions. Also, you'd want to use a proper HTTP server like Apache or Nginx in production)