2022-02-12 01:32:47 +01:00
|
|
|
# Install a Zulip server
|
2016-07-12 21:49:44 +02:00
|
|
|
|
2022-02-12 01:32:47 +01:00
|
|
|
## Before you begin
|
|
|
|
|
|
|
|
To install a Zulip server, you'll need an Ubuntu or Debian system that satisfies
|
2022-02-24 00:17:21 +01:00
|
|
|
[the installation requirements](requirements.md). Alternatively,
|
2019-07-20 00:50:50 +02:00
|
|
|
you can use a preconfigured
|
2021-04-20 19:45:26 +02:00
|
|
|
[DigitalOcean droplet](https://marketplace.digitalocean.com/apps/zulip?refcode=3ee45da8ee26), or
|
2019-07-20 00:50:50 +02:00
|
|
|
Zulip's
|
2022-02-16 01:39:15 +01:00
|
|
|
[experimental Docker image](deployment.md#zulip-in-docker).
|
2019-07-20 00:50:50 +02:00
|
|
|
|
2022-02-12 01:32:47 +01:00
|
|
|
### Should I follow this installation guide?
|
|
|
|
|
|
|
|
- If you are just looking to play around with Zulip and see what it looks like,
|
|
|
|
you can create a test Zulip Cloud organization at <https://zulip.com/new>.
|
|
|
|
|
|
|
|
- If you are deciding between self-hosting Zulip and signing up for [Zulip Cloud](https://zulip.com/plans/),
|
2022-04-04 23:09:59 +02:00
|
|
|
our [self-hosting overview](https://zulip.com/self-hosting/) and [guide to
|
2022-02-12 01:32:47 +01:00
|
|
|
choosing between Zulip Cloud and
|
|
|
|
self-hosting](https://zulip.com/help/getting-your-organization-started-with-zulip#choosing-between-zulip-cloud-and-self-hosting)
|
|
|
|
are great places to start.
|
|
|
|
|
|
|
|
- If you're developing for Zulip, you should follow the instructions
|
|
|
|
to install Zulip's [development environment](../development/overview.md).
|
2016-07-28 01:38:02 +02:00
|
|
|
|
2017-10-28 02:46:31 +02:00
|
|
|
## Step 1: Download the latest release
|
2016-07-28 01:38:02 +02:00
|
|
|
|
2021-09-10 00:16:29 +02:00
|
|
|
Download and unpack [the latest server
|
|
|
|
release](https://download.zulip.com/server/zulip-server-latest.tar.gz)
|
|
|
|
(**Zulip Server {{ LATEST_RELEASE_VERSION }}**) with the following commands:
|
2016-07-28 01:38:02 +02:00
|
|
|
|
2021-08-20 07:09:04 +02:00
|
|
|
```bash
|
2017-08-10 02:36:13 +02:00
|
|
|
cd $(mktemp -d)
|
2021-08-26 04:14:59 +02:00
|
|
|
curl -fLO https://download.zulip.com/server/zulip-server-latest.tar.gz
|
2017-08-10 02:36:13 +02:00
|
|
|
tar -xf zulip-server-latest.tar.gz
|
2016-07-28 01:38:02 +02:00
|
|
|
```
|
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- If you'd like to verify the download, we
|
2021-08-20 22:54:08 +02:00
|
|
|
[publish the sha256sums of our release tarballs](https://download.zulip.com/server/SHA256SUMS.txt).
|
2021-08-20 21:45:39 +02:00
|
|
|
- You can also
|
2022-02-16 01:39:15 +01:00
|
|
|
[install a pre-release version of Zulip](deployment.md#installing-zulip-from-git)
|
2021-08-20 22:54:08 +02:00
|
|
|
using code from our [repository on GitHub](https://github.com/zulip/zulip/).
|
2017-10-17 09:29:40 +02:00
|
|
|
|
2017-10-28 02:46:31 +02:00
|
|
|
## Step 2: Install Zulip
|
|
|
|
|
2017-12-13 04:54:10 +01:00
|
|
|
To set up Zulip with the most common configuration, you can run the
|
|
|
|
installer as follows:
|
2017-10-28 02:46:31 +02:00
|
|
|
|
2021-08-20 07:09:04 +02:00
|
|
|
```bash
|
2018-09-25 21:22:02 +02:00
|
|
|
sudo -s # If not already root
|
2017-10-28 02:46:31 +02:00
|
|
|
./zulip-server-*/scripts/setup/install --certbot \
|
2017-12-13 04:54:10 +01:00
|
|
|
--email=YOUR_EMAIL --hostname=YOUR_HOSTNAME
|
2016-07-28 01:38:02 +02:00
|
|
|
```
|
|
|
|
|
2018-03-03 02:23:07 +01:00
|
|
|
This takes a few minutes to run, as it installs Zulip's dependencies.
|
2022-02-25 00:09:58 +01:00
|
|
|
For more on what the installer does, [see details below](#details-what-the-installer-does).
|
2016-07-28 01:38:02 +02:00
|
|
|
|
2018-03-03 02:23:07 +01:00
|
|
|
If the script gives an error, consult [Troubleshooting](#troubleshooting) below.
|
2018-03-03 01:49:08 +01:00
|
|
|
|
2017-12-13 04:54:10 +01:00
|
|
|
#### Installer options
|
|
|
|
|
2023-01-05 20:34:12 +01:00
|
|
|
- `--email=you@example.com`: The email address for the person or team who
|
|
|
|
maintains the Zulip installation. Note that this is a public-facing email
|
|
|
|
address; it may appear on 404 pages, is used as the sender's address for many
|
|
|
|
automated emails, and is advertised as a support address. An email address
|
|
|
|
like support@example.com is totally reasonable, as is admin@example.com. Do
|
|
|
|
not put a display name; e.g. "support@example.com", not "Zulip Support
|
|
|
|
<support@example.com>". This becomes `ZULIP_ADMINISTRATOR`
|
|
|
|
([docs][doc-settings]) in the Zulip settings.
|
2017-12-13 04:54:10 +01:00
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- `--hostname=zulip.example.com`: The user-accessible domain name for
|
2017-12-13 04:54:10 +01:00
|
|
|
this Zulip server, i.e., what users will type in their web browser.
|
|
|
|
This becomes `EXTERNAL_HOST` ([docs][doc-settings]) in the Zulip
|
|
|
|
settings.
|
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- `--self-signed-cert`: With this option, the Zulip installer
|
2021-08-20 21:53:28 +02:00
|
|
|
generates a self-signed SSL certificate for the server. This isn't
|
2018-01-24 02:54:23 +01:00
|
|
|
suitable for production use, but may be convenient for testing.
|
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- `--certbot`: With this option, the Zulip installer automatically
|
2021-11-01 19:31:40 +01:00
|
|
|
obtains an SSL certificate for the server [using
|
|
|
|
Certbot][doc-certbot], and configures a cron job to renew the
|
|
|
|
certificate automatically. If you'd prefer to acquire an SSL
|
|
|
|
certificate yourself in any other way, it's easy to [provide it to
|
|
|
|
Zulip][doc-ssl-manual].
|
2017-12-13 04:54:10 +01:00
|
|
|
|
2021-04-18 04:01:20 +02:00
|
|
|
You can see the more advanced installer options in our [deployment options][doc-deployment-options]
|
|
|
|
documentation.
|
|
|
|
|
2022-02-24 00:17:21 +01:00
|
|
|
[doc-settings]: settings.md
|
2022-02-16 01:39:15 +01:00
|
|
|
[doc-certbot]: ssl-certificates.md#certbot-recommended
|
|
|
|
[doc-ssl-manual]: ssl-certificates.md#manual-install
|
|
|
|
[doc-deployment-options]: deployment.md#advanced-installer-options
|
2016-07-28 01:38:02 +02:00
|
|
|
|
2018-03-03 02:44:53 +01:00
|
|
|
## Step 3: Create a Zulip organization, and log in
|
2017-02-22 06:15:11 +01:00
|
|
|
|
2021-08-20 21:53:28 +02:00
|
|
|
On success, the install script prints a link. If you're [restoring a
|
2020-12-23 08:16:19 +01:00
|
|
|
backup][zulip-backups] or importing your data from [Slack][slack-import],
|
|
|
|
or another Zulip server, you should stop here
|
2019-03-27 19:51:22 +01:00
|
|
|
and return to the import instructions.
|
2019-01-17 00:14:13 +01:00
|
|
|
|
2020-06-08 23:04:39 +02:00
|
|
|
[slack-import]: https://zulip.com/help/import-from-slack
|
2022-02-16 01:39:15 +01:00
|
|
|
[zulip-backups]: export-and-import.md#backups
|
2019-01-17 00:14:13 +01:00
|
|
|
|
2021-08-20 21:53:28 +02:00
|
|
|
Otherwise, open the link in a browser. Follow the prompts to set up
|
2019-01-17 00:14:13 +01:00
|
|
|
your organization, and your own user account as an administrator.
|
|
|
|
Then, log in!
|
2016-08-25 04:01:03 +02:00
|
|
|
|
2021-08-20 21:53:28 +02:00
|
|
|
The link is a secure one-time-use link. If you need another
|
2021-09-08 00:23:24 +02:00
|
|
|
later, you can generate a new one by running
|
2021-08-20 21:53:28 +02:00
|
|
|
`manage.py generate_realm_creation_link` on the server. See also our
|
2021-09-08 00:23:24 +02:00
|
|
|
doc on running [multiple organizations on the same
|
|
|
|
server](multiple-organizations.md) if that's what you're planning to
|
|
|
|
do.
|
2016-08-25 06:29:36 +02:00
|
|
|
|
2018-03-03 02:59:10 +01:00
|
|
|
## Step 4: Configure and use
|
2018-03-03 01:10:51 +01:00
|
|
|
|
2018-03-03 02:59:10 +01:00
|
|
|
To really see Zulip in action, you'll need to get the people you work
|
|
|
|
together with using it with you.
|
2021-08-20 22:54:08 +02:00
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- [Set up outgoing email](email.md) so Zulip can confirm new users'
|
2018-03-03 02:59:10 +01:00
|
|
|
email addresses and send notifications.
|
2021-08-20 21:45:39 +02:00
|
|
|
- Learn how to [get your organization started][realm-admin-docs] using
|
2018-03-03 02:59:10 +01:00
|
|
|
Zulip at its best.
|
2018-03-03 01:10:51 +01:00
|
|
|
|
2018-03-03 02:59:10 +01:00
|
|
|
Learning more:
|
2018-03-03 01:10:51 +01:00
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- Subscribe to the [Zulip announcements email
|
2021-10-15 00:37:27 +02:00
|
|
|
list](https://groups.google.com/g/zulip-announce) for
|
2021-08-20 22:54:08 +02:00
|
|
|
server administrators. This extremely low-traffic list is for
|
|
|
|
important announcements, including [new
|
2021-10-15 00:37:27 +02:00
|
|
|
releases](../overview/release-lifecycle.md) and security issues.
|
2021-08-20 21:45:39 +02:00
|
|
|
- Follow [Zulip on Twitter](https://twitter.com/zulip).
|
|
|
|
- Learn how to [configure your Zulip server settings](settings.md).
|
2022-02-24 00:17:21 +01:00
|
|
|
- Learn about [Backups, export and import](export-and-import.md)
|
2023-01-17 04:33:42 +01:00
|
|
|
and [upgrading](upgrade.md) a production Zulip
|
2021-08-20 22:54:08 +02:00
|
|
|
server.
|
2016-08-25 06:29:36 +02:00
|
|
|
|
2020-06-08 23:04:39 +02:00
|
|
|
[realm-admin-docs]: https://zulip.com/help/getting-your-organization-started-with-zulip
|
2018-03-03 01:49:08 +01:00
|
|
|
|
2018-03-03 02:23:07 +01:00
|
|
|
## Details: What the installer does
|
|
|
|
|
|
|
|
The install script does several things:
|
2021-08-20 22:54:08 +02:00
|
|
|
|
2021-08-20 21:45:39 +02:00
|
|
|
- Creates the `zulip` user, which the various Zulip servers will run as.
|
|
|
|
- Creates `/home/zulip/deployments/`, which the Zulip code for this
|
2021-08-20 22:54:08 +02:00
|
|
|
deployment (and future deployments when you upgrade) goes into. At the
|
|
|
|
very end of the install process, the script moves the Zulip code tree
|
|
|
|
it's running from (which you unpacked from a tarball above) to a
|
|
|
|
directory there, and makes `/home/zulip/deployments/current` as a
|
|
|
|
symbolic link to it.
|
2021-08-20 21:45:39 +02:00
|
|
|
- Installs Zulip's various dependencies.
|
|
|
|
- Configures the various third-party services Zulip uses, including
|
2021-08-20 22:54:08 +02:00
|
|
|
PostgreSQL, RabbitMQ, Memcached and Redis.
|
2021-08-20 21:45:39 +02:00
|
|
|
- Initializes Zulip's database.
|
2018-03-03 02:23:07 +01:00
|
|
|
|
2018-05-22 20:29:33 +02:00
|
|
|
If you'd like to deploy Zulip with these services on different
|
2019-09-30 19:37:56 +02:00
|
|
|
machines, check out our [deployment options documentation](deployment.md).
|
2018-05-22 20:29:33 +02:00
|
|
|
|
2016-08-25 06:29:36 +02:00
|
|
|
## Troubleshooting
|
|
|
|
|
2018-03-03 01:49:08 +01:00
|
|
|
**Install script.**
|
2021-08-20 21:53:28 +02:00
|
|
|
The Zulip install script is designed to be idempotent. This means
|
2018-03-03 01:49:08 +01:00
|
|
|
that if it fails, then once you've corrected the cause of the failure,
|
|
|
|
you can just rerun the script.
|
|
|
|
|
|
|
|
The install script automatically logs a transcript to
|
2021-08-20 21:53:28 +02:00
|
|
|
`/var/log/zulip/install.log`. In case of failure, you might find the
|
|
|
|
log handy for resolving the issue. Please include a copy of this log
|
2018-03-03 01:49:08 +01:00
|
|
|
file in any bug reports.
|
|
|
|
|
|
|
|
**The `zulip` user's password.**
|
|
|
|
By default, the `zulip` user doesn't
|
2017-10-20 23:51:19 +02:00
|
|
|
have a password, and is intended to be accessed by `su zulip` from the
|
|
|
|
`root` user (or via SSH keys or a password, if you want to set those
|
2021-08-20 21:53:28 +02:00
|
|
|
up, but that's up to you as the system administrator). Most people
|
2017-10-20 23:51:19 +02:00
|
|
|
who are prompted for a password when running `su zulip` turn out to
|
|
|
|
already have switched to the `zulip` user earlier in their session,
|
|
|
|
and can just skip that step.
|
|
|
|
|
2018-03-03 01:49:08 +01:00
|
|
|
**After the install script.**
|
|
|
|
If you get an error after `scripts/setup/install` completes, check
|
2017-10-20 23:51:19 +02:00
|
|
|
the bottom of `/var/log/zulip/errors.log` for a traceback, and consult
|
2019-09-30 19:37:56 +02:00
|
|
|
the [troubleshooting section](troubleshooting.md) for advice on
|
2017-10-20 23:51:19 +02:00
|
|
|
how to debug.
|
|
|
|
|
2021-04-01 21:08:49 +02:00
|
|
|
**Community.** If the tips above don't help, please visit [#production
|
|
|
|
help][production-help] in the [Zulip development community
|
|
|
|
server][chat-zulip-org] for realtime help, and we'll try to help you
|
2021-08-20 21:53:28 +02:00
|
|
|
out! Please provide details like the full traceback from the bottom
|
2021-04-01 21:08:49 +02:00
|
|
|
of `/var/log/zulip/errors.log` in your report (ideally in a [code
|
|
|
|
block][code-block]).
|
|
|
|
|
2021-12-09 20:15:18 +01:00
|
|
|
[chat-zulip-org]: https://zulip.com/development-community/
|
2021-04-01 21:08:49 +02:00
|
|
|
[production-help]: https://chat.zulip.org/#narrow/stream/31-production-help
|
2021-05-05 02:05:47 +02:00
|
|
|
[code-block]: https://zulip.com/help/code-blocks
|