Instantly share code, notes, and snippets.

Embed
What would you like to do?
This gist will help you install Cloud9 on your local or remote computer, server, or even your raspberry pi. Many people are having issues at the time of this Gist's creation.
Complete installation process:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git
git clone git://github.com/ajaxorg/cloud9.git
git clone https://github.com/creationix/nvm.git ~/.nvm
source ~/.nvm/nvm.sh
#install some version of Node you want
nvm install 0.10
#install and start cloud9
cd cloud9
sudo npm install packager
sudo npm install
sudo ~/git/cloud9/bin/cloud9.sh
#set up your terminal to use the most
#recent nvm node you have installed by default
gedit ~/.bashrc
#add these lines at the bottom
source ~/.nvm/nvm.sh
nvm use 0
#if you want cloud9 to run every time you start up,
#add this line to the bottom of your .profile or .bash_profile
sudo npm install forever -g
forever --uid cloud9 -a start ~/git/cloud9/server.js -w ~/
you only need to run the cloud9.sh once after each install or update from my experience to implement the plugins, but if you get too many errors try running it again. After that you can run right from node or preferably forever.
you can use 0.0.0.0 as the host name to accept all incoming traffic provided it knows the username and password.
node server.js -w ~/git/ -l my.host.name --username riaEvangelist --password is4MyYsOnly
this will inevitably throw E_NOENT errors and crash but that can be fixed by using forever to recover from that
forever start server.js -w ~/git/ -l my.host.name --username riaEvangelist --password is4MyYsOnly
The -l paramater is only needed if you want to expose the cloud9 instance to the world via an IP or a hostname.
Also username and password are optional of course.
> Written with [StackEdit](http://benweet.github.io/stackedit/).
@RIAEvangelist

This comment has been minimized.

Owner

RIAEvangelist commented Aug 25, 2013

Complete installation process:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y  python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev
sudo apt-get update
sudo apt-get upgrade
cd ~
mkdir git
cd ~/git

git clone git://github.com/ajaxorg/cloud9.git
git clone https://github.com/creationix/nvm.git ~/.nvm
source ~/.nvm/nvm.sh

#install some version of Node you want
nvm install 0.10

#install and start cloud9
cd cloud9
sudo npm install packager
sudo npm install
sudo ~/git/cloud9/bin/cloud9.sh 

#set up your terminal to use the most 
#recent nvm node you have installed by default
gedit ~/.bashrc

#add these lines at the bottom
source ~/.nvm/nvm.sh
nvm use 0

#if you want cloud9 to run every time you start up, 
#add this line to the bottom of your .profile or .bash_profile

sudo npm install forever -g    
forever --uid cloud9 -a start ~/git/cloud9/server.js -w ~/

you only need to run the cloud9.sh once after each install or update from my experience to implement the plugins, but if you get too many errors try running it again. After that you can run right from node or preferably forever.

you can use 0.0.0.0 as the host name to accept all incoming traffic provided it knows the username and password.

node server.js -w ~/git/ -l my.host.name --username riaEvangelist --password is4MyYsOnly

this will inevitably throw E_NOENT errors and crash but that can be fixed by using forever to recover from that

forever start server.js -w ~/git/ -l my.host.name --username riaEvangelist --password is4MyYsOnly

The -l paramater is only needed if you want to expose the cloud9 instance to the world via an IP or a hostname.

Also username and password are optional of course.

Written with StackEdit.

@timfallmk

This comment has been minimized.

timfallmk commented Apr 30, 2014

Some of these commands appear to be specific to Ubuntu 12.04. I assume that's what you're installing on?

@BlueFreakLP

This comment has been minimized.

BlueFreakLP commented Sep 6, 2015

The repo is old. The new one is https://github.com/c9/core

@TekuConcept

This comment has been minimized.

TekuConcept commented Apr 18, 2016

# Up-To-Date script as of April 18, 2016
# Tested on: "Linux Mint 17.2 Cinnamon 32-bit"
#            Oracle VirtualBox v5.0.16 r105871


# [-                        Prepare System                         -]
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo apt-get install -y python make build-essential g++ curl
sudo apt-get install -y libssl-dev apache2-utils git libxml2-dev
sudo apt-get upgrade  # I feel like this line may be optional


# [-                    Create Central Git Repo                    -]
# (or use your own location)
mkdir ~/GitHub
cd ~/GitHub
git clone https://github.com/c9/core                   # clone Cloud9
git clone https://github.com/creationix/nvm.git ~/.nvm # clone nvm
# Cloud 9 v3 is currently developed with Node.js v0.10 and v0.12
source ~/.nvm/nvm.sh
nvm install 0.10


# [-                         Setup Cloud9                          -]
cd core
# sudo is omitted because npm is owned by <user>
npm install packager
npm install
./scripts/install-sdk.sh

echo "- END OF LINE -"


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# In .bashrc, add the following for convinience:
#
# function node_init() {
#     source ~/.nvm/nvm.sh
#     nvm use 0
# }
#
# function cloud9_start() {
#     node server.js -p 3000 -a : -w '/home/<user>/'
# }      
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
@kevinongige-webapps

This comment has been minimized.

kevinongige-webapps commented Jul 5, 2016

may ask do i copy paste the whole commented part with the #shes to my .bashrc ? am in linuxmint 17 cinamon

@RGD2

This comment has been minimized.

RGD2 commented Jul 26, 2016

kevinongige-webapps: Without the #'s, and change the <user> part.

@RGD2

This comment has been minimized.

RGD2 commented Jul 26, 2016

FWIW: This doesn't seem possible to do at this time on arm64.

The nvm install 0.10 line dies for me with an error during the make phase, since node expects the -m32/-m64 gcc flags to exist.

./scripts/install-sdk.sh also fails, with the error aarch64 not supported.

(Tried on a hardkernel Odroid-C2 with the vendor supplied Ubuntu Xenial 64bit image on an 8GB eMMC, but I'd expect the same error on a RasPi 3 running a 64bit OS).

@stecape

This comment has been minimized.

stecape commented Jul 29, 2016

@TekuConcept
2016-07-29_121844
I don't know If node is included in your installation bash (Yes, I suppose), but I got this error. Can you help me?

@RGD2

This comment has been minimized.

RGD2 commented Aug 2, 2016

@stecape

I had this problem too, and the version of nodejs apt has is wrong for cloud9, but after running the script, this works instead::

~/.c9/node/bin/node server.js -p 8080 -a :

I also had a problem with 'pty.js', which was resolved by running once (assuming @TekuConcept 's script)

cd ~/GitHub/core
rm -rf node_modules/pty.js
~/.c9/node/bin/npm install pty.js

BTW, this is useful for starting a cloud9 ide from within a git repo:

~/.c9/node/bin/node ~/GitHub/core/server.js -p 8080 -a : -w ./

The cloud9 ide will be at http://localhost:8080 with the git integration working there (it's hidden in the changes tab on the left), and 'File System' shows up with its root being the directory referenced by the -w flag.

If you don't use the -w flag with the git project directory you want to edit, the git integration doesn't work, as it stays 'in' the cloud9 core git repo.

@Dave3of5

This comment has been minimized.

Dave3of5 commented Aug 26, 2016

As a question are you still allowed the run the cloud9 IDE locally. The license seems to state it's only for developing plugins.

@amlamarra

This comment has been minimized.

amlamarra commented Nov 16, 2016

@Dave3of5
This line on the on their README.md indicates that may not be true:
"This is the core repository for the Cloud9 v3 SDK. The SDK allows you to run a version of Cloud9 that allows you to develop plugins and create a custom IDE based on Cloud9."

Edit:
And I just found the licenses page: https://cloud9-sdk.readme.io/docs/the-licenses-for-cloud9-sdk-and-packages
"We also realize there is a desire amongst some to run Cloud9 locally on their server or even their desktop for their personal use (in both a business setting and a personal setting). Although we do offer an easy way to connect to your server via SSH on c9.io some people prefer running Cloud9 themselves because we are not yet in a datacenter nearby or because the server is inside a firewall. This is another valid use case for the SDK.

To support these two use cases we created a custom license that is best described as "Free for non-commercial use". The source of the core is open and on github and you can use it to run Cloud9 and modify it as you want. We simply ask you to get in touch with us when you wish for others than yourself to use your version of Cloud9."

@R89Omer

This comment has been minimized.

R89Omer commented Apr 17, 2018

Hello all,
any can guide me to setup c9 ide locally in windows lpt but you can guide me step by step. or email me its all guide to my email Omer89R@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment