# Using a cloud IDE: Codeanywhere

**URL:** <https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455>\
**Category:** Project help\
**Created:** [December 20, 2016, 6:08pm UTC](https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455 "2016-12-20T18:08:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [December 20, 2016, 6:08pm UTC](https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455/1 "2016-12-20T18:08:16Z")

</div>

We were running a couple of workshops with [resin.io](http://resin.io) recently (@hedley, @mccollam, and others on the team), and one of the consistent issues that came up a lot, is getting people up and running with required prerequisites, even from the level of having [git](https://git-scm.com/) installed… To help with this, I was checking out a bunch of cloud IDEs that would help us with a consistent experience. Many of them work very well, though with different trade-offs. Would like to do a detailed comparison later.

In the meantime, though, I wanted show one example I’ve just tested, one that seems to cut it at least for basic development, [Codeanywhere](https://codeanywhere.com/).

### Setting up, cloning, and pushing a project

The basic view of Codeanywhere is pretty simple and familiar, a “file system tree” view on the left, and an editor in the middle.

 ![](https://global.discourse-cdn.com/balena/original/1X/76f1d03a62cbf96a2a5848a2e302203e46a0341a.png)

Could start from scratch, following the [resin.io getting started guide](https://docs.resin.io/raspberrypi3/nodejs/getting-started/), adding a `Dockerfile`, etc. For simplicity, here I used one of our demo projects, [simple-server-node](https://github.com/resin-io-projects/simple-server-node). It is available on Github, and copying its address (from the “Clone or Download” button) `https://github.com/resin-io-projects/simple-server-node.git`, I can create a new environment in `File > New Connection > Git from URL`:

 ![](https://global.discourse-cdn.com/balena/original/1X/4c041d7e99c88b81744f84702dfb96343875e2e7.png)

Note: I’m using the `Git from URL`, not the `GitHub` connection, as the latter only seem to be able to use my own repositories, not “any Github repo”, as I sort of expected.

 ![](https://global.discourse-cdn.com/balena/original/1X/64863c8b944bc7239a037ba66bb5cf1b03f0f460.png)

Once the git address is added, I set a name and choose a stack. I’m choosing here a Node.js stack, so I can use [resin-cli](https://docs.resin.io/tools/cli/) in the cloud too. Otherwise could just choose a Blank stack.

 ![](https://global.discourse-cdn.com/balena/original/1X/70abaf5302c7fdd09b732b0340d3693be5ecded3.png)

In a few seconds the project is cloned and the source code shows up in the left sidebar. Ready to hack on a project!

 ![](https://global.discourse-cdn.com/balena/original/1X/e60c0d0c2dffb36e3118b222c2663ca52c718123.png)

After getting the code, and modifying it, the next thing is actually deploying. For this, I need to authorise my user’s Codeanywhere ssh key on the [resin.io](http://resin.io) side. Get the ssh key from `the upper right user icon > Account Dashboard > SSH Keys` section ([direct link](https://codeanywhere.com/dashboard#ssh-keys))

 ![](https://global.discourse-cdn.com/balena/original/1X/104ea994b7b214114da7f6386b6f6b4ea8c8c53c.png)

Copy that key and add it to [resin.io](http://resin.io) at `Dashboard > Preferences > SSH keys` section ([direct link](https://dashboard.resin.io/preferences?tab=sshkeys))

 ![](https://global.discourse-cdn.com/balena/original/1X/9de3a8fc23dfd63eabe279b114b0521dbc1773f9.png)

Once this is set up, I can push code to [resin.io](http://resin.io). That is done on the command line, in the SSH console of the development environment. That can be opened through the right-click menu on the project name, and selecting `SSH Terminal`.

 ![](https://global.discourse-cdn.com/balena/original/1X/5374afd728f36e8857bfd27c2429defd457e4d57.png)

Then added my application (created in the meantime in the [resin.io](http://resin.io) dashboard) using the usual `git remote add ...` command, and ready to do a `git push resin master`:

 ![](https://global.discourse-cdn.com/balena/original/1X/eed7dc896038bdd7328fa3ebcdfa1c4da672604e.png)

After all this, we are in business: I can deploy to [resin.io](http://resin.io) devices from anywhere in the world where I can connect to the Internet!

### Advanced: resin-cli

[resin-cli](https://docs.resin.io/tools/cli/), the command line control tool to [resin.io](http://resin.io) can be very handy, I used especially the device status check, the [`resin ssh`](https://docs.resin.io/tools/cli/#ssh-uuid-) (to access the running application container) and [`resin sync`](https://docs.resin.io/tools/cli/#ssh-uuid-) (to do quick modifications to the running code before checking it in and `git push`).

With the Node.js stack, resin-cli can be installed simply by running `npm install -g resin-cli` in the SSH Terminal. Once done, I can log in with `resin login`: I’m using “Authentication Token” (copied from the [resin.io dashboard](https://dashboard.resin.io/preferences?tab=details))

 ![](https://global.discourse-cdn.com/balena/original/1X/276907b38599e72346a7c3b57e9ec1796dad601f.png)

And a quick test with `resin sync` to a running device:

 ![](https://global.discourse-cdn.com/balena/original/1X/4c9f003f10a88cab1ec2252103ea339ce7fa6458.png)

X X X

I think I have only one free workspace at a time, but it’s so simple to spin one up, and the code should live somewhere on GitHub anyways, that it should not matter much to switch between projects in the beginning.

That was it! Have you tried this? Or any other cloud IDE? ([SourceLair](https://www.sourcelair.com/), [Cloud9](https://c9.io/), [Codenvy](https://codenvy.com/), etc…) What do you think?

---

<div class="post-metadata">

**Author:** ![curcuz](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/curcuz/32/137_2.png) [@curcuz](https://forums.balena.io/u/curcuz)\
**Post date:** [December 21, 2016, 11:19am UTC](https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455/2 "2016-12-21T11:19:50Z")

</div>

@imrehg, I know [https://codio.com/](https://codio.com/) is another valid option - I especially love the “class” feature that allows you to manage workshops easily. Been a while since my last check in there but it seems it got even more education-oriented

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [December 23, 2016, 11:21am UTC](https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455/3 "2016-12-23T11:21:30Z")

</div>

Found another use case for cloud IDEs: **protecting long git push processes**. Been working on a [Dungeon Crawl Stone Soup resin server](https://github.com/resin-io-playground/resin-crawl), and the compilation takes a while. Seems like I can do:

1. In the SSH console `sudo apt-get install screen` to be able to leave a process behind
2. run `screen` and push there
3. can navigate away if need to, and when returning, just `screen -DR` in the SSH console again.

The free tier for Codeanywhere does not include “always on” servers, so it might be shut down in the background, but it should protect from short network outages, for example. ✌

---

<div class="post-metadata">

**Author:** ![yoshiokatsuneo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/yoshiokatsuneo/32/825_2.png) [@yoshiokatsuneo](https://forums.balena.io/u/yoshiokatsuneo)\
**Post date:** [March 6, 2018, 2:12am UTC](https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455/4 "2018-03-06T02:12:27Z")

</div>

[PaizaCloud](https://paiza.cloud/) also offer Cloud IDE solution. It is quite quick to launch workspace, and easy to use.

---

<div class="post-metadata">

**Author:** ![lyolabair](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@lyolabair](https://forums.balena.io/u/lyolabair)\
**Post date:** [May 28, 2018, 11:30pm UTC](https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455/5 "2018-05-28T23:30:21Z")

</div>

Please I need help… I do get error of like 6 workspace whenever I wanna start

---

<div class="post-metadata">

**Author:** ![mckaycr](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mckaycr/32/700_2.png) [@mckaycr](https://forums.balena.io/u/mckaycr)\
**Post date:** [October 23, 2018, 11:56am UTC](https://forums.balena.io/t/using-a-cloud-ide-codeanywhere/455/6 "2018-10-23T11:56:34Z")

</div>

I tried codenvy now that codeanywhere has reduced free accounts to 2 hours a day. But when I add my resin repo to my project, it times out. Anyone else have this issue? I am able to connect to my gitlab repo as well as github, but not [git.resin.io](http://git.resin.io)
