2016-11-16 20:44:23 +01:00
# Development on a Remote Machine
2016-11-20 23:09:59 +01:00
Zulip can be developed on a remote machine.
We recommend doing this if you are running Windows or have other
blockers stopping you from [developing locally ](dev-overview.html ).
2016-11-16 20:44:23 +01:00
2016-11-20 23:09:59 +01:00
We recommend a remote Ubuntu machine for ease of development.
2016-11-16 20:44:23 +01:00
## Connecting to the Remote Environment
2016-11-20 23:09:59 +01:00
Set up your remote server and connect to it using SSH or Mosh.
We recommend using [Mosh ](https://mosh.org/ ) as it is more reliable over slow network connections.
2016-11-16 20:44:23 +01:00
2016-11-20 23:09:59 +01:00
## Setting Up the Development Environment
2016-11-20 23:20:06 +01:00
After you have connected to your remote server,
you need to install the development environment.
2016-11-20 23:09:59 +01:00
Follow the platform specific instructions for your specific remote instance:
2016-11-20 23:20:06 +01:00
* [Ubuntu Installation ](install-ubuntu-without-vagrant-dev.html ) - this installs the Zulip development environment directly on your remote server.
* [Detailed tutorial for Vagrant development environment ](dev-env-first-time-contributors.html ) - this installs the development environment in a self-contained environment that is easy to remove later.
* [Brief installation instructions for Vagrant development environment ](brief-install-vagrant-dev.html ) - a shorter guide for the previous option.
2016-11-20 23:09:59 +01:00
## Running the Development Server
2016-11-20 23:20:06 +01:00
Once you have set up the development environment, you can start up the development instance of zulip with the command
2016-11-20 23:09:59 +01:00
```
./tools/run-dev.py
```
This will start up zulip on port 9991. You can then navigate to http://< REMOTE_IP > :9991 and you should see something like
[(this screenshot of the Zulip dev environment) ](https://raw.githubusercontent.com/zulip/zulip/master/docs/images/zulip-dev.png ).
![Image of Zulip dev environment ](https://raw.githubusercontent.com/zulip/zulip/master/docs/images/zulip-dev.png )
You can [port forward ](https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding )
using ssh instead of running the dev env on an exposed interface.
For more information, see [Using the Development Environment ](using-dev-environment.html ).
2016-11-16 20:44:23 +01:00
## Editing Code on the Remote Machine
You will need to either edit code locally on your computer and sync it to the remote
development environment or just edit the zulip code base on the remote host.
#### Editing Locally
2016-11-20 22:24:36 +01:00
If you want to edit code locally you can install your favorite text editor:
2016-11-16 20:44:23 +01:00
* [atom ](https://atom.io/ )
* [emacs ](https://www.gnu.org/software/emacs/ )
* [vim ](http://www.vim.org/ )
* [spacemacs ](https://github.com/syl20bnr/spacemacs )
* [sublime ](https://www.sublimetext.com/ )
* etc
2016-11-20 22:24:36 +01:00
Next, [set up git ](git-guide.html ) on your local machine and clone the zulip
2016-11-16 20:44:23 +01:00
repository.
Once you have your code locally you will need to sync your changes to your development server:
* [Unison ](https://github.com/bcpierce00/unison ) Recommended
* [Rsync ](https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps )
#### Editing Remotely
You will need to use a text editor on the remote machine:
* [emacs ](https://www.gnu.org/software/emacs/ )
* [vim ](http://www.vim.org/ )
* [spacemacs ](https://github.com/syl20bnr/spacemacs )
Once you install an editor
[setup an ssh key ](https://help.github.com/articles/generating-an-ssh-key/ )
on your host and [clone ](git-guide.html ) the zulip repository.
#### Next Steps
At this point you should
[read about developing ](dev-env-first-time-contributors.html#step-4-developing )
and [read about using the development environment ](using-dev-environment.html ).