Skip to content

Looking for the HydroServer v1 docs?

These docs now cover HydroServer v2. The v1 docs have moved to hydroserver.org/v1 and are still available. View the v1 version of this page.

Using the Django Admin Dashboard ​

Once HydroServer is running and accessible, instance administrators can use the Django admin dashboard to manage deployment-wide settings, default metadata, controlled vocabularies, authentication providers, and selected maintenance actions.

Access the Admin Dashboard ​

Log in to the administrator dashboard at:

https://<your-hydroserver-domain>/admin

Only users with Staff status can access the dashboard. Users with Superuser status can manage all admin models and run privileged admin actions. To create an administrator account programmatically, run the following command and follow the prompts to set an email and password:

bash
python manage.py createsuperuser

Admin users can also upgrade other user accounts to administrators through the admin dashboard by clicking on Identity and Access Management > Users, selecting a user, then toggling both Superuser Status and Staff Status to true.

User Accounts and Access ​

HydroServer can be configured to limit access to certain features for new users by default via the ACCOUNT_OWNERSHIP_ENABLED setting. If this setting is not enabled, new users are assigned limited accounts. Limited accounts cannot create or own workspaces, but they can be added as collaborators to existing workspaces.

Administrators can manually upgrade a limited account to a standard account by clicking on Identity and Access Management > Users, selecting a user, and changing Owned workspace limit from 0 to a positive number. Leaving the field blank allows unlimited workspace ownership.

The Identity and Access Management section also exposes the following admin models:

ModelPurpose
UsersManage user profile fields (including user type, which accepts any text), account status, staff/superuser access, and workspace ownership limits. Superusers created with createsuperuser get the user type Admin.
User TypesManage the account types users can choose from when signing up or editing their profile. Only types marked Public are offered. If there are none, users are given the type Other. Use Load Default Data to add HydroServer's default types.
OrganizationsReview or edit the organizations users are affiliated with.
Organization TypesManage the organization types users can choose from for their organization. Only types marked Public are offered. If there are none, organizations are given the type Other. Use Load Default Data to add HydroServer's default types.
WorkspacesReview or edit workspace ownership, privacy, and workspace metadata.
RolesConfigure reusable permission bundles for user and service-account collaborators.
PermissionsReview the resource-level permissions that belong to roles.
CollaboratorsReview or edit user and service-account access to workspaces.
Service AccountsReview service-account metadata and activate or deactivate accounts. API keys are created and regenerated from Workspace Management, where the new secret can be shown once.

HydroServer Configuration ​

To update the HydroServer domain used in emails and notifications, go to Sites > example.com and change the domain to match your HydroServer domain.

The following website settings can be configured under Website Configuration:

ModelPurpose
Instance ConfigurationConfigure instance-wide website content and legal links.
Analytics ConfigurationEnable or disable Microsoft Clarity and Google Analytics independently.
Map ConfigurationConfigure the default map view, default map layers, and map service providers.
Map LayersCreate the map layers available to users in HydroServer map controls.
Contact InformationAdd contact cards shown on the About page.
Site Type IconsCustomize which icons are used for different monitoring site types.

Instance Configuration ​

Use Website Configuration > Instance Configuration to manage general website settings:

FieldPurpose
Show about informationShows or hides the About page information block.
About page titleSets the heading for the About page information block.
About page textSets the body content for the About page information block.
Terms of use linkSets the Terms of Use link exposed by the web application.
Privacy policy linkSets the Privacy Policy link exposed by the web application.
CopyrightSets the copyright notice shown by the web application.

Analytics Configuration ​

Use Website Configuration > Analytics Configuration to optionally enable Microsoft Clarity and/or Google Analytics for the Data Management app. Both are disabled by default. Each service only loads when its enable checkbox is selected and its ID is provided.

FieldPurpose
Enable clarity analyticsTurns Microsoft Clarity tracking on or off.
Clarity project idStores the project ID from the Microsoft Clarity project settings.
Enable google analyticsTurns Google Analytics tracking on or off, independently of Clarity.
Google analytics measurement idStores the GA4 web stream measurement ID, such as G-XXXXXXXXXX.

For Google Analytics, create a GA4 web data stream for your HydroServer URL and copy its measurement ID from Admin > Data streams. In the stream's Enhanced measurement settings, enable Page views, including Page changes based on browser history events in the advanced settings. This tracks navigation within the app using Google's automatic page-view measurement. After saving the HydroServer settings, allow up to ten minutes for the cached page settings to expire, reload the app, and verify visits and navigation in Google Analytics Realtime or DebugView.

Set Instance Configuration > Privacy policy link to your organization's analytics/cookie notice; the app already displays this link in its footer. This integration tracks browser usage of the Data Management app; it does not add API request tracking.

Map Configuration ​

Use Website Configuration > Map Configuration to control the initial map state and map service providers:

FieldPurpose
Default latitudeSets the latitude used when a map first loads without a more specific site extent.
Default longitudeSets the longitude used when a map first loads without a more specific site extent.
Default zoom levelSets the initial map zoom level.
Default base layerSelects the default basemap from the configured Map Layers.
Default satellite layerSelects the default satellite imagery layer from the configured Map Layers.
Elevation serviceSelects the elevation lookup provider. Available options are Open Elevation and Google.
Geo serviceSelects the geocoding/search provider. Available options are Nominatim and Google.

If a Google-backed service is selected, make sure the deployment has the required Google service credentials or API key configuration before relying on that option in production.

Map Layers ​

Use Website Configuration > Map Layers to add basemap and overlay options:

FieldPurpose
NameSets the display name shown to users.
TypeClassifies the layer as a Basemap or Overlay.
PriorityLarger priority numbers render on top of smaller numbers; for example, priority 10 renders on top of priority 5. Equal priorities sort by name. All overlays stay above the basemap and below site markers.
Visible by defaultTurns an overlay on when a map first loads. Ignored for basemaps. Defaults to off.
SourceXYZ raster tile URL containing {z}, {x}, and {y} placeholders. Overlays also accept ArcGIS VectorTileServer URLs or their resources/styles/root.json URL.
AttributionSets the attribution text required by the layer provider.

After creating a basemap or satellite layer, return to Map Configuration to select it as a default layer.

The map's Overlays control lists the topmost overlay first and lets users turn each overlay on or off. Enabled overlays show their attribution in the map's attribution control. Hidden overlays do not request tiles; ArcGIS metadata and styles load when the overlay is first enabled. Choices apply to the current map and reset to the administrator's defaults when a new map loads.

The Base Map menu and each overlay have an Opacity slider, from 0% (transparent) to 100% (fully opaque). Adjustments update the map immediately and leave site markers at their normal opacity. Opacity is retained while switching basemaps or toggling overlays in the current map, and resets to 100% when a new map loads. Opacity controls are muted and disabled while an overlay is off; turning it back on restores the selected opacity and makes the slider adjustable again.

For example, to add the NetFlowlines stream network, create a layer with Type set to Overlay, supply its provider attribution, and use this Source:

text
https://tiles.arcgis.com/tiles/ZzrwjTRez6FJiOq4/arcgis/rest/services/NetFlowlinesVTPK/VectorTileServer?f=json

ArcGIS overlays use the service's published style and Web Mercator tile grid. Both a service URL ending in VectorTileServer and the ?f=json form are supported. Public services must allow access from the browser. WMS, WMTS, and unstyled vector tile templates are not supported.

Contact Information ​

Use Website Configuration > Contact Information to add organization contact options to the About page:

FieldPurpose
TitleSets the contact option title.
TextAdds supporting details for the contact option.
ActionSets the call-to-action text shown for the contact option.
IconStores the icon identifier used by the web application.
LinkSets the URL or address opened by the contact action.

Contact information is only visible when About page information is enabled in Instance Configuration.

Site Type Icons ​

Use Website Configuration > Site Type Icons to customize monitoring site icons in the Data Management app. The available icon records are fixed, but administrators can edit the site type names and keywords associated with each icon.

Enter one site type name or keyword per line. Matching ignores case and punctuation, and longer matching keywords take precedence. For example, a site type of Stream Gage can map to the gauge icon while Stream maps to the water icon. Each keyword can be assigned to only one icon. Leave an icon's keyword list empty if it should not be used.

If no configured keyword matches a site's type, the Data Management app uses the default outlined map marker icon.

Data and Metadata Administration ​

The Measurement Data section exposes the core HydroServer data models. Most data entry should happen through the HydroServer web application, API, or client libraries, but the Django admin can be useful for reviewing records and performing administrator-only maintenance.

Additional vocabulary models also appear in this admin section and are documented under Controlled Vocabularies below.

ModelPurpose
Monitoring SitesManage monitoring sites, including their location, tags, and workspace/privacy metadata.
MethodsManage reusable method metadata, including optional instrument details.
Observed PropertiesManage reusable observed property metadata.
UnitsManage reusable unit metadata.
Processing LevelsManage reusable processing level metadata.
DatastreamsReview datastream metadata and tags, and run selected maintenance actions.
Result QualifiersManage result qualifiers.
Linked Resource TypesManage linked resource type vocabulary values.
Monitoring Site Linked ResourcesReview linked resources attached to monitoring sites.
Datastream Linked ResourcesReview linked resources associated with datastreams.

The Datastreams admin page includes two actions for selected datastreams:

  • Populate with test observations: Generates test observations for selected datastreams. This is intended for development and demonstration environments.
  • Delete datastream observations: Deletes observations for selected datastreams and resets the datastream phenomenon/result time ranges and value count.

Use these actions carefully. They change observation data directly and should not be used on production data unless that is the intended administrative operation.

Default Data ​

Several HydroServer models can be populated with bundled default data through the admin dashboard. Open one of the models below and click its Load Default ... button in the upper-right corner of the changelist page:

SectionModelDefault data
Identity and Access ManagementRolesDefault workspace roles and permissions. Load these before users add collaborators or API keys to workspaces.
Identity and Access ManagementUser TypesDefault user type vocabulary values.
Identity and Access ManagementOrganization TypesDefault organization type vocabulary values.
Measurement DataObserved PropertiesDefault observed property metadata.
Measurement DataProcessing LevelsDefault processing level metadata.
Measurement DataUnitsDefault unit metadata.
Measurement DataMonitoring Site TypesDefault monitoring site type vocabulary values.
Measurement DataMethod TypesDefault method type vocabulary values.
Measurement DataObserved Property TypesDefault observed property type vocabulary values.
Measurement DataUnit TypesDefault unit type vocabulary values.
Measurement DataAggregation StatisticsDefault aggregation statistic vocabulary values.
Measurement DataDatastream StatusesDefault datastream status vocabulary values.
Measurement DataSampled MediumsDefault sampled medium vocabulary values.
Measurement DataLinked Resource TypesDefault linked resource type vocabulary values.

The load action imports fixture data into the database. It does not replace the need to review locally customized metadata after upgrades.

Controlled Vocabularies ​

HydroServer forms use several administrator-managed vocabularies. Add or edit these records to control the choices users see in metadata forms:

SectionModels
Identity and Access ManagementUser Types, Organization Types, Roles
Measurement DataAggregation Statistics, Datastream Statuses, Linked Resource Types, Method Types, Monitoring Site Types, Observed Property Types, Sampled Mediums, Unit Types

Workspace-scoped metadata such as observed properties, units, processing levels, methods, and result qualifiers can also be reviewed in the admin dashboard. When a record has no workspace, it is available as system-level metadata.

Registering OIDC Clients ​

HydroServer can act as an OpenID Connect provider, so third-party apps can sign users in and call the HydroServer APIs on their behalf. To register an app:

  • Navigate to OpenID Connect IdP > Clients > Add Client.
  • Enter the app's client ID and name. The name is shown to users on the consent screen and in the sign-in page.
  • Choose the client type. Use Public for browser and mobile apps that can't keep a secret, and Confidential for server-side apps.
  • Add the grant types (usually authorization_code, plus refresh_token if the app should renew tokens), the response type code, and the app's redirect URIs.
  • Under Scopes, list each scope the app may request, one per line. Scopes not listed here are dropped from the app's tokens. Along with openid, profile, and email, HydroServer defines data:read, data:write, workspace:read, workspace:write, iam:read, iam:write, task:read, task:write, and task:run. See Using OIDC Scopes for what each one grants.

Allow iam:write only for apps you trust to manage workspace access. Service accounts and collaborators an app creates with it keep working after a user revokes the app.

To end an app's access immediately, delete its tokens under OpenID Connect IdP > Tokens, or delete the client.

Third-Party Identity Providers ​

To enable authentication through third-party identity providers, do the following:

  • Navigate to Social Applications > Add Social Application.
  • Select a supported provider, such as Google or HydroShare.
  • Enter a unique ID, name, client ID/key, and secret key from the provider.
  • Optionally add JSON settings, for example:
    json
    {
      "allowSignUp": true,
      "allowConnection": true
    }
  • Use allowSignUp to control whether users can sign up with this provider.
  • Use allowConnection to control whether users can connect the provider to an existing HydroServer account.
  • When omitted, allowSignUp defaults to enabled, but allowConnection is enabled only when explicitly set to true.
  • Use icon to set an OpenID Connect provider's button icon path. See Sign-In Provider Icons.
  • Assign the default site that the provider can authenticate against.