Troubleshooting

What IDE should you use?

We recommend you use Visual Studio Code or Intellij IDEA for your IDE.

APITable have prepared these two IDE's debug configs.

Just open APITable's root directory with IDE.



How to configure the SMTP server?

By default, APITable doesn't configure the SMTP server, which means you cannot invite users since it require the email sending feature.

It is needed to modify .env configuration using self email, and restart backend server.

MAIL_ENABLED=true

MAIL_HOST=smtp.xxx.com

MAIL_PASSWORD=your_email_password

MAIL_PORT=465

MAIL_SSL_ENABLE=true

MAIL_TYPE=smtp

MAIL_USERNAME=your_email

In addition, some mailboxes need to be enabled in the background to use smtp. For details, you can search for xxx mailbox smtp tutorial.


Performance problem under macOS M1 docker run?

Where is the API documentation?

You can access the API documentation by starting a local server:

  1. The documentation address for the Backend server is: http://localhost:8081/api/v1/doc.html

  2. The documentation address for the Room server is: http://localhost:3333/nest/v1/docs

If you are interested in cloud service API interfaces, you can also directly access the online API documentation at https://developers.apitable.com/api/introduction.

How to set the limitation of widget quantity in dashboard? (30 by default)

This can be achieved by setting the DSB_WIDGET_MAX_COUNT parameter in the .env file.

Can I increase request rate limit of the API? (5 by default)

In the .env.default file of room-server, there are two parameters that can adjust request frequency:

  1. You can set LIMIT_POINTS and LIMIT_DURATION to indicate the number of requests that can be made in a unit time period. Where LIMIT_POINTS is the number of times and LIMIT_DURATION is the duration, measured in seconds.

  2. You can set the parameter LIMIT_WHITE_LIST to set a separate request frequency for specific users. Its value is a JSON string, and its structure can refer to Map<string, IBaseRateLimiter>.

How to increase the number of records inserted per API call? (10 by default)

This can be achieved by setting the API_MAX_MODIFY_RECORD_COUNTS parameter in the .env.default file of room-server.


How to upgrade to the newest release version?

Simply update the docker image, and make sure that you run docker-compose in the same folder as the older version of APITable, so that your data will not be lost (apitable/.data).

check the changelog, especially the breaking change if any

stop the running instance

  • docker compose


cd apitable # or any installation directory containing the docker-compose.yaml/.env and .data

sudo docker compose down -v --remove-orphans

sudo docker ps # check the target instance is actually stopped
  • all-in-one


sudo docker stop apitable

sudo docker rm apitable

sudo docker ps # check the target instance is actually stopped

backup the data directory and deployment manifest

  • docker compose


cd apitable # or any installation directory containing the docker-compose.yaml/.env and .data

sudo cp -pr .data .data.backup

sudo cp docker-compose.yaml docker-compose.yaml.backup

sudo cp .env .env.backup
  • all-in-one


cd apitable # or any installation directory containing the .data

sudo cp -pr .data .data.backup

update your local deployment manifest and start the new instance

  • docker compose


cd apitable # or any installation directory containing the docker-compose.yaml/.env and .data

curl -fLo docker-compose.tar.gz 'https://github.com/apitable/apitable.github.io/releases/latest/download/docker-compose.tar.gz'
tar -xvzf docker-compose.tar.gz
# update the .env docker-compose.yaml if you make any customization

sudo docker compose pull # pull the image if you use the latest build

sudo docker compose up -d
  • all-in-one

sudo docker pull apitable/all-in-one:latest # pull the latest image if you want to use the latest build

sudo docker run -d -v ${PWD}/.data:/apitable -p 80:80 --name apitable apitable/all-in-one:latest # you can replace the latest image tag with the one found in dockerhub

How to change the default 80 port?

Configuration properties in the .env file can also be overridden by specifying them env vars NGINX_HTTP_PORT

For example. It would be set as NGINX_HTTP_PORT=8080


Container "mysql" keeps being unhealthy in WSL2

Check out the log of the mysql container, if it contains a lot of Input/output errors like the following:

2023-02-08 19:29:38 find: '/var/lib/mysql/binlog.000059': Input/output error

it is due to APITable deployed on Windows file system as per https://github.com/apitable/apitable/issues/331 , you need to deploy it in Linux instead.


How to disable sign up?

To prohibit user registration, you can set SKIP_REGISTER_VALIDATE in the environment variable to false, and then restart the backend-server.


How to set up TLS support?

  1. Option A: using a reverse proxy in front of the deployment (recommended)

  2. Option B: customize the nginx conf to support tls using the following reference:

https://github.com/apitable/apitable/blob/69aeb706db5f58d6147ef43edab21b1468803fd2/docker-compose.yaml#L94

https://github.com/apitable/apitable/blob/69aeb706db5f58d6147ef43edab21b1468803fd2/packaging/Dockerfile.openresty#L6

https://github.com/apitable/apitable/blob/69aeb706db5f58d6147ef43edab21b1468803fd2/gateway/conf.d/default.conf#L64

“Network Disconnected” when using reverse proxy

"Network Disconnected" means websocket hasn't been properly proxied. You can add the following snippet in your nginx configuration:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''  close;
}

server {
    charset utf-8;

    location / {
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header X-Nginx-Proxy true;
        proxy_set_header Host $http_host;
        proxy_set_header X-Original-URI $request_uri;
        proxy_http_version 1.1;
        proxy_pass  http://APITable_IP_ADDRESS:PORT;
    }
}