Thanks to Docker, the installation of SeaTable Enterprise Edition is very easy and done in a few moments. Ubuntu Server as a widely used and well-documented Linux operating system is an excellent base for SeaTable. If you already have an Ubuntu server, learn how to install SeaTable on it in 10 minutes here.
In order for the setup of SeaTable to go through as smoothly as described here, a few prerequisites must be met. These are:
To begin, let's summarize the requirements again. You will need:
- VServer / Dedicated Server with 4 cores, 8GB RAM and about 10GB memory for the Ubuntu operating system, SeaTable and other requirements
- Root access to the server (via SSH or console)
- Subdomain that refers to the IP address of the server via A-record (IPv4) or AAAA-record (IPv6).
- Server accessible on port 80 and 443 via the subdomain
- User name and password for the private SeaTable repository - ask the SeaTable sales department for the access data
Of course, you should plan for more than the disk space specified above in order to be able to store your own data on the disk in addition to the software. Especially if you plan to organize files in SeaTable, then you should plan very generously for additional storage space.
It is not a prerequisite, but helpful, if the server can be reached via a static IPv4 address. This maximizes the accessibility of the server on the road. In Europe, there are still mobile networks that do not yet support IPv6. Your SeaTable server cannot be reached via such a network if it does not have an IPv4 address.
You ready? Let's go! We assume that you have a root shell open on your server.
First, we update the system to have all packages up to date:
apt upgrade -y
These and all subsequent commands must be executed with root privileges unless otherwise specified.
SeaTable uses docker-compose and you need to install this package. Since it is available via the Ubuntu package sources, the command is sufficient:
apt install docker-compose -y
The packages docker.io and containerd as well as numerous Python3 libraries are part of the dependencies of docker-compose. These are therefore installed at the same time. The system is ready for SeaTable!
Download SeaTable Enterprise
The Docker image of SeaTable Enterprise Edition is located in a private repository on Docker Hub. You can get the credentials from SeaTable Sales.
Use the following command to start the download of the SeaTable image:
docker pull seatable/seatable-ee:latest
Let's move on to the only slightly more difficult part of setting up SeaTable. With the extended explanations, however, this step also becomes quite feasible.
Customization of the docker-compose.yml
To introduce this section, a little basic knowledge about installing SeaTable: SeaTable provides its services via several Docker containers. In addition to the SeaTable container itself, which runs the SeaTable server, there are three other containers in play. Specifically, these are the MariaDB database, the Memcached caching service, and the redis dictionary server.
The file docker-compose.yml, which will be discussed in a moment, is the recipe Docker uses to install and configure the SeaTable and the other containers. It contains central security settings (e.g. the database password) and allows customizing the installation to your own wishes and needs (e.g. SSL/TLS configuration).
First create the directory seatable in /opt. Since the installation of containerd, the directory /opt already contains the directory with the same name. Then download the docker-compose.yml into this directory and open the file with a text editor. The code sample below describes the procedure in detail. We use the text editor nano to edit the docker-compose.yml. Logically, however, vim or any other text editor will also work.
wget -O "docker-compose.yml" "https://docs.seatable.io/f/58f1f83e5ac34258806b/?dl=1"
At first glance, you can see the four containers that Docker sets up when you run the recipe: db, memcached, redis, and seatable. For each container, the image to use ("image") and the container name ("container_name") are declared. The container name is the name that can later be used to manage the container via Docker Console.
In addition, each container has a few individual settings, some of which need your attention now.
In the container db you have to change the database password. Replace "YOUR_PASSWORD" with a multi-character, alphanumeric password. Furthermore, you can adjust the path where the directory /opt/seatable/mysql-data/ is made available in the container seatable-mysql. By default this is the path /var/lib/mysql. This is not necessary.
The memcached container and the redis container do not require any customizations. If you are already running memcached or redis, you can remove these two containers from the compose file. However, in order for SeaTable to run, you will need to make manual adjustments in the configuration files later.
The most extensive adjustments are to be made in the container seatable: First of all, the MYSQL_ROOT_PASSWORD must be entered there. Otherwise SeaTable cannot communicate with the database. So enter the password specified above for the container db in "DB_ROOT_PASSWD".
Then it's a matter of deciding whether you want Let's Encrypt to request an SSL certificate for you and include it in the configuration of the web server. If you want to do this - which is probably the recommendation for most users - then change the value of the SEATABLE_SERVER_LETSENCRYPT key to "True" and enter the subdomain you use for SEATABLE_SERVER_HOSTNAME. The Certbot from Let's Encrypt will then request an SSL certificate as part of the setup process and take it into account in the configuration of the web server.
You can leave the time zone set to Etc/UTC for Central Europe. If you are outside Central Europe, then use the usual time zone codes.
Initialization of the database
Now that the YAML file has been customized to your needs, the next step is to initialize the database. To do this, enter the following commands:
The docker-compose command executes the recipe contained in the YAML file: Multiple Docker images are downloaded from Docker Hub and extracted. First MariaDB, then Memcached, then redis, and finally SeaTable itself - in the order prescribed in the docker-compose.yml. After the download, the database container seatable-mysql starts. You can watch the activity on the screen (see below). When finally the seatable container takes over and the message "This is an idle script (infinite loop) to keep container running." appears on the screen, then you can abort the process with the key combination CTRL + C.
Did this work out so far? Then you are very close to your own self-hosted SeaTable instance! If not, please have a look at the troubleshooting hints at the end of this article.
Launch of SeaTable
Execute the docker-compose.yml again. Unlike in the previous step, docker-compose is now executed in the background or "detached". Afterwards, the SeaTable server can be started in the Docker container seatable. Finally, you only need to create an admin user. Your SeaTable server is then ready for its tasks!
docker-compose up -d
docker exec -d seatable /shared/seatable/scripts/seatable.sh start
docker exec -it seatable /shared/seatable/scripts/seatable.sh superuser
After the last command, you will be prompted for an email address and password. Bravo, you have created the first user in your SeaTable on-premises system.
Now call the URL you specified in the docker-compose.yml under SEATABLE_SERVER_HOSTNAME. You will land on the login page of your SeaTable server. Installation successful!
If you have voted to use Let's Encrypt in the docker-compose.yml, then your request should be redirected directly to https and thus the communication with your server should be encrypted. If not, then you should now add your own SSL certificate. Copy the certificate into the folder /opt/seatable/ssl/ and adjust the configuration of the web server nginx. You also have to change the addresses from http to https in the configuration files ccnet.conf, dtable_web_seetings.py and the dtable_server_config.json. After that, nginx, SeaTable and Memcached need to be restarted. You do this with these three commands:
docker exec -it seatable /shared/seatable/scripts/seatable.sh restart
docker restart seatable-memcached
docker exec -it seatable /usr/sbin/nginx -s reload
More about the integration of your own SSL certificate can be found in the SeaTable Manual.
Activation of the SeaTable license
You can use SeaTable Enterprise Edition with all functions without a paid license with up to three users - private as well as commercial and also permanently. For this reason, you do not need a license to get started.
However, if you want to create more than three users in SeaTable, then SeaTable will refuse to do so. You can get a license through our sales department. You can find more information about the prices of SeaTable Enterprise on our pricing page.
To activate the license, save the license file, a TXT file, in the /opt/seatable/seatable-data/seatable folder and restart SeaTable:
docker exec -d seatable /shared/seatable/scripts/seatable.sh restart
The additional users will then be available immediately and will be displayed in the control panel.
If something went wrong during the installation, just delete the directory /opt/seatable and start over. But be careful: The data stored in SeaTable will be lost.
If you have forgotten your administrator's password, execute the command
docker exec -it seatable /shared/seatable/scripts/seatable.sh superuser
simply run it again. The command creates another user with admin rights. If the command produces an error, then your SeaTable license does not allow the creation of additional users. (This also applies to the test mode with a maximum of three users.) In this case, you must set a user to inactive in the MySQL database and then execute the command again.