Report this

What is the reason for this report?

Any success installing Craft CMS on LEMP (Ubuntu/Nginx)?

Posted on September 22, 2014

Been struggling with getting Craft CMS installed on my droplet. Not sure where I’m failing, but for starters craft isnt even able to find the $craftPath so I’m able to get as far as starting at “Could not find your craft/ folder. Please ensure that $craftPath is set correctly”.

Searching all over the internet has yielded nothing so I’m reaching out here in hopes that someone here has run into a similar situation and found a solution.

I’d be eternally grateful if you can share your success.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Old question but for anybody else who comes across this…

It was a permissions error for me.

root:root owned the craft/ directory. Changing it to the following (insert your user and group that can run Apache):

sudo chown -R user:group craft/

@hokkei I was able to get it working – my issue was 2 parts, the first being permission issues and the 2nd an incorrect nginx virtual host configuration.

To fix the permissions, I ran sudo chown -R www-data:www-data /var/www/ and then followed the guide below to create a new group to add users to (if you followed the Digital Ocean guide you’re probably using a user other than the default root) https://www.digitalocean.com/community/questions/www-data-as-chown-but-still-remain-write-access-as-other-user-s

Next step was to fix up my config file based off of Brad Bell’s recommendation found here: https://craftcms.stackexchange.com/questions/961/what-is-the-recommended-nginx-configuration-for-craft

the only line you need to change to get it to work on Digital Ocean was the fastcgi_pass value, which I changed to fastcgi_pass unix:/var/run/php5-fpm.sock;

Hope that helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.