Skip to Content
HelloBox docs
Self-hosting HelloBox

All settings

Every setting HelloBox reads, from the .env file next to compose.yml. This page is made from .env.example, so it always matches the version on GitHub. After you change .env, run docker compose up -d to apply it.

Required settings must be set. Leave an optional one empty to switch its feature off.

Core

APP_URL

Required. The public address of this instance, no trailing slash. Sign-in links, webhook URLs and emails all use it, so it has to be the address people type in a browser. Example: https://mail.example.com

In .env.example: APP_URL=http://127.0.0.1:3010

ENCRYPTION_KEY

Required. Encrypts provider keys and tokens in the database. Exactly 32 random bytes, base64. Make it once and keep it: lose it and every connection has to be set up again. Generate: openssl rand -base64 32

BETTER_AUTH_SECRET

Required. Signs sessions. Any long random string. Changing it signs everyone out. Generate: openssl rand -base64 32

SUPPORT_EMAIL

Optional. Who people write to about a suspended account. Empty tells them to ask whoever runs this instance. Example: [email protected]

Docker (docker/compose.yml only)

HELLOBOX_VERSION

Which release to run. Releases are named by date (YEAR.MONTH.N). Pin one for a server you care about, such as 2026.11.1, and change it to upgrade. latest follows the newest release.

In .env.example: HELLOBOX_VERSION=latest

POSTGRES_PASSWORD, REDIS_PASSWORD

Required. Passwords for the Postgres and Redis containers. Compose builds the DATABASE_URL and REDIS_URL for the app from them, so use letters and numbers only. Generate each: openssl rand -hex 24

COMPOSE_PROFILES

Optional. Starts the bundled object storage (see Storage below). Remove the line to use your own S3 instead.

In .env.example: COMPOSE_PROFILES=storage

WEB_PORT, STORAGE_PORT

Optional. Ports on this machine that your reverse proxy forwards to.

In .env.example: WEB_PORT=3000, STORAGE_PORT=9000

Database, queue and spam filter

DATABASE_URL

Required for development. With docker/compose.yml these three are set for you and these lines are ignored. Postgres connection URL. Example: postgres://user:password@host:5432/hellobox

In .env.example: DATABASE_URL=postgres://hellobox:[email protected]:5432/hellobox

REDIS_URL

Redis connection URL, for the job queue. Example: redis://:password@host:6379

In .env.example: REDIS_URL=redis://127.0.0.1:6379

RSPAMD_URL

rspamd's address, for spam checks. Example: http://rspamd:11333

In .env.example: RSPAMD_URL=http://127.0.0.1:11333

Storage

Where attachments and the raw copy of every message live. Required: set either the S3_* group or the R2_* group. If both are complete, S3_* is used.

S3_BUCKET

Any S3-compatible service: the bundled storage container, AWS S3, Backblaze B2, Wasabi... Bucket name. Example: hellobox

In .env.example: S3_BUCKET=hellobox

S3_ACCESS_KEY_ID

Access key. With the bundled storage you choose it: openssl rand -hex 12

S3_SECRET_ACCESS_KEY

Secret key. With the bundled storage you choose it: openssl rand -hex 24

S3_ENDPOINT

The service's address as this server reaches it. Empty for AWS S3. Example: http://storage:9000 (bundled), https://s3.us-west-004.backblazeb2.com

In .env.example: S3_ENDPOINT=http://storage:9000

S3_PUBLIC_ENDPOINT

The address browsers use for downloads and uploads. Required with the bundled storage, where it has to be reachable from the internet. Empty uses S3_ENDPOINT, which is right for hosted services. Example: https://files.example.com

S3_REGION

Optional. The service's region. Default us-east-1. Example: eu-west-1

S3_FORCE_PATH_STYLE

Optional. true puts the bucket in the path (host/bucket/key) instead of the host name (bucket.host/key). Default true when S3_ENDPOINT is set, false for AWS S3.

R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET

Cloudflare R2, the other way to set up storage. Used when the S3_* group is incomplete.

Email HelloBox sends itself

Sign-in verification links, password resets and invitations. Set either an SMTP server or a Resend API key. They are separate from the provider you connect for your own mail.

SMTP_URL

Required in production, unless people only sign in with Google or GitHub below. An SMTP server HelloBox sends through. smtp:// is port 587 with STARTTLS, smtps:// is port 465. Percent-encode special characters in the password (@ is %40). Wins over RESEND_API_KEY. Example: smtp://user:[email protected]:587

RESEND_API_KEY

The other way: a Resend API key with permission to send. Example: re_xxxxxxxx

EMAIL_FROM

Required with either of the above. The sender, on a domain that server may send from. Example: HelloBox <[email protected]>

REPLY_TO_DOMAIN

Optional. Where replies to those emails go: the sender's name on this domain, so [email protected] gets replies at [email protected]. Empty leaves replies to the sender.

Sign in with Google or GitHub

GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET

Optional. Each shows its button once both of its variables are set. The callback URLs are APP_URL/api/auth/callback/google and APP_URL/api/auth/callback/github.

Providers

Postmark and Mailgun need nothing here: you paste their keys in Settings.

RESEND_OAUTH_CLIENT_ID, RESEND_OAUTH_CLIENT_SECRET

Optional. Resend connects over OAuth, which needs an OAuth app registered with Resend. Without these, "Connect Resend" doesn't work.

AWS_BROKER_ACCOUNT_ID

Optional. Amazon SES connects through a role in each customer's AWS account that trusts an AWS account you run (the broker). Leave all empty to hide "Connect Amazon SES". The AWS account id of the broker, 12 digits.

AWS_BROKER_ACCESS_KEY_ID, AWS_BROKER_SECRET_ACCESS_KEY

An access key for the broker's IAM user.

AWS_BROKER_REGION

Optional. Default us-east-1.

AWS_TEMPLATES_BASE_URL

Where the CloudFormation templates for the customer's account are hosted, a public URL.

CF_CLIENT_ID, CF_CLIENT_SECRET

Optional. A Cloudflare OAuth client, so DNS records can be written to Cloudflare for you. Leave empty to hide it.

Sign-ups and admin

ALLOW_SIGNUPS

Optional. false closes registration: only the addresses in ADMIN_EMAILS and people with a workspace invitation can create an account. Anything else leaves sign-ups open.

ADMIN_EMAILS

Optional. Comma-separated emails that can sign in to the hellobox-admin tool. Empty turns the admin API off. Example: [email protected]

ADMIN_DIGEST_TIMEZONE

Optional. They also get an email at the end of each day that had signups, in this time zone (it needs SMTP_URL or RESEND_API_KEY above). Default UTC.

In .env.example: ADMIN_DIGEST_TIMEZONE=UTC

Notifications (Settings → Notifications)

Optional. Email notifications work without any of this. Each channel below shows up once its variables are set.

DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET

Discord "Connect" button: discord.com/developers/applications, OAuth2, no bot.

SLACK_CLIENT_ID, SLACK_CLIENT_SECRET

Slack "Add to Slack" button: api.slack.com/apps, scope incoming-webhook.

TELEGRAM_BOT_TOKEN, TELEGRAM_BOT_USERNAME

Telegram bot from @BotFather. The token goes on web and worker; the worker registers the webhook with Telegram, so APP_URL has to be public.

TELEGRAM_WEBHOOK_SECRET

Any random string. Telegram sends it back with each call. Generate: openssl rand -hex 16

VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY

Browser push. Generate once with bunx web-push generate-vapid-keys, and never rotate.

VAPID_SUBJECT

A mailto: or https: contact for the push service. Defaults to SUPPORT_EMAIL, then APP_URL.

NTFY_URL

An ntfy server for ntfy notifications. Example: https://ntfy.example.com

NTFY_TOKEN

The token of the ntfy user HelloBox publishes as. Worker only.

Something wrong or missing? Open an issue or edit the file in the repository.

On this page