APITable Docs
配置管理

环境变量

维格表是一个功能强大的自托管可视化数据库/低代码工具,可以通过UI和API轻松创建、管理和操作无限的应用程序和解决方案。

为了自定义维格表的行为并将其配置为适合特定用例,您可以使用环境变量。

环境变量是一种在运行时向程序或脚本传递信息的方法。

它们通常在程序或脚本之外设置,并可用于配置软件的各个方面。

环境变量经常用于存储配置设置,例如API密钥、连接字符串和其他敏感信息。

维格表使用许多环境变量来配置其行为。

以下是可用环境变量及其说明的表格:

backend-server 环境变量说明

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 request1GB
ServerMAX_REQUEST_SIZEMax size of http request1GB
ServerSESSION_NAMESPACEHttp cookies namespace key in cacheapitable
ServerSESSION_TIMEOUTHttp cookies survival time30d
ServerDEFAULT_LOCALEDefault server locale, support en-US/zh-CN. After version 0.24.0, de-DE, es-ES, fr-FR, it-IT, ja-JP, ko-KR, ru-RU, zh-HK are supporteden-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
ServerINFOFLOW_PERMISSIONS_ENABLEDIt is used to enable the permission callback, after which the third-party system controls the user permissiontrue
ServerINFOFLOW_PERMISSIONS_SPACE_IDUsed to specify a space station callback permissionspaceIdA,spaceIdB
ServerCORS_ORIGINSAllows access to the source address of the current site, thereby avoiding browser cross-domain restrictions. Supports configuring multiple domain names, such as: https://abc.com, https://vika.cn, https://*.vika.cn*
ServerSPACE_STATISTICS_CACHE_HOURSSupport customizing cache for space statistics expiration time (in hours), with a default of 1 hour.1
ServerSMS_ENABLEDWhether to enable smsfalse
ServerSMS_LOCAL_TYPEDomestic SMS operator service provider, currently only supports tencenttencent
ServerSMS_TENCENT_APP_IDTencent Cloud SDK AppID
ServerSMS_TENCENT_APP_KEYTencent Cloud App Key
ServerSMS_TENCENT_SIGNTencent Cloud SMS signatureCloud
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
AuthONEACCESS_ENABLEDWhether enable oneaccess sso, only for enterprisefalse
AuthONEACCESS_IAM_HOSTOneaccess Iam server Hosthttp://127.0.0.1
AuthONEACCESS_CLIENT_IDClient application registration ID (provided by IAS). Reference document
AuthONEACCESS_CLIENT_SECRETClient application registration secret (provided by Oneaccess IAS) . Rerence document
AuthONEACCESS_ENCRYPT_KEYAES encryption key, default is 123456123456
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
ServerOTEL_JAEGER_ENABLEDEnable tracking service (self-hosted)false
ServerOTEL_JAEGER_ENDPOINTjaeger endpoint address,such as http://127.0.0.1:14250
ServerOTEL_JAEGER_TRACE_ID_RATIO_BASEDControl the sampling rate, you can set 0 ~ 11
ServerSEND_NOTIFICATIONWhether to send card notification messages when enterprise WeCom is integratedtrue
ServerEXPORT_MAX_FILE_SIZEControl the size of imported excel or csv files, the default is 20Mb20

init-db 环境变量说明

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

room-server/fusion-server 环境变量说明

Environment Variable NameDescriptionDefault Value
NODE_ENVEnvironment variable (development)development
PORT-3333
LOG_LEVELLogging leveldebug、error
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_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 } }
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

\n

Web Server 环境变量说明

CategoryEnvironment Variable NameDescriptionDefault Value
LimitVIEW_NAME_MAX_COUNTMaximum number of views NAME50
LimitMAXIMUM_VIEW_COUNT_PER_DATASHEETMaximum number of of widgets30
LimitMAXIMUM_FIELD_COUNT_PER_DATASHEETMaximum number of field200
UIFAVICONfaviconNULL
UILOGIN_DEFAULT_ACCOUNT_TYPEDefault login methodmail
UILOGIN_DEFAULT_VERIFY_TYPE非启动时的登录页,仅用于配置邀请成员页面进入的登录页Supported login verification types, verification code login is identify_code_login, password login is password_login,
支持的登录验证类型,验证码登录是 identify_code_login,密码登录是 password_login
password_login
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_SERVERDefault http://localhostNULL
ProxyAPI_BACKEND_SERVERDefault http://backend-server:8081NULL
ProxyAPI_FUSION_SERVERNULL
ProxyAPI_SOCKET_SERVER_ROOMNULL
SettingNEXT_PUBLIC_ASSET_PREFIXPublic static folder path""
SettingUSE_CUSTOM_PUBLIC_FILESNULL
SettingPUBLIC_URLNULL
SettingLOGIN_ON_AUTHORIZATION_REDIRECT_TO_URL
Login redirect address, it is recommended to set /login?reference= to specify third-party login
NULL
AnalyticsGOOGLE_ANALYTICS_IDGoogle Analytics IDNULL
AnalyticsBAIDU_ANALYSE_IDBaidu Analytics IDNULL
SecurityCOOKIEBOT_IDCookiebot IDNull

init-appdata 环境变量说明

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_LOADER执行init-appdata时,跳过覆盖模板中心falsefalse
SKIP_TEMPLATE_CENTER_CONFIG_LOADER执行init-appdata时,跳过覆盖模板中心配置falsefalse
SKIP_WIDGET_CENTER_LOADER执行init-appdata时,跳过覆盖小程序中心falsefalse
SKIP_AUTOMATION_LOADER执行init-appdata时,跳过覆盖机器人falsefalse
SKIP_LAB_FEATURE_LOADER执行init-appdata时,跳过覆盖实验性功能falsefalse
SKIP_WIZARD_LOADER执行init-appdata时,跳过覆盖新手引导falsefalse

总结

环境变量是配置维格表以适应您特定用例的强大方法。通过设置适当的环境变量,您可以自定义维格表的行为,并确保它与您现有的基础架构无缝配合工作。

On this page