docker deploy

About

To be the best self-hosted office suite and google workspace alternative.

0. Requirements

Minimum 4G memory 2 cores CPU linux 64-bit operating system

1. configure DNS

Configure A record in the domain name service provider or DNS resolution service provider

For example:

hostname

record type

record value

work

A

x.x.x.x

  • The hostname can be any secondary domain name prefix, here use work

  • example.com is your domain name

  • x.x.x.x is the public IP address of the server

  • The web access address is https://work.example.com

2. Install docker, docker-compose, git

# If already installed, skip

mkdir pkgs && cd pkgs
wget 'https://download.docker.com/linux/static/stable/x86_64/docker-26.1.4.tgz'
tar xf docker-26.1.4.tgz;
chmod +x docker/*
sudo cp docker/* /usr/local/bin/

curl -SL https://github.com/docker/compose/releases/download/v2.27.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose

yum install git # centos
apt install git  # ubuntu/debian

3. Install

# github 国外用户使用github更快
git clone https://github.com/bindoffice/bind-docker.git

# gitee 国内用户使用gitee更快
git clone https://gitee.com/bindoffice/bind-docker.git

cd bind-docker/office
cp env.example .env
Modify the .env configuration, modify all variables marked with ‘Need modify’
# Generate a self-signed SSL certificate and will be replaced by the free certificate later
make openssl
make
After running, http 80 port can be accessed, should be able to access http://work.example.com(work.example.com is the domain name used)
The service will automatically create an administrator account (for configuring the system, adding users, adding teams, etc.) and a normal user account admin@your domain name (for using the system service)

config example <./env-example.html>`_

The deployment runs on PostgreSQL, see postgresql deploy

4. Automatic generation of free SSL certificates

The service has built-in Let’s Encrypt HTTP-01 verification service interface, running this command will request the /acme/create interface to create a certificate
After obtaining the certificate successfully, the certificate will be written to bindinbox/certs/cert.key bindinbox/certs/cert.crt
This command will use the generated free certificate to replace nginx/certs/cert.key nginx/certs/cert.crt
make cert
The certificate is valid for 3 months, install the automatic renewal job with make cron, see ssl certificate

5. Restart the service

Stop all running docker containers
make down
Start docker containers
make

6. Use https to access and login

Access https://work.example.com/login?admin=true (work.example.com is the domain name used), use the administrator account (the email and password configured) to log in Access https://work.example.com/hello page, continue to add users, teams, etc.