# Nocturne Postgres Server

Nocturne Postgres Server is a self-hosted databases app. Dedicated PostgreSQL 17 database for the Nocturne diabetes-management platform, serving as step 1 of 4 in the Nocturne stack. It is open source and self-hosted, installable on Unraid.

Canonical page: https://ourlocalhost.com/app/7074/nocturne-postgres-server

## Description

Dedicated PostgreSQL 17 database for the Nocturne diabetes-management platform, serving as step 1 of 4 in the Nocturne stack. It stores Nocturne's data on the shared Nocturne custom network after you run prepare.sh to generate credentials and bootstrap files. Intended for homelabbers self-hosting Nocturne; database initialization runs only on an empty data directory, so do not reuse a Nightscout MongoDB directory.

## Platform availability

Available on 1 of 9 platforms: Unraid.

## Links

- Unraid: https://ca.unraid.net/apps/app_3a337587675821ab
- GitHub: https://github.com/nightscout/nocturne

## Common questions

### Will Aspire automatically start PostgreSQL for Nocturne?

Yes. Aspire can start PostgreSQL in a container and run database migrations automatically.

### Does Nocturne support API_SECRET authentication?

Nocturne supports JWT-based authentication and API_SECRET support.

### Do I need to expose the PostgreSQL port if Nocturne and the database run on the same home server?

If the app and PostgreSQL run on the same local machine, you do not need to expose PostgreSQL to Vercel or anyone else.

### What backup responsibility applies when self-hosting Nocturne's PostgreSQL database?

You are responsible for backups, downtime, and patching. You should verify that you can restore from your backups.

---
Source: Our Local Host (https://ourlocalhost.com/app/7074/nocturne-postgres-server), the self-hosted and open-source app directory.
