zulip/docs/brief-install-vagrant-dev.md

4.4 KiB

Vagrant environment setup (in brief)

Start by cloning this repository: git clone https://github.com/zulip/zulip.git

This is the recommended approach for all platforms, and will install the Zulip development environment inside a VM or container and works on any platform that supports Vagrant.

The best performing way to run the Zulip development environment is using an LXC container on a Linux host, but we support other platforms such as Mac via Virtualbox (but everything will be 2-3x slower).

Once that's done, simply change to your zulip directory and run vagrant up in your terminal to install the development server. This will take a long time on the first run because Vagrant needs to download the Ubuntu Trusty base image, but later you can run vagrant destroy and then vagrant up again to rebuild the environment and it will be much faster.

Once that finishes, you can run the development server as follows:

vagrant ssh
# Now inside the container
/srv/zulip/tools/run-dev.py

To get shell access to the virtual machine running the server to run lint, management commands, etc., use vagrant ssh.

At this point you should read about using the development environment.

Specifying a proxy

If you need to use a proxy server to access the Internet, you will need to specify the proxy settings before running Vagrant up. First, install the Vagrant plugin vagrant-proxyconf:

vagrant plugin install vagrant-proxyconf.

Then create ~/.zulip-vagrant-config and add the following lines to it (with the appropriate values in it for your proxy):

HTTP_PROXY http://proxy_host:port
HTTPS_PROXY http://proxy_host:port
NO_PROXY localhost,127.0.0.1,.example.com

Now run vagrant up in your terminal to install the development server. If you ran vagrant up before and failed, you'll need to run vagrant destroy first to clean up the failed installation.

You can also change the port on the host machine that Vagrant uses by adding to your ~/.zulip-vagrant-config file. E.g. if you set:

HOST_PORT 9971

(and halt and restart the Vagrant guest), then you would visit http://localhost:9971/ to connect to your development server.

If you'd like to be able to connect to your development environment from other machines than the VM host, you can manually set the host IP address in the '~/.zulip-vagrant-config' file as well. For example, if you set:

HOST_IP_ADDR 0.0.0.0

(and restart the Vagrant guest), your host IP would be 0.0.0.0, a special value for the IP address that means any IP address can connect to your development server.