zulip/docs/dev-remote.md
2016-11-29 14:13:21 -08:00

4.4 KiB

Developing on a remote machine

The Zulip developer environment works well on remote virtual machines. This can be a good alternative for those with poor network connectivity or who have limited storage/memory on their local machines.

We recommend giving Zulip dev its own virtual machine, running Ubuntu 14.04 or 16.04, with at least 2GB of memory. If Zulip dev will be the only thing running on the remote virtual machine, we recommend installing directly. Otherwise, we recommend the Vagrant method so you can easily uninstall if you need to.

Connecting to the remote environment

The best way to connect to your server is with the command line tool ssh.

  • On macOS and Linux/UNIX, ssh is a part of Terminal.
  • On Windows, ssh comes with Bash for Git.

Open Terminal or Bash for Git, and connect with the following:

$ ssh username@host

If you have poor internet connectivity, we recommend using Mosh as it is more reliable over slow or unreliable networks.

Setting up the development environment

After you have connected to your remote server, you need to install the development environment.

If Zulip dev will be the only thing running on the remote virtual machine, we recommend installing directly. Otherwise, we recommend the Vagrant method so you can easily uninstall if you need to.

Running the development server

Once you have set up the development environment, you can start up the development instance of zulip with the following command in the directory where you cloned zulip:

./tools/run-dev.py --interface=''

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).

Image of Zulip dev
environment

You can port forward using ssh instead of running the dev env on an exposed interface.

For more information, see Using the development environment.

Making changes to code on your remote dev server

To see changes on your remote dev server, you need to do one of the following:

  • edit code locally on your computer and then sync it to the remote development environment, or
  • edit the zulip code directly on the remote server.

Editing locally

If you want to edit code locally install your favorite text editor. If you don't have a favorite, here are some suggestions:

Next, follow our Git and GitHub Guide to clone and configure your fork of zulip on your local computer.

Once you have cloned your code locally, you can get to work.

When you are ready to sync your changes to your development server, use one of these programs:

Editing remotely

To edit directly on the remote dev server, you will need to use a text editor on the remote machine. Nano and Vim are often installed by default. If not, or if you want to try something else, we recommend:

Once you have installed an editor you like, you can get to work. Be sure to take a look through our Git & GitHub Guide for tips on using Git with Zulip.

Next steps

Next, read the following to learn more about developing for Zulip: