Sure-AIO is a Unraid-first wrapper around upstream ghcr.io/we-promise/sure. The wrapper is expected to track upstream self-hosting features closely, but it still adds its own operational opinionation around internal Postgres, Redis, and Unraid-facing defaults. This guide explains how to use the Advanced template fields without pretending the wrapper is magic.
If you already run a heavy-duty PostgreSQL/Redis container (like postgres-shared) and want Sure to use it instead of its own internal isolated database:
- Create a database (e.g.
sure_app) and user on your external Postgres container. - In the Sure-AIO template, toggle Show more settings....
- Find the [External DB] block.
- Input your
DB Host Override(e.g.192.168.1.50, or the Unraid docker network hostname if you run them on a custom net). - Input the
DB UserandDB Passwordoverrides. - Input the
Redis URL Override(e.g.redis://192.168.1.50:6379/1). - Result: The AIO container will still boot its internal services silently, but the Rails UI, Sidekiq workers, and first-boot database preparation will honor your external overrides instead of the built-in defaults.
Sure uses AI to auto-categorize transactions and answer questions.
To process your finances locally without sending data to the cloud:
- Find the [AI] block.
- OpenAI / Ollama Token: Enter
ollama-local(bypasses validation). - OpenAI URI Base: Enter your Ollama IP:
http://192.168.1.X:11434/v1 - Model Name: Enter a local model you have pulled (e.g.,
llama3.1:8b).
To handle chat entirely inside an external AI agent rather than the basic Sure UI:
- Find the [Ext. AI] block.
- Assistant Type: Set to
external(forces all users to use the remote agent). - Assistant URL: e.g.,
http://192.168.1.X:18789/v1/chat/completions(OpenClaw completions endpoint). - Assistant Token: Your gateway token.
- Agent ID: Optional if your provider exposes multiple agents.
- Session Key: Optional stable conversation key for providers that keep remote session state.
- Allowed Emails: Optional comma-separated allowlist to restrict who can use the external assistant.
- MCP User Email: The email of the Sure user the agent will act as.
- MCP API Token: Create a secure password. The external agent uses this to securely callback into Sure to read transaction data.
Sure allows chatting with uploaded financial PDFs and other indexed documents. For the exact Sure-AIO pgvector behavior, including the default "installed but not enabled" model and the external PostgreSQL limitation, see docs/pgvector.md.
- Find the [AI] Vector Store Provider field.
- Set it to
pgvectorto keep vectors inside the bundled internal PostgreSQL service, orqdrantif you want an external Qdrant instance. - For
pgvector, set:EMBEDDING_MODELsuch asnomic-embed-textEMBEDDING_DIMENSIONSto match the model output, usually1024EMBEDDING_URI_BASEif your embedding endpoint differs fromOPENAI_URI_BASEEMBEDDING_ACCESS_TOKENif your embedding endpoint needs a different token thanOPENAI_ACCESS_TOKEN
- For
qdrant, also provideQDRANT_URLandQDRANT_API_KEYif needed. - If you use Ollama for embeddings, make sure the embedding model is actually pulled and available. Exposing the vars is not enough if the model is missing.
- If you want verbose AI troubleshooting in the container logs, set [AI] Debug Logging to
true. - If your OpenAI-compatible endpoint does not support PDF or vision input, set [AI] Enable PDF Processing to
falseso Sure does not try to send PDF workloads to a provider that cannot handle them.
Track LLM inference costs and app usage.
- Find the [Telemetry] block.
- PostHog: Fill in your
POSTHOG_KEYandHOSTto track user analytics. - Langfuse: Fill in your
LANGFUSE_HOST,PUBLIC_KEY, andSECRET_KEYto chart token usage, latency, and costs of your AI operations. - If you use hosted Langfuse and prefer a region shortcut instead of a full host URL, set
LANGFUSE_REGIONtousoreu. IfLANGFUSE_HOSTis set, it wins over the region shortcut. - Skylight APM:
SKYLIGHT_ENABLEDdefaults tofalsein this AIO wrapper (image default + template field) so users do not need any extra external service for normal operation. If you explicitly want Skylight, setSKYLIGHT_ENABLED=trueand provideSKYLIGHT_AUTHENTICATIONfrom your Skylight app settings.
Avoid filling your Unraid cache drive by piping PDFs/receipts straight to object storage.
- Find the [Storage] block.
- Provider Strategy: Change from blank to
amazon,cloudflare, orgeneric_s3. - Provide your
Access Key ID,Secret Access Key,Region, andBucket Name. - If using TrueNAS Minio or similar, provide the
Custom Endpoint(Generic S3 only).
Sure relies on upstream providers for currency exchange rates and stock logos.
- Free (Default): If you leave provider overrides blank, upstream Sure defaults to
yahoo_financefor first-boot friendliness. - Paid API Keys (Optional): If you prefer Twelve Data, add your API key and change [API] Exchange Rate Provider and [API] Securities Provider to
twelve_data. - Logos: Provide a [API] Brandfetch Client ID to automatically scrape high-res logos for your bank names and merchants.
- High-res logos: Set
BRAND_FETCH_HIGH_RES_LOGOS=trueif you want Sure to prefer larger Brandfetch logo assets where available. - Indexa token path: If you use Indexa Capital and want a single global token fallback, set
INDEXA_API_TOKEN. - Important override behavior: Upstream only locks matching settings UI controls when the related env var is present. Leaving provider/logo env fields blank keeps the UI controls interactive.
- Advanced provider tuning: The template also exposes
TWELVE_DATA_URL,YAHOO_FINANCE_URL,YAHOO_FINANCE_MAX_RETRIES,YAHOO_FINANCE_RETRY_INTERVAL, andYAHOO_FINANCE_MIN_REQUEST_INTERVALif you need proxying or retry tuning.
To enable Single Sign-On (SSO):
- Find the [Auth] block.
- Provide your
OIDC Client ID,Client Secret,Issuer URL, and theRedirect URIyou configured in your Identity Provider. - If you want tighter onboarding control, set:
AUTH_LOCAL_LOGIN_ENABLED=falseto make the instance SSO-firstAUTH_LOCAL_ADMIN_OVERRIDE_ENABLED=trueif you still want a super-admin emergency login pathAUTH_JIT_MODE=link_onlyif SSO should only link to existing users rather than auto-create themALLOWED_OIDC_DOMAINSto restrict which email domains may auto-create accounts through JIT SSO
- Optional button labels/icons are exposed too, along with dedicated Google and GitHub OAuth client fields if you want those providers separately.
- The template now also exposes
AUTH_PROVIDERS_SOURCEplus named multi-provider envs likeOIDC_KEYCLOAK_*andOIDC_AUTHENTIK_*if you want upstream's YAML-based or database-backed multi-provider SSO model. - Upstream also uses
APP_URLfor advanced auth flows, especially absolute callback and issuer generation. If you are doing advanced auth beyond the normal generic OIDC path, setAPP_URLto your full external base URL such ashttps://finance.example.com.
- Find the [Email] block.
- Fill out standard credentials:
SMTP Address,Port,Username,Password. - Provide the
Sender Address(e.g.,no-reply@finance.yourdomain.com).
By default, Sure derives your database encryption keys securely from your Secret Key Base.
If you are a cryptography purist who wants to separate these:
- Find the [DB Encryption] block.
- Manually define your
Primary Key,Deterministic Key, andDerivation Salt. (Warning: Losing these means permanently losing access to your encrypted data).
For a normal beginner install on your LAN, leave the SSL options at:
RAILS_FORCE_SSL=falseRAILS_ASSUME_SSL=false
If you later place Sure behind Nginx Proxy Manager, Traefik, Caddy, Cloudflare Tunnel, or another SSL-terminating reverse proxy:
- Set
RAILS_ASSUME_SSL=true - Set
RAILS_FORCE_SSL=trueonly if you want plain HTTP requests redirected to HTTPS - Set
APP_DOMAINto the hostname you actually use for email links and callbacks - If advanced auth or metadata generation expects a full URL, also set
APP_URLto the full external base URL
If your OIDC provider, MinIO endpoint, Qdrant node, or another upstream integration uses a private CA:
- Use the optional [SSL] Custom CA Certificate Mount field to bind your CA PEM file into the container.
- Set [SSL] Custom CA File to the in-container path, for example
/certs/custom-ca.pem. - Leave [SSL] Verify Remote Certificates at
truefor normal operation. - Set [SSL] Debug Logging to
trueonly while troubleshooting certificate trust issues. - Only set
SSL_VERIFY=falseas a temporary test. It weakens outbound TLS validation globally inside the app process.
This matters more than it sounds. Upstream applies this CA bundle globally so OIDC discovery, webhook callbacks, object storage, and other HTTPS clients all trust the same internal CA.
The template now exposes the real upstream storage split instead of pretending all S3-style providers use the same env names.
- For Amazon S3, use the [Storage:AWS] fields.
- For Cloudflare R2, use the [Storage:R2] fields, including
CLOUDFLARE_ACCOUNT_ID. - For MinIO or other S3-compatible endpoints, use the [Storage:Generic S3] fields.
- Only set Force Path Style to
truewhen your provider actually requires path-style S3 requests.
For normal AIO installs, leave Redis internal. If you already run a real HA Redis stack:
- Fill [External Redis] Sentinel Hosts with a comma-separated list like
redis-sentinel-1:26379,redis-sentinel-2:26379. - Set [External Redis] Sentinel Master if your master name is not
mymaster. - Add username/password only if your Sentinel deployment requires them.
- Sentinel settings take precedence over
REDIS_URLwhen both are present.
For most Unraid installs, plain container logs are enough. If you want centralized production logging:
- Set [Telemetry] Rails Log Level to
debugtemporarily when troubleshooting application behavior. - Add [Telemetry] Logtail API Key and [Telemetry] Logtail Ingest Host if you want Sure logs forwarded to Better Stack Logtail.
- Leave those fields blank for the normal beginner path. Shipping logs externally is optional and not part of the default AIO experience.
The template now exposes the main upstream runtime toggles that were previously only obvious in docs or code:
- Sync scheduling
AUTO_SYNC_ENABLEDAUTO_SYNC_TIMEAUTO_SYNC_TIMEZONE
- Pending transaction behavior
SIMPLEFIN_INCLUDE_PENDINGPLAID_INCLUDE_PENDINGLUNCHFLOW_INCLUDE_PENDINGSIMPLEFIN_DEBUG_RAWLUNCHFLOW_DEBUG_RAWSIMPLEFIN_CC_OVERPAYMENT_HEURISTIC- Just like provider selection, these env overrides lock the matching Sync control in Sure's UI when set.
- Plaid credentials
PLAID_CLIENT_IDPLAID_SECRETPLAID_ENVPLAID_EU_CLIENT_IDPLAID_EU_SECRETPLAID_EU_ENV
- OpenAI compatibility tuning
OPENAI_REQUEST_TIMEOUTLLM_JSON_MODECATEGORIZATION_PROVIDER/CATEGORIZATION_MODELCHAT_PROVIDER/CHAT_MODEL
- Auth and onboarding behavior
REQUIRE_EMAIL_CONFIRMATIONREQUIRE_INVITE_CODEAUTH_PROVIDERS_SOURCE
- Database and SSL edge cases
POSTGRES_DBSSL_CERT_FILESELF_HOSTING_ENABLED(legacy alias; keepSELF_HOSTED=trueas the main switch)
- Runtime/process tuning
RAILS_MAX_THREADSWEB_CONCURRENCYSIDEKIQ_WEB_USERNAMESIDEKIQ_WEB_PASSWORD
- Advanced outbound networking
HTTPS_PROXYHTTP_PROXYNO_PROXY
These are all legitimate upstream runtime knobs, but not all of them belong in a beginner walkthrough. They are here because sure-aio should expose the real self-hosting surface without forcing users to rebuild the image just to reach it.
Upstream v0.6.9 is supposed to disable subscription and trial gating in self-hosted mode when SELF_HOSTED=true. The 45-day trial logic still exists in the codebase, but upstream guards it behind app_mode != self_hosted.
That means if you see a trial banner or upgrade flow on a self-hosted Sure-AIO install, the likely causes are:
- The running container is not actually seeing
SELF_HOSTED=true. - Existing app state was created before self-hosted mode was applied.
- There is an upstream bug in a specific onboarding or UI path.
It is not caused by missing Stripe billing envs in this wrapper. Those Stripe envs exist upstream for managed billing flows, but upstream self-hosted mode is designed to bypass them.