For now (08/04/2014) PostgreSQL isn't supported by default. But you can use this database on your own risk and I'll write small guide that will summarize infromation from official forum. I'm running VPS with Ubuntu 12.04 x32 and Ghost was installed on clean system.

  • Install and deploy Ghost following docs. Also install PostgreSQL for your system, using various guides (for Ubuntu).

  • As Ghost using Bookshelf (which initialize connection to database with Knex), it will need PostgreSQL adapter for node.js. I'm using node-postgres and it can be easy installed using command npm install pg.

  • Open with you favorite editor file path/to/ghost/config.js and find line with ###Production comment. And write down declaration like this:

production: {  
    url: 'http://dracontis.com',
    mail: {},
    database: {
        client: 'postgresql',
        connection: {
            host: '127.0.0.1',
            user: '%username%',
            password: '%password%',
            database: 'ghost_db',
            charset: 'utf8'
        },
        debug: false
    },
    ...
},
  • Now you should restart server and Ghost will run with PostgresSQL. Really, I won't be able to help with any troubles, because after reboot everything works fine for me.