Skip to content

Environment Variables

Artalk supports configuration changes via environment variables, simplifying containerized cloud deployments such as Docker.

Environment variable names start with ATK_, in all uppercase, corresponding to each node in the configuration file.

Environment variables take precedence over configuration files. Verify if the configuration has taken effect using the following command:

bash
artalk config

To deploy Artalk using Docker Compose, add environment variables in the compose.yml file, for instance:

yaml
version: '3.8'
services:
  artalk:
    container_name: artalk
    image: artalk/artalk-go
    restart: unless-stopped
    ports:
      - 8080:23366
    volumes:
      - ./data:/data
    environment:
      - TZ=America/New_York
      - ATK_LOCALE=en
      - ATK_SITE_DEFAULT=Artalk's Blog
      - ATK_SITE_URL=https://example.com
      - ATK_TRUSTED_DOMAINS=https://dev.example.com https://localhost:8080
      - ATK_ADMIN_USERS_0_NAME=admin
      - ATK_ADMIN_USERS_0_EMAIL=admin@example.org
      - ATK_ADMIN_USERS_0_PASSWORD=(bcrypt)$2y$10$ti4vZYIrxVN8rLcYXVgXCO.GJND0dyI49r7IoF3xqIx8bBRmIBZRm
      - ATK_ADMIN_USERS_0_BADGE_NAME=Administrator
      - ATK_ADMIN_USERS_0_BADGE_COLOR=#0083FF

When the variable is an array, set array values using space-separated strings or numerical indices, for example:

ATK_TRUSTED_DOMAINS="https://a.com https://b.com"
ATK_TRUSTED_DOMAINS_0="https://a.com"

通用配置

环境变量默认值描述路径
ATK_APP_KEY""App Key (for generation of JWT)app_key (App Key)
ATK_DEBUGfalseDebug modedebug (Debug mode)
ATK_HOST"0.0.0.0"Listen hosthost (Listen host)
ATK_LOCALE"en"Language (follow Unicode BCP 47) (可选:["en", "zh-CN", "zh-TW", "ja", "fr", "ko", "ru"])locale (Language)
ATK_LOGIN_TIMEOUT259200Login timeout (in seconds)login_timeout (Login timeout)
ATK_PORT23366Listen portport (Listen port)
ATK_SITE_DEFAULT"Default Site"Default site name (create when app is first launched)site_default (Default site name)
ATK_SITE_URL""Default site urlsite_url (Default site url)
ATK_TIMEZONE"Asia/Shanghai"Timezone (follow IANA Time Zone Database)timezone (Timezone)
ATK_TRUSTED_DOMAINS[]Trusted domainstrusted_domains (Trusted domains)

Multi-Push

环境变量默认值描述路径
ATK_ADMIN_NOTIFY_BARK_ENABLEDfalse启用admin_notify.bark.enabled (Multi-Push > Bark > Enabled)
ATK_ADMIN_NOTIFY_BARK_SERVER"http://day.app/xxxxxxx/"Serveradmin_notify.bark.server (Multi-Push > Bark > Server)
ATK_ADMIN_NOTIFY_DING_TALK_ENABLEDfalse启用admin_notify.ding_talk.enabled (Multi-Push > DingTalk > Enabled)
ATK_ADMIN_NOTIFY_DING_TALK_SECRET""Secretadmin_notify.ding_talk.secret (Multi-Push > DingTalk > Secret)
ATK_ADMIN_NOTIFY_DING_TALK_TOKEN""Tokenadmin_notify.ding_talk.token (Multi-Push > DingTalk > Token)
ATK_ADMIN_NOTIFY_EMAIL_ENABLEDtrueEnable (can be disabled when using other push methods)admin_notify.email.enabled (Multi-Push > Notify admin > Enable)
ATK_ADMIN_NOTIFY_EMAIL_MAIL_SUBJECT"[] Post \"\" has new a comment"Email subject (email subject sent to admin)admin_notify.email.mail_subject (Multi-Push > Notify admin > Email subject)
ATK_ADMIN_NOTIFY_EMAIL_MAIL_TPL""Admin email template file (set to file path to use custom template)admin_notify.email.mail_tpl (Multi-Push > Notify admin > Admin email template file)
ATK_ADMIN_NOTIFY_LARK_ENABLEDfalse启用admin_notify.lark.enabled (Multi-Push > Lark > Enabled)
ATK_ADMIN_NOTIFY_LARK_MSG_TYPE"text"Message type (可选:["text", "card"])admin_notify.lark.msg_type (Multi-Push > Lark > Message type)
ATK_ADMIN_NOTIFY_LARK_WEBHOOK_URL""WebhookUrladmin_notify.lark.webhook_url (Multi-Push > Lark > WebhookUrl)
ATK_ADMIN_NOTIFY_LINE_CHANNEL_ACCESS_TOKEN""ChannelAccessTokenadmin_notify.line.channel_access_token (Multi-Push > LINE > ChannelAccessToken)
ATK_ADMIN_NOTIFY_LINE_CHANNEL_SECRET""ChannelSecretadmin_notify.line.channel_secret (Multi-Push > LINE > ChannelSecret)
ATK_ADMIN_NOTIFY_LINE_ENABLEDfalse启用admin_notify.line.enabled (Multi-Push > LINE > Enabled)
ATK_ADMIN_NOTIFY_LINE_RECEIVERS[USER_ID_1 GROUP_ID_1]Receiversadmin_notify.line.receivers (Multi-Push > LINE > Receivers)
ATK_ADMIN_NOTIFY_NOISE_MODEfalseNoise modeadmin_notify.noise_mode (Multi-Push > Noise mode)
ATK_ADMIN_NOTIFY_NOTIFY_PENDINGfalsePending comment still send notification (notifications are still sent when comments are intercepted)admin_notify.notify_pending (Multi-Push > Pending comment still send notification)
ATK_ADMIN_NOTIFY_NOTIFY_TPL"default"Notification template (set to file path to use custom template)admin_notify.notify_tpl (Multi-Push > Notification template)
ATK_ADMIN_NOTIFY_SLACK_ENABLEDfalse启用admin_notify.slack.enabled (Multi-Push > Slack > Enabled)
ATK_ADMIN_NOTIFY_SLACK_OAUTH_TOKEN""OauthTokenadmin_notify.slack.oauth_token (Multi-Push > Slack > OauthToken)
ATK_ADMIN_NOTIFY_SLACK_RECEIVERS[CHANNEL_ID]Receiversadmin_notify.slack.receivers (Multi-Push > Slack > Receivers)
ATK_ADMIN_NOTIFY_TELEGRAM_API_TOKEN""ApiTokenadmin_notify.telegram.api_token (Multi-Push > Telegram > ApiToken)
ATK_ADMIN_NOTIFY_TELEGRAM_ENABLEDfalse启用admin_notify.telegram.enabled (Multi-Push > Telegram > Enabled)
ATK_ADMIN_NOTIFY_TELEGRAM_RECEIVERS[7777777]Receiversadmin_notify.telegram.receivers (Multi-Push > Telegram > Receivers)
ATK_ADMIN_NOTIFY_WEBHOOK_ENABLEDfalse启用admin_notify.webhook.enabled (Multi-Push > WebHook > Enabled)
ATK_ADMIN_NOTIFY_WEBHOOK_URL""Urladmin_notify.webhook.url (Multi-Push > WebHook > Url)

Social Login

环境变量默认值描述路径
ATK_AUTH_ANONYMOUSfalseAllow anonymous commenting (Allow skipping verification, only fill in an anonymous nickname and email)auth.anonymous (Social Login > Allow anonymous commenting)
ATK_AUTH_APPLE_CLIENT_ID""ClientIdauth.apple.client_id (Social Login > Apple > ClientId)
ATK_AUTH_APPLE_CLIENT_SECRET""ClientSecretauth.apple.client_secret (Social Login > Apple > ClientSecret)
ATK_AUTH_APPLE_ENABLEDfalse启用auth.apple.enabled (Social Login > Apple > Enabled)
ATK_AUTH_AUTH0_CLIENT_ID""ClientIdauth.auth0.client_id (Social Login > Auth0 > ClientId)
ATK_AUTH_AUTH0_CLIENT_SECRET""ClientSecretauth.auth0.client_secret (Social Login > Auth0 > ClientSecret)
ATK_AUTH_AUTH0_DOMAIN""Domainauth.auth0.domain (Social Login > Auth0 > Domain)
ATK_AUTH_AUTH0_ENABLEDfalse启用auth.auth0.enabled (Social Login > Auth0 > Enabled)
ATK_AUTH_CALLBACK"http://localhost:23366/api/v2/auth/{provider}/callback"Callback URL (https://example.com/api/v2/auth/{provider}/callback)auth.callback (Social Login > Callback URL)
ATK_AUTH_DISCORD_CLIENT_ID""ClientIdauth.discord.client_id (Social Login > Discord > ClientId)
ATK_AUTH_DISCORD_CLIENT_SECRET""ClientSecretauth.discord.client_secret (Social Login > Discord > ClientSecret)
ATK_AUTH_DISCORD_ENABLEDfalse启用auth.discord.enabled (Social Login > Discord > Enabled)
ATK_AUTH_EMAIL_ENABLEDtrueEnable email password loginauth.email.enabled (Social Login > Email > Enable email password login)
ATK_AUTH_EMAIL_VERIFY_SUBJECT"Your Code - "Verification email subjectauth.email.verify_subject (Social Login > Email > Verification email subject)
ATK_AUTH_EMAIL_VERIFY_TPL"default"Verification email template (set to file path to use custom template)auth.email.verify_tpl (Social Login > Email > Verification email template)
ATK_AUTH_ENABLEDfalseEnable Social Loginauth.enabled (Social Login > Enable Social Login)
ATK_AUTH_FACEBOOK_CLIENT_ID""ClientIdauth.facebook.client_id (Social Login > Facebook > ClientId)
ATK_AUTH_FACEBOOK_CLIENT_SECRET""ClientSecretauth.facebook.client_secret (Social Login > Facebook > ClientSecret)
ATK_AUTH_FACEBOOK_ENABLEDfalse启用auth.facebook.enabled (Social Login > Facebook > Enabled)
ATK_AUTH_GITEA_CLIENT_ID""ClientIdauth.gitea.client_id (Social Login > Gitea > ClientId)
ATK_AUTH_GITEA_CLIENT_SECRET""ClientSecretauth.gitea.client_secret (Social Login > Gitea > ClientSecret)
ATK_AUTH_GITEA_ENABLEDfalse启用auth.gitea.enabled (Social Login > Gitea > Enabled)
ATK_AUTH_GITHUB_CLIENT_ID""ClientIdauth.github.client_id (Social Login > GitHub > ClientId)
ATK_AUTH_GITHUB_CLIENT_SECRET""ClientSecretauth.github.client_secret (Social Login > GitHub > ClientSecret)
ATK_AUTH_GITHUB_ENABLEDfalse启用auth.github.enabled (Social Login > GitHub > Enabled)
ATK_AUTH_GITLAB_CLIENT_ID""ClientIdauth.gitlab.client_id (Social Login > GitLab > ClientId)
ATK_AUTH_GITLAB_CLIENT_SECRET""ClientSecretauth.gitlab.client_secret (Social Login > GitLab > ClientSecret)
ATK_AUTH_GITLAB_ENABLEDfalse启用auth.gitlab.enabled (Social Login > GitLab > Enabled)
ATK_AUTH_GOOGLE_CLIENT_ID""ClientIdauth.google.client_id (Social Login > Google > ClientId)
ATK_AUTH_GOOGLE_CLIENT_SECRET""ClientSecretauth.google.client_secret (Social Login > Google > ClientSecret)
ATK_AUTH_GOOGLE_ENABLEDfalse启用auth.google.enabled (Social Login > Google > Enabled)
ATK_AUTH_LINE_CLIENT_ID""ClientIdauth.line.client_id (Social Login > Line > ClientId)
ATK_AUTH_LINE_CLIENT_SECRET""ClientSecretauth.line.client_secret (Social Login > Line > ClientSecret)
ATK_AUTH_LINE_ENABLEDfalse启用auth.line.enabled (Social Login > Line > Enabled)
ATK_AUTH_MASTODON_CLIENT_ID""ClientIdauth.mastodon.client_id (Social Login > Mastodon > ClientId)
ATK_AUTH_MASTODON_CLIENT_SECRET""ClientSecretauth.mastodon.client_secret (Social Login > Mastodon > ClientSecret)
ATK_AUTH_MASTODON_ENABLEDfalse启用auth.mastodon.enabled (Social Login > Mastodon > Enabled)
ATK_AUTH_MICROSOFT_CLIENT_ID""ClientIdauth.microsoft.client_id (Social Login > Microsoft > ClientId)
ATK_AUTH_MICROSOFT_CLIENT_SECRET""ClientSecretauth.microsoft.client_secret (Social Login > Microsoft > ClientSecret)
ATK_AUTH_MICROSOFT_ENABLEDfalse启用auth.microsoft.enabled (Social Login > Microsoft > Enabled)
ATK_AUTH_PATREON_CLIENT_ID""ClientIdauth.patreon.client_id (Social Login > Patreon > ClientId)
ATK_AUTH_PATREON_CLIENT_SECRET""ClientSecretauth.patreon.client_secret (Social Login > Patreon > ClientSecret)
ATK_AUTH_PATREON_ENABLEDfalse启用auth.patreon.enabled (Social Login > Patreon > Enabled)
ATK_AUTH_SLACK_CLIENT_ID""ClientIdauth.slack.client_id (Social Login > Slack > ClientId)
ATK_AUTH_SLACK_CLIENT_SECRET""ClientSecretauth.slack.client_secret (Social Login > Slack > ClientSecret)
ATK_AUTH_SLACK_ENABLEDfalse启用auth.slack.enabled (Social Login > Slack > Enabled)
ATK_AUTH_STEAM_API_KEY""ApiKeyauth.steam.api_key (Social Login > Steam > ApiKey)
ATK_AUTH_STEAM_ENABLEDfalse启用auth.steam.enabled (Social Login > Steam > Enabled)
ATK_AUTH_TIKTOK_CLIENT_ID""ClientIdauth.tiktok.client_id (Social Login > Tiktok > ClientId)
ATK_AUTH_TIKTOK_CLIENT_SECRET""ClientSecretauth.tiktok.client_secret (Social Login > Tiktok > ClientSecret)
ATK_AUTH_TIKTOK_ENABLEDfalse启用auth.tiktok.enabled (Social Login > Tiktok > Enabled)
ATK_AUTH_TWITTER_CLIENT_ID""ClientIdauth.twitter.client_id (Social Login > Twitter > ClientId)
ATK_AUTH_TWITTER_CLIENT_SECRET""ClientSecretauth.twitter.client_secret (Social Login > Twitter > ClientSecret)
ATK_AUTH_TWITTER_ENABLEDfalse启用auth.twitter.enabled (Social Login > Twitter > Enabled)
ATK_AUTH_WECHAT_CLIENT_ID""ClientIdauth.wechat.client_id (Social Login > WeChat > ClientId)
ATK_AUTH_WECHAT_CLIENT_SECRET""ClientSecretauth.wechat.client_secret (Social Login > WeChat > ClientSecret)
ATK_AUTH_WECHAT_ENABLEDfalse启用auth.wechat.enabled (Social Login > WeChat > Enabled)

Cache

环境变量默认值描述路径
ATK_CACHE_ENABLEDfalseEnable cachecache.enabled (Cache > Enable cache)
ATK_CACHE_EXPIRES30Cache expiration time (in minutes)cache.expires (Cache > Cache expiration time)
ATK_CACHE_REDIS_DB0Redis database number (e.g. 0)cache.redis.db (Cache > Redis config > Redis database number)
ATK_CACHE_REDIS_NETWORK"tcp"Connection type (可选:["tcp", "unix"])cache.redis.network (Cache > Redis config > Connection type)
ATK_CACHE_REDIS_PASSWORD""Redis passwordcache.redis.password (Cache > Redis config > Redis password)
ATK_CACHE_REDIS_USERNAME""Redis usernamecache.redis.username (Cache > Redis config > Redis username)
ATK_CACHE_SERVER""Cache server address (e.g. "localhost:6379")cache.server (Cache > Cache server address)
ATK_CACHE_TYPE"builtin"Cache type (可选:["redis", "memcache", "builtin"])cache.type (Cache > Cache type)
ATK_CACHE_WARM_UPfalseCache warm up (warm up cache when program starts)cache.warm_up (Cache > Cache warm up)

Captcha

环境变量默认值描述路径
ATK_CAPTCHA_ACTION_LIMIT3Action limit (the number of actions required to activate captcha)captcha.action_limit (Captcha > Action limit)
ATK_CAPTCHA_ACTION_RESET60Reset Timeout (timeout to reset action counter. unit: s, set to -1 to disable)captcha.action_reset (Captcha > Reset Timeout)
ATK_CAPTCHA_ALWAYSfalseCaptcha is required alwayscaptcha.always (Captcha > Captcha is required always)
ATK_CAPTCHA_CAPTCHA_TYPE"image"Captcha type (可选:["image", "turnstile", "recaptcha", "hcaptcha", "geetest"])captcha.captcha_type (Captcha > Captcha type)
ATK_CAPTCHA_ENABLEDtrueEnable captchacaptcha.enabled (Captcha > Enable captcha)
ATK_CAPTCHA_GEETEST_CAPTCHA_ID""CaptchaIdcaptcha.geetest.captcha_id (Captcha > Geetest > CaptchaId)
ATK_CAPTCHA_GEETEST_CAPTCHA_KEY""CaptchaKeycaptcha.geetest.captcha_key (Captcha > Geetest > CaptchaKey)
ATK_CAPTCHA_HCAPTCHA_SECRET_KEY""SecretKeycaptcha.hcaptcha.secret_key (Captcha > hCaptcha > SecretKey)
ATK_CAPTCHA_HCAPTCHA_SITE_KEY""SiteKeycaptcha.hcaptcha.site_key (Captcha > hCaptcha > SiteKey)
ATK_CAPTCHA_RECAPTCHA_SECRET_KEY""SecretKeycaptcha.recaptcha.secret_key (Captcha > reCaptcha > SecretKey)
ATK_CAPTCHA_RECAPTCHA_SITE_KEY""SiteKeycaptcha.recaptcha.site_key (Captcha > reCaptcha > SiteKey)
ATK_CAPTCHA_TURNSTILE_SECRET_KEY""SecretKeycaptcha.turnstile.secret_key (Captcha > Turnstile > SecretKey)
ATK_CAPTCHA_TURNSTILE_SITE_KEY""SiteKeycaptcha.turnstile.site_key (Captcha > Turnstile > SiteKey)

Database

环境变量默认值描述路径
ATK_DB_CHARSET"utf8mb4"Database charsetdb.charset (Database > Database charset)
ATK_DB_FILE"./data/artalk.db"Database file (only for SQLite)db.file (Database > Database file)
ATK_DB_HOST"localhost"Host addressdb.host (Database > Host address)
ATK_DB_NAME"artalk"Database namedb.name (Database > Database name)
ATK_DB_PASSWORD""Database passworddb.password (Database > Database password)
ATK_DB_PORT3306Host portdb.port (Database > Host port)
ATK_DB_PREPARE_STMTtruePrepared Statementdb.prepare_stmt (Database > Prepared Statement)
ATK_DB_SSLfalseEnable SSL modedb.ssl (Database > Enable SSL mode)
ATK_DB_TABLE_PREFIX""Table prefix (e.g. "atk_")db.table_prefix (Database > Table prefix)
ATK_DB_TYPE"sqlite"Database type (可选:["sqlite", "mysql", "pgsql", "mssql"])db.type (Database > Database type)
ATK_DB_USER"root"Database userdb.user (Database > Database user)

Email

环境变量默认值描述路径
ATK_EMAIL_ALI_DM_ACCESS_KEY_ID""AccessKeyIdemail.ali_dm.access_key_id (Email > Aliyun mail push > AccessKeyId)
ATK_EMAIL_ALI_DM_ACCESS_KEY_SECRET""AccessKeySecretemail.ali_dm.access_key_secret (Email > Aliyun mail push > AccessKeySecret)
ATK_EMAIL_ALI_DM_ACCOUNT_NAME"noreply@example.com"AccountNameemail.ali_dm.account_name (Email > Aliyun mail push > AccountName)
ATK_EMAIL_ENABLEDfalseEnable email notificationemail.enabled (Email > Enable email notification)
ATK_EMAIL_MAIL_SUBJECT"[] You got a reply from @"Email subjectemail.mail_subject (Email > Email subject)
ATK_EMAIL_MAIL_TPL"default"Email template file (set to file path to use custom template)email.mail_tpl (Email > Email template file)
ATK_EMAIL_SEND_ADDR"noreply@example.com"Email address of senderemail.send_addr (Email > Email address of sender)
ATK_EMAIL_SEND_NAME""Nick name of senderemail.send_name (Email > Nick name of sender)
ATK_EMAIL_SEND_TYPE"smtp"Send method (可选:["smtp", "ali_dm", "sendmail"])email.send_type (Email > Send method)
ATK_EMAIL_SMTP_HOST"smtp.qq.com"Email address of senderemail.smtp.host (Email > SMTP send > Email address of sender)
ATK_EMAIL_SMTP_PASSWORD""Passwordemail.smtp.password (Email > SMTP send > Password)
ATK_EMAIL_SMTP_PORT587Email portemail.smtp.port (Email > SMTP send > Email port)
ATK_EMAIL_SMTP_USERNAME"example@qq.com"Email address of senderemail.smtp.username (Email > SMTP send > Email address of sender)

UI Settings

环境变量默认值描述路径
ATK_FRONTEND_DARKMODE"inherit"Dark mode (可选:["inherit", "auto"])frontend.darkMode (UI Settings > Dark mode)
ATK_FRONTEND_EDITORTRAVELtrueMovable comment boxfrontend.editorTravel (UI Settings > Movable comment box)
ATK_FRONTEND_EMOTICONS"https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json"Emoticonsfrontend.emoticons (UI Settings > Emoticons)
ATK_FRONTEND_FLATMODE"auto"Flatten mode (可选:["auto", "true", "false"])frontend.flatMode (UI Settings > Flatten mode)
ATK_FRONTEND_GRAVATAR_MIRROR"https://www.gravatar.com/avatar/"API URLfrontend.gravatar.mirror (UI Settings > Gravatar > API URL)
ATK_FRONTEND_GRAVATAR_PARAMS"sha256=1&d=mp&s=240"API parametersfrontend.gravatar.params (UI Settings > Gravatar > API parameters)
ATK_FRONTEND_HEIGHTLIMIT_CHILDREN400Sub-comment area height limit (unit: px)frontend.heightLimit.children (UI Settings > Content height limit > Sub-comment area height limit)
ATK_FRONTEND_HEIGHTLIMIT_CONTENT300Comment content height limit (unit: px)frontend.heightLimit.content (UI Settings > Content height limit > Comment content height limit)
ATK_FRONTEND_HEIGHTLIMIT_SCROLLABLEfalseScrollable (scrollable height limit area)frontend.heightLimit.scrollable (UI Settings > Content height limit > Scrollable)
ATK_FRONTEND_IMGLAZYLOADfalseImage lazy load (可选:["false", "native", "data-src"])frontend.imgLazyLoad (UI Settings > Image lazy load)
ATK_FRONTEND_LISTSORTtrueComment sortingfrontend.listSort (UI Settings > Comment sorting)
ATK_FRONTEND_NESTMAX2Maximum nesting levelfrontend.nestMax (UI Settings > Maximum nesting level)
ATK_FRONTEND_NESTSORT"DATE_ASC"Nesting comment sorting rules (可选:["DATE_ASC", "DATE_DESC", "VOTE_UP_DESC"])frontend.nestSort (UI Settings > Nesting comment sorting rules)
ATK_FRONTEND_NOCOMMENT""Text to display when there isfrontend.noComment (UI Settings > Text to display when there is)
ATK_FRONTEND_PAGINATION_AUTOLOADtrueScroll loadingfrontend.pagination.autoLoad (UI Settings > Comment pagination > Scroll loading)
ATK_FRONTEND_PAGINATION_PAGESIZE20Number of comments per pagefrontend.pagination.pageSize (UI Settings > Comment pagination > Number of comments per page)
ATK_FRONTEND_PAGINATION_READMOREtrueLoad more mode (disabled to use pagination bar)frontend.pagination.readMore (UI Settings > Comment pagination > Load more mode)
ATK_FRONTEND_PLACEHOLDER""Comment box placeholderfrontend.placeholder (UI Settings > Comment box placeholder)
ATK_FRONTEND_PLUGINURLS[]Pluginsfrontend.pluginURLs (UI Settings > Plugins)
ATK_FRONTEND_PREVIEWtrueEditor real-time previewfrontend.preview (UI Settings > Editor real-time preview)
ATK_FRONTEND_REQTIMEOUT15000Request timeout (unit: ms)frontend.reqTimeout (UI Settings > Request timeout)
ATK_FRONTEND_SENDBTN""Text of the send buttonfrontend.sendBtn (UI Settings > Text of the send button)
ATK_FRONTEND_UABADGEfalseUser UA badgefrontend.uaBadge (UI Settings > User UA badge)
ATK_FRONTEND_VERSIONCHECKtrueVersion checkfrontend.versionCheck (UI Settings > Version check)
ATK_FRONTEND_VOTEtrueVote buttonfrontend.vote (UI Settings > Vote button)
ATK_FRONTEND_VOTEDOWNfalseDislike buttonfrontend.voteDown (UI Settings > Dislike button)

Web server

环境变量默认值描述路径
ATK_HTTP_BODY_LIMIT100Body size limit (unit: MB)http.body_limit (Web server > Body size limit)
ATK_HTTP_PROXY_HEADER""Proxy Header (fill X-Forwarded-For to get user real IP if behind a trusted reverse proxy or CDN)http.proxy_header (Web server > Proxy Header)

Upload

环境变量默认值描述路径
ATK_IMG_UPLOAD_ENABLEDtrueEnable image uploadimg_upload.enabled (Upload > Enable image upload)
ATK_IMG_UPLOAD_MAX_SIZE5Image size limit (unit: MB)img_upload.max_size (Upload > Image size limit)
ATK_IMG_UPLOAD_PATH"./data/artalk-img/"Image storageimg_upload.path (Upload > Image storage)
ATK_IMG_UPLOAD_PUBLIC_PATH<nil>Image link base path (default: "/static/images/")img_upload.public_path (Upload > Image link base path)
ATK_IMG_UPLOAD_UPGIT_DEL_LOCALtrueDelete local image after upload successimg_upload.upgit.del_local (Upload > Upgit config > Delete local image after upload success)
ATK_IMG_UPLOAD_UPGIT_ENABLEDfalseEnable Upgitimg_upload.upgit.enabled (Upload > Upgit config > Enable Upgit)
ATK_IMG_UPLOAD_UPGIT_EXEC"upgit -c UPGIT_CONF_FILE_PATH -t /artalk-img"Command line argumentsimg_upload.upgit.exec (Upload > Upgit config > Command line arguments)

Logging

环境变量默认值描述路径
ATK_LOG_ENABLEDtrueEnable logginglog.enabled (Logging > Enable logging)
ATK_LOG_FILENAME"./data/artalk.log"Log file pathlog.filename (Logging > Log file path)

Moderator

环境变量默认值描述路径
ATK_MODERATOR_AKISMET_KEY""Akismet Key (Akismet anti-spam service, https://akismet.com)moderator.akismet_key (Moderator > Akismet Key)
ATK_MODERATOR_ALIYUN_ACCESS_KEY_ID""AccessKeyIdmoderator.aliyun.access_key_id (Moderator > Aliyun Content Security > AccessKeyId)
ATK_MODERATOR_ALIYUN_ACCESS_KEY_SECRET""AccessKeySecretmoderator.aliyun.access_key_secret (Moderator > Aliyun Content Security > AccessKeySecret)
ATK_MODERATOR_ALIYUN_ENABLEDfalse启用moderator.aliyun.enabled (Moderator > Aliyun Content Security > Enabled)
ATK_MODERATOR_ALIYUN_REGION"cn-shanghai"Regionmoderator.aliyun.region (Moderator > Aliyun Content Security > Region)
ATK_MODERATOR_API_FAIL_BLOCKfalseBlock when API request fails (set to false to let comments pass when API request fails)moderator.api_fail_block (Moderator > Block when API request fails)
ATK_MODERATOR_KEYWORDS_ENABLEDfalseEnable keyword filtermoderator.keywords.enabled (Moderator > Keyword filter > Enable keyword filter)
ATK_MODERATOR_KEYWORDS_FILE_SEP"\n"FileSepmoderator.keywords.file_sep (Moderator > Keyword filter > FileSep)
ATK_MODERATOR_KEYWORDS_FILES[./data/keywords_1.txt]Dictionary file (support multiple dictionary files)moderator.keywords.files (Moderator > Keyword filter > Dictionary file)
ATK_MODERATOR_KEYWORDS_PENDINGfalseSet to pending when matchmoderator.keywords.pending (Moderator > Keyword filter > Set to pending when match)
ATK_MODERATOR_KEYWORDS_REPLACE_TO"x"ReplaceTomoderator.keywords.replace_to (Moderator > Keyword filter > ReplaceTo)
ATK_MODERATOR_PENDING_DEFAULTfalseDefault pending (new comments need to be approved by admin)moderator.pending_default (Moderator > Default pending)
ATK_MODERATOR_TENCENT_ENABLEDfalse启用moderator.tencent.enabled (Moderator > Tencent Cloud Content Security > Enabled)
ATK_MODERATOR_TENCENT_REGION"ap-guangzhou"Regionmoderator.tencent.region (Moderator > Tencent Cloud Content Security > Region)
ATK_MODERATOR_TENCENT_SECRET_ID""SecretIdmoderator.tencent.secret_id (Moderator > Tencent Cloud Content Security > SecretId)
ATK_MODERATOR_TENCENT_SECRET_KEY""SecretKeymoderator.tencent.secret_key (Moderator > Tencent Cloud Content Security > SecretKey)

SSL

环境变量默认值描述路径
ATK_SSL_CERT_PATH""Certificate file path (e.g. "/etc/letsencrypt/live/example.com/fullchain.pem")ssl.cert_path (SSL > Certificate file path)
ATK_SSL_ENABLEDfalseEnable SSLssl.enabled (SSL > Enable SSL)
ATK_SSL_KEY_PATH""Key file path (e.g. "/etc/letsencrypt/live/example.com/privkey.pem")ssl.key_path (SSL > Key file path)

Developers

Enable developer mode by setting ATK_DEBUG=1.

This document is auto-generated by the Artalk developer tool. Run make update-conf-docs to update this page's content based on the template configuration file (conf/artalk.example.zh-CN.yml).

Related code can be found in the @ArtalkJS/Artalk:/internal/config/ directory.