Edit Go To Admin Logout

Setup Guide

Welcome to Schnitzelpress!

Schnitzelpress is part of a new breed of open source software. Instead of uploading .php files through FTP, you will be using tools otherwise used by hero software developers. Don't let this scare you! You don't need to be a developer yourself to do this. But it will make you look and feel like one. And maybe you'll learn something along the way – a lot of us development nerds started out this way!

We're big fans of the Cloud, and Schnitzelpress is completely optimized for running on Heroku, a fantastic cloud hosting provider that gives you a whole bunch of resources for free, only requiring you to pay for additional resources once your site grows really large. Don't worry, Schnitzelpress is highly optimized and will, for most people, happily run off what Heroku gives you for free!

Of course you're free to set up Schnitzelpress on your own servers instead, if you prefer. Please note that this will be documented in a separate guide in the future.

A note on operating systems: these instructions should work from OS X, Windows and Linux. If you're a Windows user, please note that the commands mentioned in this guide are intended to be typed into Windows Command Prompt. If you're not familiar with it yet, you will find lots of tutorials on YouTube.

Alright, let's get you set up!


1. Create a free Heroku account. Everything we will be using to get your blog online will be free; however, since we're going to use one of Heroku's external plugin providers, Heroku requires you to verify your account by adding credit card information. (If this is a problem, please remember that you can host Schnitzelpress on your own servers instead; it's just more work. We're not 100% happy with this requirement, either, and we're working on providing you with alternative options.)


2. Install the Heroku Toolbelt for your operating system. This will get your system equipped with Git (a version control tool that you will be using to push your code to Heroku), Ruby (the programming language Schnitzelpress is built with) and the Heroku command line tool (which you will be using to set up and configure your app on Heroku.)


3. Create an encryption key, if you don't have one already. This will be used to encrypt your communication with Heroku. Create a key using the following command:

ssh-keygen

Follow the on-screen instructions. Make sure you enter a passphrase when asked, otherwise your key will not be very secure. Now tell Heroku about your key:

heroku keys:add

Note that you only need to do this once for your Heroku account, even if you're using it to host multiple applications.


4. Create a host application. The host application is a minimal application that you will be deploying to Heroku (or your own server). It mostly defines dependencies (like which Schnitzelpress version you're using) and tells Heroku (or your server) what code to run.

Clone the Schnitzelpress skeleton application using Git:

git clone git://github.com/hmans/schnitzelpress-skeleton.git my_blog -o skeleton

Note the my_blog in the line above – this will be the name of the directory the skeleton application will be cloned into. Feel free to change this (or even rename the directory afterwards).


5. Initialize your Heroku application: now it's time to prepare Heroku for your new blog. First of all, you will need to create a Heroku application, which you can do through the Heroku command line utility:

heroku apps:create myblog -s cedar

The myblog you're seeing in the line above is your blog's application name on Heroku. It will become part of your blog's public URL, so don't pick anything offensive. :) And yes, of course you can host your blog on your own domain – we'll tell you how! But first of all, we need to create a database for your blog. We will be using the MongoLab addon. Set it up like this:

heroku addons:add mongolab:starter

This will create a new MongoLab database using their free starter plan. Don't worry, it will give you plenty of space!

Now we need to tell Schnitzelpress who's the owner of the blog you're about to deploy – yup, that's you! Schnitzelpress doesn't store any user information itself; instead, it uses the Mozilla BrowserID service for authentication. Configure the owner's email address like this:

heroku config:add SCHNITZELPRESS_OWNER=you@email.com

(Obviously, replace your@email.com with your own email address.)

If you're intending to use your own domain for your blog, now it's time to tell Heroku about it:

heroku domains:add yourdomain.com
heroku domains:add www.yourdomain.com

Please note that this requires some custom configuration for your domain name servers. Please check the Heroku Custom Domains Guide for details.


6. It's time to deploy your blog! You've already completed all the complicated bits – actually getting your blog online is a piece of cake. Simply tell Git to push its data to Heroku, like this:

git push heroku master

With a bit of luck, you should be seeing some output about Heroku installing all sorts of Ruby packages. The entire process will probably take a minute or two. But hey, that's it, you're done! You can now navigate to your new blog like this:

heroku open

Enjoy!