Skip to content

Instance settings

Instance settings override environment variables at runtime — things like app name, ToS URL, privacy policy URL, and logo. Settings stored here take precedence over their env var equivalents. All endpoints require the settings:manage permission.

const TOKEN = "hv_..."; // your API key
const headers = { Authorization: `Bearer ${TOKEN}` };
GET /admin/settings
const response = await fetch("http://127.0.0.1:3000/admin/settings", {
headers,
});
const data = await response.json();

Response: 200 OK

[
{ "key": "app_name", "value": "My HappyView", "source": "database" }
]

Stored values come first, sorted by key. They are followed by values from the environment or happyview.toml for keys with no stored value. source is database, env or project.

KeyEnv varDefaultDescription
app_nameAPP_NAME---Application name shown in sidebar and OAuth consent screen
client_uriCLIENT_URI---Public URL for this instance, linked from OAuth consent screen
logo_uriLOGO_URI---External URL to a logo image
tos_uriTOS_URI---Link to terms of service
policy_uriPOLICY_URI---Link to privacy policy
backfill_concurrent_pdsBACKFILL_CONCURRENT_PDS10How many PDS servers to fetch from simultaneously during backfill
backfill_concurrent_dids_per_pdsBACKFILL_CONCURRENT_DIDS_PER_PDS3How many repos to fetch concurrently from each PDS
backfill_concurrent_resolutionBACKFILL_CONCURRENT_RESOLUTION100How many DID document lookups to run in parallel during PDS resolution
backfill_retention_daysBACKFILL_RETENTION_DAYS28Days to keep per-repo detail data from completed backfill jobs. 0 = keep indefinitely
verbose_event_loggingVERBOSE_EVENT_LOGGINGfalseLog every record index, record skip, and successful script run (record, label, and XRPC) to the event log. High write volume — recommended only for debugging
feature.spaces_enabledFEATURE_SPACES_ENABLED---Enables the experimental Permissioned Spaces API. When "true", space endpoints are available. When absent or any other value, space endpoints return 404 FeatureDisabled
event_log_retention_daysEVENT_LOG_RETENTION_DAYS30Days to keep event log entries
script_instruction_limitSCRIPT_INSTRUCTION_LIMIT1000000Instruction budget for a script run. PUT refuses a value outside 1000 to 1000000000 with 400 Bad Request
script_wall_clock_secondsSCRIPT_WALL_CLOCK_SECONDS10Wall-clock limit for a request’s script run, in seconds. PUT refuses a value outside 1 to 300 with 400 Bad Request
cookie_integration_originsCOOKIE_INTEGRATION_ORIGINS---Origins allowed to use the dashboard’s session cookie. PUT validates the list and answers 400 Bad Request on a bad origin
PUT /admin/settings/{key}
const response = await fetch("http://127.0.0.1:3000/admin/settings/app_name", {
method: "PUT",
headers: {
...headers,
"Content-Type": "application/json",
},
body: JSON.stringify({ value: "My HappyView" }),
});

The body is { "value": "..." }. The value is always a string, so send "true", not true.

Response: 204 No Content. 400 Bad Request when a script limit is out of range or cookie_integration_origins is invalid.

DELETE /admin/settings/{key}

Removes the override; the corresponding environment variable (if any) takes effect again. Returns 404 Not Found if no value is stored for that key.

GET /admin/settings/db-info

Returns database backend, connection pool sizes, and whether a server restart is recommended to resize the backfill pool for current concurrency settings.

Terminal window
curl http://127.0.0.1:3000/admin/settings/db-info -H "$AUTH"

Response: 200 OK

{
"backend": "sqlite",
"server_max_connections": null,
"main_pool_size": 32,
"backfill_pool_size": 16,
"restart_recommended": false
}
FieldTypeDescription
backendstring"sqlite" or "postgres"
server_max_connectionsnumber | nullPostgres max_connections setting. null for SQLite
main_pool_sizenumberCurrent main connection pool size
backfill_pool_sizenumberCurrent backfill connection pool size
restart_recommendedbooleantrue if concurrency settings have changed and a restart would resize the pool
PUT /admin/settings/logo
DELETE /admin/settings/logo

PUT takes a multipart/form-data body whose first part is the image, and stores it as the instance logo (served via the public dashboard). The part’s content type must be image/* and it must be at most 5 MB, otherwise the request is refused with 400 Bad Request. DELETE removes the stored logo.

Response: 204 No Content for both.