APITable Docs
Configuration

Environment Variables

Environment Variables

APITable is a powerful self-hosted visual database / low-code tool that enables you to easily create, manage, and manipulate endless apps and solutions via UI and APIs.

In order to customize the behavior of APITable and configure it to work with your specific use case, you can use environment variables.

Environment variables are a way to pass information to programs or scripts at runtime.

They are usually set outside of the program or script and can be used to configure various aspects of the software.

Environment variables are often used to store configuration settings, such as API keys, connection strings, and other sensitive information.

APITable uses a number of environment variables to configure its behavior.

Here is a table of the available environment variables and their descriptions:

backend-server Environment Variable Table

CategoryEnvironment Variable NameDescriptionDefault Value
ServerAPI_DOCS_ENABLEDWhether enable openapi document, access address is localhost
/api/v1/doc.html
false
ServerMAX_HTTP_HEADER_SIZEMax size of http request header32KB
ServerMAX_FILE_SIZEMax upload size of http request . the maximum value is 1GB1GB
ServerMAX_REQUEST_SIZEMax size of http request,the maximum value is 1GB1GB
ServerSESSION_NAMESPACEHttp cookies namespace key in cacheapitable
ServerSESSION_TIMEOUTHttp cookies survival time30d
ServerDEFAULT_LOCALEDefault server locale, support en-US/zh-CNen-US
ServerSERVER_DOMAINServer access address for all services, usually the ip address deployed by gateway services (like nginx,openresty, et), eg. http(s)://apitable.comhttp://127.0.0.1
ServerASSETS_LTD_URLThe variable is deprecated, use the new variable: ASSETS_URL.http://127.0.0.1
/assets
ServerASSETS_URLThe url of assets storage server like minio/s3 et, eg. http(s)://xxx.comhttp://127.0.0.1
/assets
ServerASSETS_LTD_BUCKETThe variable is deprecated, use the new variable: ASSETS_BUCKET.assets
ServerASSETS_BUCKETBucket name of assets storage. keep default value if not necessaryassets
DatabaseMYSQL_HOSTThe host for the mysql database127.0.0.1
DatabaseMYSQL_PORTThe port for the mysql database3306
DatabaseMYSQL_DATABASEThe db schema for the mysql databaseapitable
DatabaseMYSQL_USERNAMEThe user name for the mysql databaseapitable
DatabaseMYSQL_PASSWORDThe password for the mysql databaseapitable@com
Redis CacheREDIS_HOSTThe host for redis cache127.0.0.1
Redis CacheREDIS_USERNAMEThe username for redis cacheNULL
Redis CacheREDIS_PASSWORDThe password for redis cacheNULL
Redis CacheREDIS_PORTThe port for redis cache6379
Redis CacheREDIS_DBThe db index for redis cache0
MQRABBITMQ_HOSTThe host for rabbitmq server127.0.0.1
MQRABBITMQ_PORTThe port for rabbitmq server5672
MQRABBITMQ_USERNAMEThe username for rabbitmq serverapitable
MQRABBITMQ_PASSWORDThe password for rabbitmq serverapitable@com
MQRABBITMQ_VHOSTThe vhost path for rabbitmq server/
MailEMAIL_PERSONALEmail sign personal show in emailAPITable
MailMAIL_HOSTThe host for smtp serverNULL
MailMAIL_USERNAMEThe username for smtp server, usually email addressNULL
MailMAIL_PASSWORDThe password for smtp server, usually email passwordNULL
MailMAIL_PORTThe port for smtp server, 465 for production, 25 for development465
MailMAIL_SSL_ENABLEWhether mail ssl enabletrue
SocketSOCKET_URLConnect to room server for collaborating working by this properties, set this value in cluster mode, eg. http://room-server
http://127.0.0.1
SocketSOCKET_RECONNECTION_ATTEMPTSSet this value for attempting to reconnect socket times2
SocketSOCKET_RECONNECTION_DELAYTime delay to attempt reconnect socket, unit is seconds1000
SocketSOCKET_TIMEOUTTimeout to connect socket server, unit is seconds1000
StorageOSS_ENABLEDWhether to enable storage, usually opened for uploading attachment in datasheettrue
StorageOSS_CLIENT_TYPEWhich client sdk type you want to use, aws s3 sdk is best, keep default valueaws
StorageAWS_ACCESS_KEYAccess key of AWS S3NULL
StorageAWS_ACCESS_SECRETAccess secret of AWS S3NULL
StorageAWS_ENDPOINTEndpoint of AWS S3NULL
StorageAWS_REGIONRegion of AWS S3NULL
StorageQINIU_ACCESS_KEYAccess key of QINIU CloudNULL
StorageQINIU_SECRET_KEYSecret key of QINIU CloudNULL
StorageQINIU_REGIONRegion of QINIU CloudNULL
StorageQINIU_DOWNLOAD_DOMAINDownload domain of QINIU Cloud, optionalNULL
StorageQINIU_UPLOAD_URLUpload of QINIU Cloud, optionalNULL
StorageQINIU_CALLBACK_URLCallback url of QINIU Cloud, optionalNULL
StorageQINIU_CALLBACK_BODY_TYPECallback body type of QINIU Cloud, optionalNULL
StorageMINIO_ENDPOINTEndpoint of MinIONULL
StorageMINIO_ACCESS_KEYAccess key of MinIONULL
StorageMINIO_SECRET_KEYSecret key of MinIONULL
ReportSENTRY_DSNSentry organization DSN url, set this value to open sentry bug reportNULL
ReportENVSentry env, it depend on your environment, eg. development/test/productionNULL
ConnectSOCKET_DOMAINThe socket server address in cluster mode, eg. http://socket-server
/socket
http://127.0.0.1
/socket
ConnectNEST_GRPC_ADDRESSThe room server grpc service, eg. static://room-server
static://localhost
------------
AuthAUTH0_ENABLEDWhether enable auth0 connect, only for enterprisefalse
AuthAUTH0_CLIENT_IDAuth0 tenant application client id, only for enterpriseNULL
AuthAUTH0_CLIENT_SECRETAuth0 tenant application client secret, only for enterpriseNULL
AuthAUTH0_CLIENT_DOMAINAuth0 tenant client domain, only for enterpriseNULL
AuthAUTH0_CLIENT_ISSUER_URIAuth0 tenant client issuer url, only for enterpriseNULL
AuthAUTH0_REDIRECT_URIAuth0 tenant redirect uri, only for enterpriseNULL
AuthAUTH0_DB_CONNECTION_IDAuth0 tenant db connect id, only for enterpriseNULL
AuthAUTH0_DB_CONNECTION_NAMEAuth0 tenant db connect name, only for enterpriseNULL
GMSUPER_ADMINISTRATORSGM admin uuid ,eg: uuid1,uuid2,uuid3NULL
GMSKIP_GLOBAL_WIDGET_AUDITPublish global widget without audit. Enterprise Edition set to truefalse
EMBEDCOOKIES_SECUREcookies should be set to support HTTPS and true must be set for embedding cross-site loginfalse
EMBEDCOOKIES_SAME_SITESame-origin policy should be enabled and and None must be set for embedding cross-site loginNULL

init-db Environment Variable Table

Environment Variable NameDescriptionDefault ValueRequire
DB_HOSTthe host of mysql databaseNULLtrue
DB_PORTthe port of mysql databaseNULLtrue
DB_NAMEthe db schema name of mysql databaseNULLtrue
DB_USERNAMEthe username of mysql databaseNULLtrue
DB_PASSWORDthe password of mysql databaseNULLtrue
DATABASE_TABLE_PREFIXtable prefixapitable_true
ACTIONliquibase run actionupdatetrue
SUPER_ADMINISTRATORSGM admin uuid ,eg: uuid1,uuid2,uuid3NULL

room-server Environment Variable Table

Environment Variable NameDescriptionDefault Value
NODE_ENVEnvironment variable (development)development
PORT-3333
LOG_LEVELLogging leveldebug
DATABASE_TABLE_PREFIX-apitable_
MYSQL_CONNECTION_LIMIT-20
MYSQL_DATABASE-apitable
MYSQL_HOSTMySQL configuration127.0.0.1
MYSQL_KEEP_CONNECTION_ALIVE-true
MYSQL_PASSWORD-apitable@com
MYSQL_PORT-3306
MYSQL_RETRY_DELAY(in ms)300
MYSQL_USERNAME-root
REDIS_DBIf not configured, default is 03
REDIS_HOSTRedis configuration127.0.0.1
REDIS_PASSWORD-apitable@com
REDIS_PORT-6379
SOCKET_GRPC_URLSOCKET-server configuration0.0.0.0
BACKEND_BASE_URLBackend service addresshttp://localhost
/api/v1/
SERVER_MAX_FIELD_COUNT-200
SERVER_MAX_RECORD_COUNTmax RowsPer Sheet , The maximum value is 5000050000
SERVER_MAX_VIEW_COUNT-30
SERVER_RECORD_REMIND_RANGE-90
SERVER_TRANSFORM_LIMIT-100000
OSS_BUCKET-QNY1
OSS_CACHE_TYPE-
OSS_HOSTOSS configurationhttps://s1.vika.cn
OSS_MINIOMinio{ "endPoint": "", "port": 9000, "useSSL": true, "accessKey": "", "secretKey": "" }
OSS_MINIO_BUCKET_CACHE-{ "name": "api.cache" }
OSS_S3_BUCKET_CACHES3{ "name": "api.cache", "region": "cn-northwest-1" }
ROBOT_OFFICIAL_SERVICE_SLUGrobot type value (apitable or vika)apitable
ACTUATOR_DNS_URLHealth check configurationhttp://health-check-monitor.vika.cn
ACTUATOR_HEAP_RATIO-100
ACTUATOR_RSS_RATIO-90
LIMIT_DURATION-1
LIMIT_POINTSCurrent limit configuration5
LIMIT_WHITE_LIST-{ "test1": { "points": 5, "duration": 1}, "test2": {"points": 5, "duration": 1 } }
API_MAX_MODIFY_RECORD_COUNTSBest performance maximum of 10 records can be created/update/delete in a single request, The maximum recommended value is 50.10
ENABLE_OTEL_JAEGEREnable tracking service (self-hosted)false
OTEL_JAEGER_ENDPOINT-
OTEL_JAEGER_TRACE_ID_RATIO_BASEDInterval value (0 to 1)0.1
SENTRY_DSNSentryhttps://14aceedcbea54ef8ac7ee4d70525f530@sentry.apitable.com/
ENABLE_SOCKETenable socket module for collaboration
SHOW_ANONYMOUSBlock anonymous user avatars and nicknames in the upper right corner of the formfalse
NODE_MAX_EMBED_LINK_COUNTS30The number of join links for a single table is online, and the default is 30
SKIP_USAGE_VERIFICATIONWhen calling the Fusion API, do not count and verify the space station usagetrue
ENABLE_SCHEDUsed to activate the timed reminder notification for the "Date" fieldtrue
ENABLE_HOCUSPOCUSEnable document functionfalse

Web Server Environment Variable Table

CategoryEnvironment Variable NameDescriptionDefault Value
LimitVIEW_NAME_MAX_COUNTMaximum number of views for a datasheet50
LimitMAXIMUM_VIEW_COUNT_PER_DATASHEETMaximum number of of widgets30
LimitVIEW_NAME_MAX_COUNTMaximum length of view name50
UIFAVICONfaviconNULL
UILOGO_TEXT_DARKThe logo text displayed on the loading page in dark theme.
UILOGO_TEXT_LIGHTThe logo text displayed on the loading page in light theme.
LoginLOGIN_LOGOLogin page Logo URL
LoginLOGIN_MOTTOLogin Page Motto text
LoginLOGIN_SOCIAL_ICONS_DISABLELogin page social icons area
LoginAPITABLE_NAME<title> name, product name
UILOGIN_DEFAULT_ACCOUNT_TYPEDefault login methodmail
UIACCOUNT_LOGOUT_VISIBLEAllow login outtrue
UIACCOUNT_RESET_PASSWORD_VISIBLEAllow reset passwordtrue
UIROBOT_DEFAULT_AVATARRobot default avatarNULL
UIINVITATION_CODE_VISIBLEInvite code visible or notfalse
UIREGENERATE_API_TOKEN_VISIBLERecreate API Token Button visible or notfalse
ThemeSYSTEM_CONFIGURATION_DEFAULT_THEMEDefault themedark
LangSYSTEM_CONFIGURATION_DEFAULT_LANGUAGEDefaut languageen_US
StorageQNY1,QNY2,QNY3OSS bucket or storage urlassets
SentrySENTRY_CONFIG_DSNSentry DSNNULL
ProxyAPI_PROXYDefault http://backend-server:8081http://127.0.0.1
ProxyAPI_ROOM_SERVERNULL
ProxyAPI_BACKEND_SERVERDefault http://backend-server:8081NULL
ProxyAPI_FUSION_SERVERDefault http://127.0.0.1
NULL
ProxyAPI_SOCKET_SERVER_ROOMDefault http://127.0.0.1
NULL
SettingNEXT_PUBLIC_ASSET_PREFIXPublic static folder path""
SettingUSE_CUSTOM_PUBLIC_FILESNULL
SettingPUBLIC_URLNULL
AnalyticsGOOGLE_ANALYTICS_IDGoogle Analytics IDNULL
AnalyticsBAIDU_ANALYSE_IDBaidu Analytics IDNULL
SecurityCOOKIEBOT_IDCookiebot IDNull

init-appdata Environment Variable Table

Environment Variable NameDescriptionDefault ValueRequire
MYSQL_HOSTthe host of mysql database127.0.0.1true
MYSQL_PORTthe port of mysql database3306true
MYSQL_DATABASEthe db schema name of mysql databaseapitabletrue
MYSQL_USERNAMEthe username of mysql databaseroottrue
MYSQL_PASSWORDthe password of mysql databasepasswordtrue
DATABASE_TABLE_PREFIXtable prefixapitable_true
OSS_ENABLEDWhether to enable storage, usually opened for sync attachmentfalsetrue
AWS_ACCESS_KEYAccess key of AWS S3apitabletrue
AWS_ACCESS_SECRETAccess secret of AWS S3apitable@comtrue
AWS_ENDPOINTEndpoint of AWS S3http://minio
true
AWS_REGIONRegion of AWS S3us-east-1true
BUCKET_POLICYWhen specified bucket does not exist, it auto create bucket with this policy.NULLfalse
ASSETS_BUCKETBucket name of assets storage. keep default value if not necessaryassetstrue
SKIP_TEMPLATE_CENTER_LOADERSkip template center update.falsefalse
SKIP_TEMPLATE_CENTER_CONFIG_LOADERSkip template center config update.falsefalse
SKIP_WIDGET_CENTER_LOADERSkip widget center update.falsefalse
SKIP_AUTOMATION_LOADERSkip automation data update.falsefalse
SKIP_LAB_FEATURE_LOADERSkip lab feature update.falsefalse
SKIP_WIZARD_LOADERSkip wizard data update.falsefalse
INIT_TEST_ACCOUNT_ENABLEDWhether to create a virtual accountfalsefalse
INIT_TEST_USER_EMAIL_SUFFIXVirtual account email suffix@apitable.comfalse
INIT_CONFIG_SPACE_ENABLEDWhether to create a template central space stationfalsefalse

Conclusion

Environment variables are a powerful way to configure APITable to work with your specific use case. By setting the appropriate environment variables, you can customize the behavior of APITable and ensure that it works seamlessly with your existing infrastructure.

On this page