Voux

Environment Variables

Configure Voux using the .env file.


Overview

Voux is configured using environment variables defined in the .env file.

Some options can be changed later from /settings, while others are only read when the server starts.

Admin account

NameDefaultWhat it does
ADMIN_USERNAMEadminUsername for the first admin account.
ADMIN_PASSWORDchange-this-passwordPassword for the first admin account.

Instance settings

NameDefaultWhat it does
PORT8787The web server port number.
PUBLIC_BASE_URLbased on requestLets you set a fixed site URL (like https://counter.yourdomain.com).
TRUST_PROXY1Controls how Voux detects the real visitor IP when something is in front of it (like a proxy or tunnel). This matters for unique counters and rate limits.

Use 1 if Voux is behind something like Nginx, Caddy, Cloudflare Tunnel, or another proxy.

Use false if Voux is exposed directly to the internet (for example http://server-ip:8787 with nothing in front).

loopback is only for special setups where a proxy on the same machine forwards traffic through localhost.

Most users will only need 1 or false.
PRIVATE_MODEfalseIf true, only users can create new counters.
ADMIN_PAGE_SIZE5How many counters show on each page in the admin panel.
USERS_PAGE_SIZE4How many users show on each page in the users list.
SHOW_PUBLIC_GUIDEStrueControls if public guide cards are shown on the main page.
DEFAULT_ALLOWED_MODESunique,unlimitedComma-separated list of modes to allow (unique, unlimited) for counters.
COUNTER_CREATE_LIMIT5How many counters a single IP can create before hitting the one-minute cooldown.
COUNTER_CREATE_WINDOW_MS60000Window length (in ms) for the above limit. Leave it alone unless you need a different window.
INACTIVE_DAYS_THRESHOLD30Days with no hits before a counter shows an "Inactive" badge in the dashboard.
BRAND_NAMEVouxDefault display name (used in titles and hero text).
HOME_TITLEVoux · Simple Free & Open Source Hit CounterThe homepage <title> tag value.
UNLIMITED_THROTTLE_SECONDS0Seconds to wait before counting the same IP again in "Every visit" mode. 0 disables throttling.

Backups

NameDefaultWhat it does
BACKUP_DIR./data/backupsFolder where .db backups are stored.
AUTO_BACKUP_FREQUENCYoffHow often backups run (off, daily, or weekly).
AUTO_BACKUP_TIME03:00Time of day when automatic backups run (24h format).
AUTO_BACKUP_WEEKDAY0Day of the week for weekly backups (0 = Sunday).
AUTO_BACKUP_RETENTION7How many backup files to keep before older ones are deleted.
AUTO_BACKUP_INCLUDE_JSONfalseIf true, JSON exports are included when creating automatic backups.

Counter creation tracker (advanced)

NameDefaultWhat it does
COUNTER_CREATE_TRACKER_IDLE_TTL_MS900000How long (in ms) inactive IP entries stay in memory before being removed.
COUNTER_CREATE_TRACKER_CLEANUP_INTERVAL_MS60000How often (in ms) the counter creation tracker runs cleanup.
COUNTER_CREATE_TRACKER_MAX_ENTRIES20000Maximum number of tracked IP entries for counter creation.
COUNTER_CREATE_TRACKER_EVICT_PERCENT0.1Percentage of entries removed when the tracker reaches its limit.

Login rate limiter (advanced)

NameDefaultWhat it does
LOGIN_LIMITER_IDLE_TTL_MS1800000How long (in ms) inactive login attempts stay tracked before being removed.
LOGIN_LIMITER_CLEANUP_INTERVAL_MS60000How often (in ms) the login limiter runs cleanup.
LOGIN_LIMITER_MAX_ENTRIES20000Maximum number of tracked login entries in memory.
LOGIN_LIMITER_EVICT_PERCENT0.1Percentage of login entries removed when the limiter reaches its limit.

Development

NameDefaultWhat it does
DEV_MODEdevelopmentUse development in .env to serve HTML/JS/CSS with no-store caching.

 

Edit on GitHub

Last updated on