Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[Script] Install up to 10 Ghost blogs on Ubuntu or Debian
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[Script] Install up to 10 Ghost blogs on Ubuntu or Debian

howardsl2howardsl2 Member
edited April 2016 in Tutorials

Hello there,

I created a bash script that can install up to 10 Ghost blogs on your own server, with Nginx and ModSecurity or Naxsi for better performance and security.

Setup is fully automated with minimal user input. A freshly installed Ubuntu LTS or Debian 8 VPS with at least 512MB RAM is required. Note: Maximum of 3 blogs on 512MB RAM.

I look forward to hearing your feedback/suggestion.

 
https://github.com/hwdsl2/setup-ghost-blog
 

Ghost blog install screenshot

P.S. Also see my other repo Setup IPsec VPN.

Comments

  • Thanks!

  • great

  • Dumb question, but why "up to 3"?

  • howardsl2howardsl2 Member
    edited April 2016

    @yomero said:

    Technically the script can be easily modified to support more than 3 blogs. Refer to my commit "Add support for multiple Ghost blogs". The files under conf/ will also need to modified with more blocks added. You are welcome to fork the repo and make the changes.

    Considering that a 512MB VPS is almost running at full RAM for 3 Ghost blogs, I am keeping it at 3 maximum.

    Edit: Now up to 10 blogs. See below.

  • Great!
    Thanks

  • SadySady Member

    Nice one, I installed ghost on a centminmod server with no issue.

    Thanked by 1inthecloudblog
  • howardsl2howardsl2 Member
    edited April 2016

    @yomero @inthecloudblog

    The script has been further updated. Up to 10 blogs can now be installed on the same server. If you wish to use the updated script, you must start over with a freshly installed VPS.

    If you are very adventurous and have a server with big RAM, it is possible to modify the "max_blogs" parameter to install even more blogs at your own risk. Note that each blog requires about 256MB of RAM.

    Thanked by 1inthecloudblog
  • @howardsl2 said:
    @yomero @inthecloudblog

    The script has been further updated. Up to 10 blogs can now be installed on the same server. If you wish to use the updated script, you must start over with a freshly installed VPS.

    If you are very adventurous and have a server with big RAM, it is possible to modify the "max_blogs" parameter to install even more blogs at your own risk. Note that each blog requires about 256MB of RAM.

    Thanks man . I really like to see others effort shared to the community

  • howardsl2howardsl2 Member
    edited May 2016

    Update:

    A ModSecurity-related bug which only affects multiple Ghost blogs was reported on GitHub.

    To work around this bug, please follow these instructions.

  • howardsl2 said: Note that each blog requires about 256MB of RAM.

    Are you sure this is a ghost blog? Because in my boxes it doesn't use more than 110mb ram

  • @duckeeyuck said:

    Yes it is. The 256MB RAM is just a very conservative estimation. The actual RAM usage may be less.

  • So rather than 3 blogs per 512mb ram we have a maximum of 6.

  • rokokrokok Member

    Notice that low vswap ram (openvz) may not work properly for node js

  • howardsl2howardsl2 Member
    edited June 2016

    @duckeeyuck said:

    Technically you can. The problem is that a lot of RAM is required during the install process, specifically when running the "npm install --production" step.

    On a 512MB VPS with multiple Ghost blogs, the above step will eat all available RAM and require swap in order to finish. Otherwise it gets "Killed" and leads to an incomplete install.

  • add_iTadd_iT Member

    E: Version '0.12*' for 'nodejs' was not found
    Error: Failed to install 'nodejs'.

  • add_iTadd_iT Member
    edited July 2016

    DELETED

  • @add_iT said:
    E: Version '0.12*' for 'nodejs' was not found
    Error: Failed to install 'nodejs'.

    Tested and the script is working fine. What OS are you using?

  • add_iTadd_iT Member
    edited July 2016

    howardsl2 said: Tested and the script is working fine. What OS are you using?

    Ubuntu 14.04 x86 minimal

  • howardsl2howardsl2 Member
    edited July 2016

    @add_iT said:

    >

    Thanks for the report. I have just updated the scripts to use the newer Node.js version 4. Please try to download and run the script again on a freshly installed Ubuntu system.

  • thatixthatix Member

    I am wondering if a ghost blog can be installed in a 256MB kvm box since it does not need much resources when running.
    Does OP has any ideas?
    Thanks

  • howardsl2howardsl2 Member
    edited July 2016

    @thatix said:

    >

    Yes it is possible. A workaround is required though.

    Step 1: Run the install script on a temporary server (DigitalOcean, etc.) with at least 512MB RAM.

    Step 2: Run a modified version of the install script on your 256MB server, with the "RAM detection", "npm install" and "start Ghost/Nginx" lines commented out.

    For ghost-nginx-modsecurity.sh, comment out lines 60~63, 255, 469~470.
    For ghost-nginx-naxsi.sh, comment out lines 60~63, 255, 457~458.

    Step 3: Stop Ghost blog on the 512MB server:

    su - ghost -s /bin/bash
    forever stopall
    exit
    

    Step 4: Copy the "/ var / www / YOUR_DOMAIN_NAME" folder from the 512MB server to the 256MB server, using a .tar.gz archive. Be sure to first remove the existing folder on the 256MB server.

    Step 5: Reboot your 256MB server and enjoy your new Ghost blog.

    Thanked by 1thatix
Sign In or Register to comment.