Setting up Redmine on WebFaction

Update: 26 Nov 2011: I’m informed that WebFaction now has built-in installers for Redmine.

Since this is something I have recently had to do, and found the documentation to be out of date, I though I would share this working solution with you all. This is based on Redmine 0.9.x, and thanks to Sean F from WebFaction support, these instructions are mostly his.

  1. Go to your WebFaction control panel and create a new MySQL database, making a note of the database name and password.
  2. Create a new Rails 2.3.5 application from your control panel, noting the name of the application.
  3. Create a new website to serve the rails application you just created. eg,
  4. Login to your server using SSH.
  5. Go to your Rails application directory, eg ‘cd ~/webapps/_my_redmineapp’ replacing ‘my_redmine_app’ with the name of your actual Rails application.
  6. Run the following commands:

    export PATH=$PWD/bin:$PATH
    export GEM_HOME=$PWD/gems
    gem install mysql
    tar zxf redmine-0.9.3.tar.gz
    ln -s redmine-0.9.3 redmine
    cd redmine
    cp config/database.yml.example config/database.yml
  7. Edit the ‘production’ section of ‘config/database.yml’ to configure it to use the database you created in step 1. ‘database’ and ‘username’ should be the name of the database, and ‘password’ should be the database password.

  8. Execute the following commands, again from your Redmine application directory. eg ‘cd ~/webapps/_my_redmineapp/redmine’.

    RAILS_ENV=production rake config/initializers/session_store.rb
    RAILS_ENV=production rake db:migrate
    RAILS_ENV=production rake redmine:load_default_data
    cd ..
  9. Edit ‘nginx/conf/nginx.conf’ to change the text ‘hello_world’ to ‘redmine’.

  10. Restart nginx with the following command:


You should now have a working Redmine install at the website you specified in step 3.

One last thing you will probably want to do is get a working email setup so that Redmine can email people. I used SMTP for this, the process is quite simple:

  1. Create a new mailbox to handle your Redmine email, making a note of the username and password.
  2. Go to your Redmine application directory, eg ‘cd ~/webapps/_my_redmineapp/redmine’ and execute the following:

    cp config/email.yml.example config/email.yml
  3. Edit ‘config/email.yml’ as described here, you will want to edit the ‘production’ entry as follows, replacing the place-holders accordingly:

    delivery_method: :async_smtp
    port: 25
    domain: your_domain_name
    authentication: :login
    user_name: "your_mailbox_user"
    password: "your_mailbox_password"
  4. Restart nginx (see step 10 from above).

And that’s that. You should now have email working with your Redmine install.

comments powered by Disqus