Skip to content

Setup SeaTable Server Enterprise Edition

This instruction is out of date

This documentation is out of date. Please go to the homepage of https://admin.seatable.io/ and follow the navigation.

Setup

The following assumptions and conventions are used in the rest of this document:

  • /opt/seatable is the directory of SeaTable Server. If you decide to put SeaTable Server in a different directory - which you can - adjust all paths accordingly.
  • SeaTable Server uses two Docker volumes for persisting data generated in its database and the SeaTable Docker container. The volumes' host paths are /opt/seatable/mysql-data and /opt/seatable/seatable-data, respectively. It is not recommended to change these paths. If you do, account for the change when following these instructions.
  • All configuration and log files for SeaTable Server and the webserver Nginx are stored in the volume of the SeaTable container.
  • Due to SeaTable Server's cloud first approach, these instructions only elaborate on the deployment of SeaTable Server's latest version. (Earlier versions of SeaTable EE can be installed using these instructions. Just download the image of the version in question from Docker Hub and adjust the docker-compose file accordingly. Earlier versions may not be compatible with the SeaTable plugins available on SeaTable's Market though.)

Installing Docker

This step is only required if you don't have installed docker yet. Execute the following script to install docker and docker compose plugin. Otherwise refer to the official installation documentation of docker for your operating system.

curl -fsSL get.docker.com | bash

Downloading the SeaTable Image

Pull the SeaTable image from Docker Hub:

$ docker pull seatable/seatable-enterprise:latest

Note: Older SeaTable versions are also available on Docker Hub. To pull an older version, replace 'latest' by the desired version like seatable/seatable-enterprise:4.1.9

Activating the SeaTable License

To install SeaTable Enterprise Edition, you require a valid SeaTable Server license. The SeaTable Server license is a text file with the name seatable-license.txt stored in the folder /opt/seatable/seatable-data/seatable/. The license file contains the number of users, an expire data and a has value.

Up to three users is always free

You can request a free license file for up to three users and two years of validity. If you like SeaTable and want to buy a bigger license, please contact us.

In general you have create the directory /opt/seatable/seatable-data/seatable and save the license file it.

$ mkdir -p /opt/seatable/seatable-data/seatable/
$ cd /opt/seatable/seatable-data/seatable/
$ nano seatable-license.txt

Now there are two ways to get a free license file:

Use the following commands to request a new license. Please replace email@example.com with a valid email address of yours.

curl https://get.seatable.io/license/email@example.com

Download the license to the current directory, like it is described in the email you just received.

Visit the website https://seatable.io/on-premises and use the form to request a free license. Paste the content of the license file in the newly created .txt file, save it, and close it.

Downloading and Modifying docker-compose.yml

Download the docker-compose.yml sample file into SeaTable Server's directory and modify the file to fit your environment and settings.

$ cd /opt/seatable/
$ wget -O "docker-compose.yml" "https://manual.seatable.io/docker/Enterprise-Edition/docker-compose.yml"
$ nano docker-compose.yml

The following fields merit particular attention:

  • Password of MariaDB root (MYSQL_ROOT_PASSWORD and DB_ROOT_PASSWD)
  • Use of Let's Encrypt for SSL (SEATABLE_SERVER_LETSENCRYPT)
  • Host name (SEATABLE_SERVER_HOSTNAME)

Additional customizable options in the Compose file are:

  • Volume path for the container db
  • Volume path for the container seatable
  • Image tag of the SeaTable version to install (image)
  • Time zone (TIME_ZONE)

Initializing the Database

Initialize the database by running docker-compose:

$ cd /opt/seatable
$ docker compose up

Wait for a while. When you see This is an idle script (infinite loop) to keep container running. in the output log, the database has been initialized successfully. Press keyboard CTRL + C (Windows) or Control + C (Mac) to return to the prompt.

Starting the Docker Containers

Run docker compose again, this time in detached mode:

$ docker compose up -d

Starting SeaTable

Now you start SeaTable service:

$ docker exec -d seatable /shared/seatable/scripts/seatable.sh start

Then create the first admin user:

$ docker exec -it seatable /shared/seatable/scripts/seatable.sh superuser

Docker parameters

The first command uses the option -d which starts the service in the background. The second command uses the option -it which runs the command in interactive mode.

Enter the e-mail address and the initial password of the admin user. Superuser created successfully confirms that the admin user has been created.

You can now access SeaTable at the host name specified in the Compose file.

Configuring Autostart

By default, SeaTable Server will not start automatically, when the Docker host is restarted.

See the autostart article in this manual to learn how to configure SeaTable Server's autostart.

Reviewing the Deployment

The command docker container list should list the four containers specified in the docker-compose.yml:

picture

The directory layout of the SeaTable container's volume should look as follows:

$ tree /opt/seatable/seatable-data -L 2
/opt/seatable/seatable-data
├── nginx-logs
│   ├── access.log
│   ├── dtable-db.access.log
│   ├── dtable-db.error.log
│   ├── dtable-server.access.log
│   ├── dtable-server.error.log
│   ├── dtable-web.access.log
│   ├── dtable-web.error.log
│   ├── error.log
│   ├── seafhttp.access.log
│   ├── seafhttp.error.log
│   ├── socket-io.access.log
│   └── socket-io.error.log
├── seatable
│   ├── ccnet
│   ├── conf
│   ├── db-data
│   ├── logs
│   ├── pids
│   ├── scripts
│   ├── seafile-data
│   ├── seahub-data
|   ├── seatable-license.txt
│   └── storage-data
└── ssl
    ├── account.conf
    ├── ca
    ├── http.header
    ├── renew_cert
    ├── SEATABLE_SERVER_HOSTNAME
    ├── SEATABLE_SERVER_HOSTNAME.crt
    └── SEATABLE_SERVER_HOSTNAME.key

Note: The directory ssl is empty if Let's Encrypt is not used for HTTPS. SEATABLE_SERVER_HOSTNAME stands for the host name used in the docker-compose.yml file.

All config files are stored in /opt/seatable/seatable-data/seatable/conf.

Any modification of a configuration file requires a restart of SeaTable service to take effect:

$ docker exec -d seatable /shared/seatable/scripts/seatable.sh restart

All of SeaTable Server's log files are stored in /opt/seatable/seatable-data/seatable/logs:

  • dtable-db.log: log of dtable-db component
  • dtable-db-access.log: query log of dtable-db component
  • dtable-db-error.log: error log of dtable-db component
  • dtable-db-slow.log: slow query log of dtable-db component
  • dtable-events.log: log of the dtable-events component
  • dtable_events_io.log: special log for DTABLE import/export as well as Excel and CSV file import/export
  • dtable_events_message.log: special log for sending emails in the dtable-events background
  • dtable-server.log: log of dtable-server component
  • dtable_web.log: log of the dtable-web component
  • init.log: Log of Docker initialization script
  • monitor.log: Monitor logs, monitor.sh can auto restart the unexpectedly closed server
  • seafile.log: log of Seafile server

Additionally, the slow_logs contain slow request logs which help debug performance issues.

SSL/TLS

  • Let's encrypt SSL certificate

If you set SEATABLE_SERVER_LETSENCRYPT to true in "docker-compose.yml", the container requests a Let's Encrypt-signed SSL certificate for you automatically.

e.g.

seatable:
  ...
  ports:
    - "80:80"
    - "443:443"
    ...
  environment:
    ...
    - SEATABLE_SERVER_LETSENCRYPT=True # Default is False. Whether to use let's encrypt certificate.
    - SEATABLE_SERVER_HOSTNAME=example.seatable.com # Specifies your host name if https is enabled

Note:Since the Nginx configuration file is only generated automatically when you run the container for the first time, you'd better set SEATABLE_SERVER_LETSENCRYPT = True before executing the docker compose up -d command for the first time.

If you want to use your own SSL certificate, you can refer to the following steps.

  • Add your own SSL certificate

  • Upload the SSL certificate file to the SeaTable data directory : /Your SeaTable data volume/ssl/

  • Change the "http" of each SERVER_URL in ccnet.conf, dtable_web_settings.py and dtable_server_config.json to "https".
  • Restart the SeaTable service : docker exec -it seatable /shared/seatable/scripts/seatable.sh restart
  • Restart the Memcached service:docker restart seatable-memcached
  • Modify the Nginx configuration file : /Your SeaTable data volume/seatable/conf/nginx.conf

    e.g.

    server {
        if ($host = example.seatable.com) {
            return 301 https://$host$request_uri;
        }
        listen 80;
        server_name example.seatable.com;
        return 404;
    }
    
    server {
        server_name example.seatable.com;
    
        listen 443 ssl;
        ssl_certificate /shared/ssl/<your-ssl.cer>;
        ssl_certificate_key /shared/ssl/<your-ssl.key>;
    
        proxy_set_header X-Forwarded-For $remote_addr;
        ......
    
  • Reload the Nginx configuration file : docker exec -it seatable /usr/sbin/nginx -s reload

FAQ

If, for whatever reason, the installation fails, how do I to start from a clean slate again?

Remove the directory /opt/seatable and start again.

I forgot the SeaTable admin email address/password, how do I create a new admin account?

You can create a new admin account by running the superuser command:

$ docker exec -it seatable /shared/seatable/scripts/seatable.sh superuser

The SeaTable service must be up when running the superuser command.

The Let's Encrypt SSL certificate is about to expire, how do I renew it?

The SSL certificate should renew itself automatically 30 days prior to its expiration. If the automatic renewal fails, run this command in the SeaTable Docker container to manually renew the certificate:

$ /templates/renew_cert.sh

SEATABLE_SERVER_LETSENCRYPT=false change to true.

If you want to change to https after using http, first backup and move the nginx.conf:

$ mv /opt/seatable/shared/seatable/conf/nginx.conf /opt/seatable/shared/seatable/conf/nginx.conf.bak

Then run the following command to apply a certificate:

$ docker exec seatable /templates/seatable.sh init

You need to manually change http to https in other configuration files and restart SeaTable.

$ docker compose down
$ docker compose up -d
$ docker exec -d seatable /shared/seatable/scripts/seatable.sh start

If you have modified the old nginx.conf, now you can modify the new nginx.conf as you want. Then execute the following command to make the nginx configuration take effect:

$ docker exec seatable nginx -s reload