2021-08-10 07:55:12 +02:00
|
|
|
```{eval-rst}
|
2018-01-23 20:36:07 +01:00
|
|
|
:orphan:
|
|
|
|
```
|
|
|
|
|
2020-08-11 01:47:54 +02:00
|
|
|
# Production installation on existing server
|
2017-05-24 22:36:15 +02:00
|
|
|
|
|
|
|
Here are some tips for installing the latest release Zulip on a
|
2018-06-05 17:03:15 +02:00
|
|
|
production server running Debian or Ubuntu. The Zulip installation
|
|
|
|
scripts assume that it has carte blanche to overwrite your
|
|
|
|
configuration files in /etc, so we recommend against installing it on
|
|
|
|
a server running other nginx or django apps.
|
2017-05-24 22:36:15 +02:00
|
|
|
|
|
|
|
But if you do, here are some things you can do that may make it
|
|
|
|
possible to retain your existing site. However, this is *NOT*
|
|
|
|
recommended, and you may break your server. Make sure you have backups
|
|
|
|
and a provisioning script ready to go to wipe and restore your
|
|
|
|
existing services if (when) your server goes down.
|
|
|
|
|
2018-04-12 18:19:26 +02:00
|
|
|
These instructions are only for experts. If you're not an experienced
|
2017-05-24 22:36:15 +02:00
|
|
|
Linux sysadmin, you will have a much better experience if you get a
|
2020-06-08 23:04:39 +02:00
|
|
|
dedicated VM to install Zulip on instead (or [use
|
2021-06-01 23:29:20 +02:00
|
|
|
zulip.com](https://zulip.com)).
|
2017-05-24 22:36:15 +02:00
|
|
|
|
2017-08-24 00:11:23 +02:00
|
|
|
### Nginx
|
2017-05-24 22:36:15 +02:00
|
|
|
|
|
|
|
Copy your existing nginx configuration to a backup and then merge the
|
|
|
|
one created by Zulip into it:
|
|
|
|
|
2021-08-20 07:09:04 +02:00
|
|
|
```bash
|
2017-08-24 00:10:35 +02:00
|
|
|
sudo cp /etc/nginx/nginx.conf /etc/nginx.conf.before-zulip-install
|
2021-07-13 21:00:50 +02:00
|
|
|
sudo curl -fL -o /etc/nginx/nginx.conf.zulip \
|
2021-09-01 00:15:31 +02:00
|
|
|
https://raw.githubusercontent.com/zulip/zulip/main/puppet/zulip/templates/nginx.conf.template.erb
|
2019-01-15 02:56:06 +01:00
|
|
|
sudo meld /etc/nginx/nginx.conf /etc/nginx/nginx.conf.zulip # be sure to merge to the right
|
2017-05-24 22:36:15 +02:00
|
|
|
```
|
|
|
|
|
2021-06-01 23:28:58 +02:00
|
|
|
Since the file in Zulip is an [ERB Puppet
|
|
|
|
template](https://puppet.com/docs/puppet/7/lang_template_erb.html),
|
|
|
|
you will also need to replace any `<%= ... %>` sections with
|
|
|
|
appropriate content. For instance `<%= @ca_crt %>` should be replaced
|
|
|
|
with `/etc/ssl/certs/ca-certificates.crt` on Debian and Ubuntu
|
|
|
|
installs.
|
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
After the Zulip installation completes, then you can overwrite (or
|
2017-05-24 22:36:15 +02:00
|
|
|
merge) your new nginx.conf with the installed one:
|
|
|
|
|
2021-08-20 07:09:04 +02:00
|
|
|
```console
|
2019-01-15 02:56:06 +01:00
|
|
|
$ sudo meld /etc/nginx/nginx.conf.zulip /etc/nginx/nginx.conf # be sure to merge to the right
|
2017-05-24 22:36:15 +02:00
|
|
|
$ sudo service nginx restart
|
|
|
|
```
|
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
Zulip's Puppet configuration will change the ownership of
|
2017-05-24 22:36:15 +02:00
|
|
|
`/var/log/nginx` so that the `zulip` user can access it. Depending on
|
|
|
|
your configuration, this may or may not cause problems.
|
|
|
|
|
2017-08-24 00:11:23 +02:00
|
|
|
### Puppet
|
2017-05-24 22:36:15 +02:00
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
If you have a Puppet server running on your server, you will get an
|
2017-05-24 22:36:15 +02:00
|
|
|
error message about not being able to connect to the client during the
|
|
|
|
install process:
|
|
|
|
|
2021-08-20 07:09:04 +02:00
|
|
|
```console
|
2017-05-24 22:36:15 +02:00
|
|
|
puppet-agent[29873]: Could not request certificate: Failed to open TCP connection to puppet:8140
|
|
|
|
```
|
|
|
|
|
docs: Add missing space to compound verbs “log in”, “set up”, etc.
Noun: backup, checkout, cleanup, login, logout, setup, shutdown, signup,
timeout.
Verb: back up, check out, clean up, log in, log out, set up, shut
down, sign up, time out.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-25 23:05:38 +02:00
|
|
|
So you'll need to shut down any Puppet servers.
|
2017-05-24 22:36:15 +02:00
|
|
|
|
2021-08-20 07:09:04 +02:00
|
|
|
```console
|
2017-05-24 22:36:15 +02:00
|
|
|
$ sudo service puppet-agent stop
|
|
|
|
$ sudo service puppet stop
|
|
|
|
```
|
|
|
|
|
2020-06-23 08:57:14 +02:00
|
|
|
### PostgreSQL
|
2017-05-24 22:36:15 +02:00
|
|
|
|
2020-06-23 08:57:14 +02:00
|
|
|
Zulip expects to install PostgreSQL 12, and find that listening on
|
|
|
|
port 5432; any other version of PostgreSQL that is detected at install
|
|
|
|
time will cause the install to abort. If you already have PostgreSQL
|
2020-10-26 22:35:47 +01:00
|
|
|
installed, you can pass `--postgresql-version=` to the installer to
|
|
|
|
have it use that version. It will replace the package with the latest
|
|
|
|
from the PostgreSQL apt repository, but existing data will be
|
|
|
|
retained.
|
2020-06-23 08:57:14 +02:00
|
|
|
|
|
|
|
If you have an existing PostgreSQL database, note that Zulip will use
|
2017-05-24 22:36:15 +02:00
|
|
|
the default `main` as its database name; make sure you're not using
|
|
|
|
that.
|
|
|
|
|
2020-10-23 02:43:28 +02:00
|
|
|
### Memcached, Redis, and RabbitMQ
|
2017-05-24 22:36:15 +02:00
|
|
|
|
|
|
|
Zulip will, by default, configure these services for its use. The
|
|
|
|
configuration we use is pretty basic, but if you're using them for
|
|
|
|
something else, you'll want to make sure the configurations are
|
|
|
|
compatible.
|
|
|
|
|
2017-08-24 00:11:23 +02:00
|
|
|
### No uninstall process
|
2017-05-24 22:36:15 +02:00
|
|
|
|
|
|
|
We don't provide a convenient way to uninstall a Zulip server.
|
|
|
|
|
|
|
|
## No support, but contributions welcome!
|
|
|
|
|
|
|
|
Most of the limitations are things we'd accept a pull request to fix;
|
|
|
|
we welcome contributions to shrink this list of gotchas. Chat with us
|
2021-07-26 07:04:26 +02:00
|
|
|
in the [chat.zulip.org community](https://zulip.com/developer-community/) if you're
|
2017-05-24 22:36:15 +02:00
|
|
|
interested in helping!
|