Command-Line Interface parameters

Required parameters

Only two parameters are required to start the server:

  1. SECRET - secret key, can be any long and hard-to-guess string
  2. REMARK_URL - URL pointing to your Remark42 server, i.e., https://demo.remark42.com

To let users sign in and comment, enable at least one authentication method, such as OAuth2, email (AUTH_EMAIL_ENABLE=true) or anonymous login (AUTH_ANON=true). OAuth2 is not required when using email or anonymous login.

A small docker-compose.yml with the required parameters and a few optional ones:

services:
  remark42:
    image: ghcr.io/umputun/remark42:latest
    restart: always
    container_name: "remark42"
    environment:
      - REMARK_URL=https://demo.remark42.com # URL pointing to your Remark42 server
      - SITE=YOUR_SITE_ID # site ID, same as used for `site_id`, see "Setup on your website"
      - SECRET=abcd-123456-xyz-$%^& # secret key
      - AUTH_ANON=true # enable anonymous commenting
      - AUTH_GITHUB_CID=12345667890 # OAuth2 client ID
      - AUTH_GITHUB_CSEC=abcdefg12345678 # OAuth2 client secret
    volumes:
      - ./var:/srv/var # persistent volume to store all Remark42 data

Complete parameters list

Command lineEnvironmentDefaultDescription
urlREMARK_URLURL to Remark42 server, required. Comments keep the image proxy addresses they were posted with, so after a change of its host the images proxied in earlier comments are no longer served
secretSECRETthe shared secret key used to sign JWT, should be a random, long, hard-to-guess string, required. With the default admin.type=shared it also keys the stored IP hashes and the IDs of anonymous users, so changing it signs everyone out, gives each anonymous user a new ID at the next sign-in and invalidates the unsubscribe and data deletion links already sent. Changing it also invalidates the image proxy URLs in webhook notifications already sent and in feeds already read
siteSITEremarksite name(s), multi
store.typeSTORE_TYPEbolttype of storage, bolt or rpc; an rpc store must keep premoderation holds, see Premoderation
store.bolt.pathSTORE_BOLT_PATH./varparent directory for the bolt files
store.bolt.timeoutSTORE_BOLT_TIMEOUT30sboltdb access timeout
store.rpc.apiSTORE_RPC_APIrpc extension api url
store.rpc.timeoutSTORE_RPC_TIMEOUT5shttp timeout
store.rpc.auth_userSTORE_RPC_AUTH_USERbasic auth user name
store.rpc.auth_passwdSTORE_RPC_AUTH_PASSWDbasic auth user password
admin.typeADMIN_TYPEsharedtype of admin store, shared or rpc
admin.rpc.apiADMIN_RPC_APIrpc extension api url
admin.rpc.timeoutADMIN_RPC_TIMEOUT5shttp timeout
admin.rpc.auth_userADMIN_RPC_AUTH_USERbasic auth user name
admin.rpc.auth_passwdADMIN_RPC_AUTH_PASSWDbasic auth user password
admin.rpc.secret_per_siteADMIN_RPC_SECRET_PER_SITEenable JWT secret retrieval per aud, which is site_id in this case
admin.shared.idADMIN_SHARED_IDadmin IDs (list of user IDs), multi
admin.shared.emailADMIN_SHARED_EMAILadmin@ + host of REMARK_URL, port includedadmin emails, multi. The first one is public (admin_email in /api/v1/config) and receives data deletion requests. With NOTIFY_ADMINS=email, all configured addresses receive admin notifications; the default is not used for those
backupBACKUP_PATH./var/backupbackups location
max-backMAX_BACKUP_FILES10max backup files to keep
cache.typeCACHE_TYPEmemtype of cache, redis_pub_sub or mem or none
cache.redis_addrCACHE_REDIS_ADDR127.0.0.1:6379address of Redis PubSub instance, turn redis_pub_sub cache on for distributed cache
cache.max.itemsCACHE_MAX_ITEMS1000max number of cached items, 0 - unlimited
cache.max.valueCACHE_MAX_VALUE0max size of the cached value, 0 - unlimited
cache.max.sizeCACHE_MAX_SIZE50000000max size of all cached values, 0 - unlimited
avatar.typeAVATAR_TYPEfstype of avatar storage, fs, bolt, or uri
avatar.fs.pathAVATAR_FS_PATH./var/avatarsavatars location for fs store
avatar.bolt.fileAVATAR_BOLT_FILE./var/avatars.dbavatars bolt file location
avatar.uriAVATAR_URI./var/avatarsavatars store URI
avatar.rsz-lmtAVATAR_RESIZE0 (disabled)max avatar width and height in pixels; larger avatars are scaled down on save, keeping the aspect ratio
image.typeIMAGE_TYPEfstype of image storage, fs, bolt or rpc
image.fs.pathIMAGE_FS_PATH./var/picturespermanent location of images
image.fs.stagingIMAGE_FS_STAGING./var/pictures.stagingstaging location of images
image.fs.partitionsIMAGE_FS_PARTITIONS100number of image partitions
image.bolt.fileIMAGE_BOLT_FILE./var/pictures.dbimages bolt file location
image.rpc.apiIMAGE_RPC_APIrpc extension api url
image.rpc.timeoutIMAGE_RPC_TIMEOUT5shttp timeout
image.rpc.auth_userIMAGE_RPC_AUTH_USERbasic auth user name
image.rpc.auth_passwdIMAGE_RPC_AUTH_PASSWDbasic auth user password
image.disableIMAGE_DISABLEfalsedisable image uploads and strip images from new and edited comments; see Disabling images for what it leaves alone
image.max-sizeIMAGE_MAX_SIZE5000000max size of image file
image.resize-widthIMAGE_RESIZE_WIDTH2400width of a resized image
image.resize-heightIMAGE_RESIZE_HEIGHT900height of a resized image
auth.ttl.jwtAUTH_TTL_JWT5mJWT TTL
auth.ttl.cookieAUTH_TTL_COOKIE200hTTL of the server-set auth cookie
auth.send-jwt-headerAUTH_SEND_JWT_HEADERfalsealso send the JWT in an X-JWT response header, which script can read; the server-set cookies are still sent. A widget embedded on another host keeps its session without it, in the cookies an https server sets for it. See security considerations.
auth.same-siteAUTH_SAME_SITEdefaultSameSite attribute for the server-set auth cookies (default, none, lax or strict). default emits no attribute at all and leaves the choice to the browser, which is not the same as lax
auth.apple.cidAUTH_APPLE_CIDApple client ID (App ID or Services ID)
auth.apple.tidAUTH_APPLE_TIDApple Team ID
auth.apple.kidAUTH_APPLE_KIDApple Private key ID
auth.apple.private-key-filepathAUTH_APPLE_PRIVATE_KEY_FILEPATH/srv/var/apple.p8Apple Private key file location
auth.google.cidAUTH_GOOGLE_CIDGoogle OAuth client ID
auth.google.csecAUTH_GOOGLE_CSECGoogle OAuth client secret
auth.facebook.cidAUTH_FACEBOOK_CIDFacebook OAuth client ID
auth.facebook.csecAUTH_FACEBOOK_CSECFacebook OAuth client secret
auth.microsoft.cidAUTH_MICROSOFT_CIDMicrosoft OAuth client ID
auth.microsoft.csecAUTH_MICROSOFT_CSECMicrosoft OAuth client secret
auth.microsoft.tenantAUTH_MICROSOFT_TENANTcommonAzure AD tenant ID, domain, or "common"
auth.github.cidAUTH_GITHUB_CIDGitHub OAuth client ID
auth.github.csecAUTH_GITHUB_CSECGitHub OAuth client secret
auth.twitter.cidAUTH_TWITTER_CIDX (Twitter) Consumer Key
auth.twitter.csecAUTH_TWITTER_CSECX (Twitter) Consumer Key Secret
auth.patreon.cidAUTH_PATREON_CIDPatreon OAuth Client ID
auth.patreon.csecAUTH_PATREON_CSECPatreon OAuth Client Secret
auth.discord.cidAUTH_DISCORD_CIDDiscord OAuth Client ID
auth.discord.csecAUTH_DISCORD_CSECDiscord OAuth Client Secret
auth.custom.nameAUTH_CUSTOM_NAMEcustom OAuth provider name (used in /auth/<name>/...)
auth.custom.cidAUTH_CUSTOM_CIDcustom OAuth client ID
auth.custom.csecAUTH_CUSTOM_CSECcustom OAuth client secret
auth.custom.auth-urlAUTH_CUSTOM_AUTH_URLcustom OAuth authorization endpoint
auth.custom.token-urlAUTH_CUSTOM_TOKEN_URLcustom OAuth token endpoint
auth.custom.info-urlAUTH_CUSTOM_INFO_URLcustom OAuth user info endpoint
auth.custom.scopesAUTH_CUSTOM_SCOPESnonecustom OAuth scopes, comma-separated
auth.custom.id-fieldAUTH_CUSTOM_ID_FIELDsubuser info field used as unique id; without a value in it the email identifies the user, and without both the sign-in is refused
auth.custom.name-fieldAUTH_CUSTOM_NAME_FIELDnameuser info field used as display name
auth.custom.picture-fieldAUTH_CUSTOM_PICTURE_FIELDpictureuser info field used as avatar URL
auth.custom.email-fieldAUTH_CUSTOM_EMAIL_FIELDemailuser info field holding the email, used only as a fallback id and for AUTH_CUSTOM_GRAVATAR
auth.custom.gravatarAUTH_CUSTOM_GRAVATARfalseuse the email's Gravatar picture when the custom provider returns no picture
auth.telegramAUTH_TELEGRAMfalseEnable Telegram auth (telegram.token must be present)
auth.yandex.cidAUTH_YANDEX_CIDYandex OAuth client ID
auth.yandex.csecAUTH_YANDEX_CSECYandex OAuth client secret
auth.devAUTH_DEVfalselocal OAuth2 server, development mode only
auth.anonAUTH_ANONfalseenable anonymous login
auth.email.enableAUTH_EMAIL_ENABLEfalseenable auth via email
auth.email.fromAUTH_EMAIL_FROMemail from, required to send email auth mail (e.g. john.doe@example.com or "John Doe"<john.doe@example.com>)
auth.email.subjAUTH_EMAIL_SUBJremark42 confirmationemail subject
auth.email.content-typeAUTH_EMAIL_CONTENT_TYPEtext/htmlemail content type
notify.usersNOTIFY_USERSnonetype of user notifications (telegram, email), multi
notify.adminsNOTIFY_ADMINSnonetype of admin notifications (telegram, slack, webhook and/or email), multi
notify.queueNOTIFY_QUEUE100size of notification queue
notify.telegram.chanNOTIFY_TELEGRAM_CHANthe ID of telegram channel for admin notifications
notify.slack.tokenNOTIFY_SLACK_TOKENSlack token
notify.slack.chanNOTIFY_SLACK_CHANgeneralSlack channel for admin notifications
notify.webhook.urlNOTIFY_WEBHOOK_URLWebhook notification URL for admin notifications
notify.webhook.templateNOTIFY_WEBHOOK_TEMPLATEsee WebHookWebhook payload template (Go text/template)
notify.webhook.headersNOTIFY_WEBHOOK_HEADERSHTTP headers in format Header1:Value1,Header2:Value2; the flag takes one Header:Value per use, multi
notify.webhook.timeoutNOTIFY_WEBHOOK_TIMEOUT5sWebhook connection timeout
notify.email.from_addressNOTIFY_EMAIL_FROMfrom email address, required to send email notifications (e.g. john.doe@example.com or "John Doe"<john.doe@example.com>)
notify.email.verification_subjNOTIFY_EMAIL_VERIFICATION_SUBJEmail verificationverification message subject
telegram.tokenTELEGRAM_TOKENTelegram token (used for auth and Telegram notifications)
telegram.timeoutTELEGRAM_TIMEOUT5sTelegram connection timeout
telegram.api-urlTELEGRAM_API_URLTelegram Bot API origin/base path for auth and notifications, without /bot; the bot token is appended to request paths, and the public API is used when unset
smtp.hostSMTP_HOSTSMTP host
smtp.portSMTP_PORT25SMTP port
smtp.helo_hostSMTP_HELO_HOSTSMTP HELO/EHLO hostname
smtp.usernameSMTP_USERNAMESMTP user name
smtp.passwordSMTP_PASSWORDSMTP password
smtp.login_authSMTP_LOGIN_AUTHfalseenable LOGIN auth instead of PLAIN
smtp.tlsSMTP_TLSfalseenable TLS for SMTP
smtp.starttlsSMTP_STARTTLSfalseenable StartTLS for SMTP
smtp.insecure_skip_verifySMTP_INSECURE_SKIP_VERIFYfalseskip certificate verification for SMTP
smtp.timeoutSMTP_TIMEOUT10sSMTP TCP connection timeout
ssl.typeSSL_TYPEnonenone-HTTP, static-HTTPS, auto-HTTPS + le
ssl.portSSL_PORT8443port for HTTPS server
ssl.certSSL_CERTpath to the cert.pem file
ssl.keySSL_KEYpath to the key.pem file
ssl.acme-locationSSL_ACME_LOCATION./var/acmedir where obtained le-certs will be stored
ssl.acme-emailSSL_ACME_EMAILadmin email for receiving notifications from LE; when unset, the first admin.shared.email with admin.type=shared, otherwise admin@ plus the host name of REMARK_URL
max-commentMAX_COMMENT_SIZE2048comment's size limit
min-commentMIN_COMMENT_SIZE0comment's minimal size limit, 0 - unlimited
max-votesMAX_VOTES-1votes limit per comment, -1 - unlimited, 0 - voting disabled
votes-ipVOTES_IPfalserestrict votes from the same IP; an IPv6 address counts as its /64 network
anon-voteANON_VOTEfalseallow voting for anonymous users, require VOTES_IP to be enabled as well
votes-ip-timeVOTES_IP_TIME5msame IP vote restriction time, 0s - unlimited. With votes-ip on, a new vote on a comment is refused while that IP has a vote record inside this time, whatever the direction, and a new IP hash record includes the voter's user ID; a user can still take their own vote back. Records older than this are removed on the comment's next accepted vote, also with votes-ip off
low-scoreLOW_SCORE-5low score threshold
critical-scoreCRITICAL_SCORE-10critical score threshold
positive-scorePOSITIVE_SCOREfalserestricts comment's score to be only positive
restricted-wordsRESTRICTED_WORDSwords banned in comments (can use *), matched against whole words, case-insensitively, up to 64 characters each, multi
restricted-words-fileRESTRICTED_WORDS_FILEfile with words banned in comments, one per line (can use *, lines starting with # are skipped), added to restricted-words and re-read when changed; a file that cannot be read at start stops the server
restricted-namesRESTRICTED_NAMESnames that anonymous users and non-admin email users cannot take, compared with the whole name case-insensitively; a user with such a name is blocked. Names from other sign-in methods are not checked, multi
edit-timeEDIT_TIME5mhow long the author can edit or delete a comment; 0 disables both, and staged image cleanup with them. Admins edit and delete their own comments at any time with ADMIN_EDIT
admin-editADMIN_EDITfalselet admins edit and delete their own comments at any time, EDIT_TIME=0 included
read-ageREADONLY_AGE0read-only age of comments, days
premoderationPREMODERATIONlinkshold comments for approval, see Premoderation. none approves every comment, all holds every comment, first holds a user's comments until one of them is approved, and links holds a comment that contains a link. Admins and verified users are never held
image-proxy.http2httpsIMAGE_PROXY_HTTP2HTTPSfalseenable HTTP->HTTPS proxy for images; has no effect when REMARK_URL is http
image-proxy.cache-externalIMAGE_PROXY_CACHE_EXTERNALfalseproxy external images, store the ones posted comments show
emojiEMOJIfalseenable emoji support; an emoji.json in the web root replaces the emoji table of both the comment form and the server
simple-viewSIMPLE_VIEWfalsesimplified comment form, without the formatting toolbar and preview
proxy-corsPROXY_CORSfalsedisable internal CORS and delegate it to proxy; the proxy has to cover /web/ as well as /api/, since a host page loads the widget scripts from there
allowed-hostsALLOWED_HOSTSenable allhosts allowed to embed comments, via CSP frame-ancestors, any host when empty, multi. Plain host entries, with the host of REMARK_URL, also limit the address a sign-in returns to; CSP keywords and entries with * do not count there. Page titles are fetched only from addresses on the listed domains and their subdomains and on the domain formed by the last two labels of the REMARK_URL host name and its subdomains; every redirect target is checked against the same domains
addressREMARK_ADDRESSall interfacesweb server listening address
portREMARK_PORT8080web server port
web-rootREMARK_WEB_ROOT./webweb server root, supplies the frontend when it exists
update-limitUPDATE_LIMIT0.5updates/sec limit
trusted-proxyTRUSTED_PROXYnone (trust any)reverse-proxy networks (CIDR/IP, comma-separated) trusted to set the client IP; see Trusted proxies and client IP
subscribers-onlySUBSCRIBERS_ONLYfalseenable commenting only for Patreon subscribers
disable-signatureDISABLE_SIGNATUREfalsedisable server signature in headers
disable-fancy-text-formattingDISABLE_FANCY_TEXT_FORMATTINGfalsedisable fancy comments text formatting (replacement of quotes, dashes, fractions, etc)
admin-passwdADMIN_PASSWDnone (disabled)password for admin basic auth
dbgDEBUGfalsedebug mode
  • command-line parameters are long-form --<key>=value, i.e., --url=https://demo.remark42.com
  • multi parameters separated by , in the environment or repeated with command-line keys, like --site=s1 --site=s2 ...
  • required parameters have to be presented in the environment or provided in the command-line

Custom OAuth2 integration

Custom OAuth2 integration currently supports only one custom provider at a time, and AUTH_CUSTOM_NAME must match ^[a-z0-9][a-z0-9_-]*$.

Security Considerations for auth.send-jwt-header

When auth.send-jwt-header=true is enabled:

  • Security Impact: the JWT is sent to the widget in a response header, where JavaScript can read it, and the widget keeps it in memory for as long as the page stays open
  • Vulnerability: This increases vulnerability to XSS attacks compared to a session kept only in server-set HttpOnly cookies
  • Implementation Mitigations:
    • The widget writes the token to no cookie and to no storage. The cookies that carry the session are the server's own, and the JWT cookie is HttpOnly
    • A widget served over https and embedded on a page of another site keeps its session in a pair of its own, __Host-JWT-EMBEDDED and __Host-XSRF-TOKEN-EMBEDDED, set as SameSite=None; Secure; Partitioned whether this setting is on or off. Partitioned keys the cookie to the embedding top-level site, so a different site gets a separate cookie and cannot reach this one. Pages and subdomains under that same site do share it, since the partition key is the site and not the page. No response served from that pair carries the X-JWT header; the sign-in that first sets it beside the ordinary pair may
    • Double Submit Cookie pattern with XSRF token matching the JWT ID

This configuration should only be used when:

  1. A client of yours needs the token in a response header; a widget embedded on another site does not
  2. You understand and accept the increased XSS risk
  3. You have implemented strong XSS protections on your site

Trusted proxies and client IP

Remark42 uses the client IP for five things: per-IP rate limiting, vote de-duplication when --votes-ip is enabled, the IP hash stored with every comment and every vote, the ID of anonymous users, and the IP hash in the request log. When Remark42 runs behind a reverse proxy (nginx, Reproxy, Traefik, Cloudflare, an ALB, a k8s ingress, …) the TCP connection it sees comes from the proxy, not the visitor, so the proxy forwards the real client IP in a header and Remark42 reads it to recover the real IP.

⚠️ Security note. Those headers can be set by any client. If Remark42 trusts them from everyone, a caller can send X-Real-IP: <anything> and rotate its apparent IP to bypass rate limiting and vote de-duplication. Use --trusted-proxy so Remark42 reads the forwarding headers only when the request actually arrives from your proxy.

--trusted-proxy / TRUSTED_PROXY takes a comma-separated list of networks (CIDR) or bare IPs. When set, the forwarding headers are honored only if the direct peer — the machine that opened the TCP connection to Remark42 — falls inside one of them; for a request from any other peer those headers are dropped and the real socket IP is used. When it is not set, the headers are trusted from any client (priority: X-Real-IP, then CF-Connecting-IP, then the leftmost public X-Forwarded-For entry): this preserves the historical behavior so existing deployments keep working, but leaves the bypass above open, and Remark42 prints a warning at startup. If Remark42 is reachable from the internet, set this.

From a trusted proxy, Remark42 takes the client IP from the first of these that applies:

  1. X-Real-IP, when it holds an IP address. It is used as sent, whether the address is public, private or inside --trusted-proxy.
  2. X-Forwarded-For, read from right to left. An entry inside --trusted-proxy is another proxy and is skipped; the first entry outside it is the client. If every entry is inside --trusted-proxy, the leftmost one is used. An empty or malformed entry met on the way ends the reading, and the address of the proxy that connected to Remark42 is used.
  3. The address of the proxy that connected to Remark42.

CF-Connecting-IP is not read from a trusted proxy.

Two conditions must both hold to be safe:

1. Trust the right peer. Point --trusted-proxy at the network your proxy connects from, and nothing wider.

2. Your proxy must set the IP itself. Trusting a proxy is not enough if the proxy relays what the client sent. Because Remark42 reads X-Real-IP first, the proxy must either set X-Real-IP to the real connecting client and overwrite any client value, or remove an X-Real-IP the client sent and append the real connecting client to X-Forwarded-For. A proxy that passes on the client's X-Real-IP, or that derives X-Real-IP from a client-controlled X-Forwarded-For, leaves the visitor in control of the reported IP even through a trusted proxy. A proxy that only appends to X-Forwarded-For (Traefik, cloud ALBs, k8s ingress, HAProxy) is safe only when it does not pass on the client's X-Real-IP, so check that for yours:

  • nginx — safe with the manual's proxy_set_header X-Real-IP $remote_addr; (overwrites any client value).
  • Reproxy — by default sets X-Real-IP to the address of the connection and overwrites any client value. Behind another proxy, set Reproxy's TRUSTED_PROXIES to that proxy's address and have the proxy append the client address to X-Forwarded-For, or every visitor arrives from the proxy's address.
  • Cloudflare — connecting to Remark42 directly, it removes X-Real-IP and appends the visitor's address to X-Forwarded-For, and that last entry is what Remark42 takes; CF-Connecting-IP is not read. Put Cloudflare's IP ranges in --trusted-proxy. With your own proxy between Cloudflare and Remark42, see "More than one proxy" below.

Recommended --trusted-proxy per deployment:

DeploymentDirect peer Remark42 sees--trusted-proxy
nginx in the same Docker Compose (the nginx manual)the proxy container's Docker IPthe Docker network, e.g. 172.16.0.0/12 (covers Docker's default bridge pool) — or pin your compose network's subnet
reverse proxy on the host / another machinethe proxy's host IPthat proxy's IP or CIDR, e.g. 10.0.0.5
Directly exposed, no proxythe real client IP already--trusted-proxy=127.0.0.1/32 — a value no client matches, so forwarding headers are always ignored and the real connecting IP is used

Examples:

# docker-compose: nginx on the same network
TRUSTED_PROXY=172.16.0.0/12

# a single upstream proxy
--trusted-proxy=10.0.0.5

# multiple ranges (v4 and v6)
TRUSTED_PROXY=10.0.0.0/8,fd00::/8

Caveats:

  • IPv6. CIDRs are matched by family — 172.16.0.0/12 (or 0.0.0.0/0) never matches an IPv6 peer. If your proxy reaches Remark42 over IPv6 (dual-stack / IPv6-enabled Docker), add the IPv6 network too, or every visitor collapses onto the proxy's IP and gets over-throttled.
  • Don't publish Remark42's own port when trusting a Docker range. If Remark42's port is exposed to the host, external traffic is SNAT'd to the Docker gateway (inside 172.16.0.0/12) and appears trusted — re-opening the bypass. Publish only the proxy.
  • 0.0.0.0/0 trusts everyone and re-opens the bypass; too narrow a range over-throttles real visitors. The request log holds only a hash of the client address, so look up the proxy's network on the proxy side, for example with docker network inspect <network> for Docker Compose.
  • More than one proxy. Unless the last proxy is set up to restore the visitor's address, its X-Real-IP holds the address it accepted the connection from. Behind a CDN, a load balancer or a tunnel such as cloudflared that is the front hop's address, often a single private one, and every visitor arriving through the same front hop shares one rate limit, the per-IP vote restriction of --votes-ip and, under the same name, one anonymous user ID. Either make the last proxy restore the visitor's address (nginx: set_real_ip_from and real_ip_header), or have it send no X-Real-IP and append to X-Forwarded-For, and add the addresses of the proxies in front of it to --trusted-proxy.
  • Trusted networks and X-Forwarded-For. When the client IP comes from X-Forwarded-For, every entry inside --trusted-proxy is taken for a proxy that reported its own client. If a visitor's connection reaches your proxy from such an address, the entry before it is used, and that entry the visitor can write. The Docker gateway is such an address when Docker itself relays the connection, as it does for IPv6 visitors while the Docker network has no IPv6. A proxy that sets X-Real-IP is not affected; for one that does not, put the proxy's own address in --trusted-proxy instead of the whole Docker network.
  • Private client addresses. From a trusted proxy, a private, shared (100.64.0.0/10), link-local or loopback address is used like any other, so visitors on an intranet or behind a VPN are told apart. Without --trusted-proxy such an address is skipped and the next header is tried.

Disabling images

--image.disable (IMAGE_DISABLE) keeps images posted from now on off the instance. It is a single setting for the whole instance: there is no per-site or per-user control, and uploads stay enabled unless you turn it on.

With it on:

  • Uploading an image is refused by the server (403), so a direct API call fails the same way the widget would.
  • Images are removed from new, previewed and edited comments, whether they were uploaded or linked from another site. The rest of the comment is posted. A comment holding nothing but images, on their own or inside other markup such as emphasis, a list, a heading or a quote, has nothing left to post and is rejected as invalid.
  • The comment form drops its image button and ignores images pasted or dropped into it.

What it does not do:

  • Existing comments keep their images. Comments posted before the setting was turned on are left as they are, and so are comments loaded by an import.
  • Images already uploaded stay in the image storage. Turning the setting on does not delete them.
  • The image proxy and cache are unchanged. --image-proxy.http2https and --image-proxy.cache-external still apply to images in comments that were posted earlier.
  • The markdown you typed is stored as typed. The rendered comment has no image, but the edit form still shows the markdown you wrote, image line included, and saving it again removes the image again.
  • The help page is generic. The markdown help page the form links to still describes image syntax, since it is a static page that does not know the setting.

Outbound proxy

Remark42 fetches pictures for the image proxy, page titles, the avatars of the custom OAuth2 provider and the photos of a Commento import from addresses that users supply, and refuses private and reserved addresses. For a request routed through HTTP_PROXY or HTTPS_PROXY, it checks the addresses its own resolver returns and then hands the host name to the proxy, which looks the name up again. A host name can answer with a public address to the first lookup and an internal one to the second, so the proxy has to refuse private and reserved destinations itself, after its own lookup, when it connects.

Deprecated parameters

The following list of command-line options is deprecated and might be removed in the next major release after the version they were deprecated. After the Remark42 version update, please check the startup log once for deprecation warning messages to avoid trouble with unrecognized command-line options in the future.

Deprecated options
Command lineReplacementEnvironmentReplacementDefaultDescriptionDeprecation version
auth.email.templatenoneAUTH_EMAIL_TEMPLATEnoneemail_confirmation_login.html.tmplcustom email message template file1.5.0
auth.email.hostsmtp.hostAUTH_EMAIL_HOSTSMTP_HOSTsmtp host1.5.0
auth.email.portsmtp.portAUTH_EMAIL_PORTSMTP_PORTsmtp port1.5.0
auth.email.usersmtp.usernameAUTH_EMAIL_USERSMTP_USERNAMEsmtp user name1.5.0
auth.email.passwdsmtp.passwordAUTH_EMAIL_PASSWDSMTP_PASSWORDsmtp password1.5.0
auth.email.tlssmtp.tlsAUTH_EMAIL_TLSSMTP_TLSfalseenable TLS1.5.0
auth.email.timeoutsmtp.timeoutAUTH_EMAIL_TIMEOUTSMTP_TIMEOUT10ssmtp timeout1.5.0
img-proxyimage-proxy.http2httpsIMG_PROXYIMAGE_PROXY_HTTP2HTTPSfalseenable HTTP->HTTPS proxy for images1.5.0
notify.typenotify.admins, notify.usersNOTIFY_TYPENOTIFY_ADMINS, NOTIFY_USERSold notification types: email becomes a user notification, telegram and slack admin ones; ignored when notify.users or notify.admins is set1.9.0
notify.email.notify_adminnotify.admins=emailNOTIFY_EMAIL_ADMINNOTIFY_ADMINS=email1.9.0
notify.telegram.tokentelegram.tokenNOTIFY_TELEGRAM_TOKENTELEGRAM_TOKENTelegram token1.9.0
notify.telegram.timeouttelegram.timeoutNOTIFY_TELEGRAM_TIMEOUTTELEGRAM_TIMEOUTTelegram timeout1.9.0
notify.telegram.apitelegram.api-urlNOTIFY_TELEGRAM_APITELEGRAM_API_URLhttps://api.telegram.org/botTelegram API prefix; used as telegram.api-url only when it ends in /bot and telegram.api-url is not set1.9.0

Admin users

Admins/moderators should be defined in docker-compose.yml as a list of user IDs or passed in the command line.

environment:
  - ADMIN_SHARED_ID=github_ef0f706a79cc24b17bbbb374cd234a691a034128,github_dae9983158e9e5e127ef2b87a411ef13c891e9e5

To get a user ID, sign in and click your name or the name of any other user you want to promote to admin. The profile panel that opens shows the full user ID under the name.

Docker image

Two parameters allow customizing the Docker container on the system level:

  • APP_UID - sets UID to run Remark42 application in container (default=1001)
  • TIME_ZONE - sets time zone of Remark42 container, would be used only on the backend as comments shown with user's timezone in the web interface (default=America/Chicago)

See umputun/baseimage for more details.