This is the multi-page printable view of this section. .
Applications
- 1: Enterprise Self-Hosted Supabase
- 2: Odoo: Self-Hosted Open Source ERP
- 3: Dify: AI Workflow Platform
- 4: InsForge: AI Backend-as-a-Service
- 5: Hindsight: AI Long-Term Memory
- 6: FerretDB: MongoDB Protocol
- 7: Teable: AI No-Code Database
- 8: Gitea: Self-Hosted Git Service
- 9: NocoDB: Open-Source Airtable
- 10: Mattermost: Open-Source Team Collaboration
- 11: Wiki.js: OSS Wiki Software
- 12: Maybe: Self-Hosted Personal Finance
- 13: Immich: Self-Hosted Photo and Video Library
- 14: Kong: API Gateway
- 15: Metabase: BI Analytics Tool
- 16: Registry: Container Image Cache
- 17: JumpServer: Open-Source Bastion Host
- 18: ByteBase: Schema Migration
- 19: pgAdmin: PostgreSQL GUI
- 20: PGWeb: Browser-based PostgreSQL Client
- 21: PostgREST: Auto-Generated API
- 22: Electric: PostgreSQL Sync Engine
- 23: Jupyter: Notebooks and Data Analysis
- 24: PGLOG: PostgreSQL Log Analysis Application
- 25: NOAA ISD Global Weather Station Historical Data Query
- 26: WHO COVID-19 Pandemic Dashboard
- 27: StackOverflow Global Developer Survey
- 28: DB-Engines Database Popularity Trend Analysis
- 29: AWS & Aliyun Server Pricing
Pigsty “applications” fall into two categories:
- Software Templates: Docker Compose templates under
~/pigsty/app/<name>for stateless business components. - Data Applets: PostgreSQL + Grafana analytics demos, mainly for learning and showcase use.
Application Model
The recommended application deployment workflow is:
app.yml copies app/<name> templates to /opt/<name>, overwrites .env with apps.<name>.conf, then runs docker compose up -d.
Maintained Config Templates
The following app config templates are actively maintained (conf/app/*.yml, conf/supabase.yml, and the conf/app/supa.yml symlink):
app/difyapp/odooapp/teableapp/mattermostapp/electricapp/maybeapp/immichapp/jumpserverapp/registryapp/insforgeapp/hindsightsupabase
These templates work out of the box and align with the ./configure -c ... + ./app.yml workflow.
Lightweight Compose Apps
For apps like bytebase, gitea, jupyter, kong, metabase, minio, nocodb, pgadmin, pgweb, postgrest, pg_exporter, and wiki, you can also use the per-app Compose templates directly.
FerretDB is provided as the Docker APP layer of PostgreSQL Mongo mode. Deploy it from the mongo configuration template with docker.yml and app.yml.
If you want to manage them uniformly via Pigsty IaC:
Legacy Applets
Data applets like pglog, covid, db-engine, sf-survey, cloud, and isd are kept as reference examples for data modeling and visualization ideas.
They are no longer the primary application delivery path. Prefer the software template workflow above.
1 - Enterprise Self-Hosted Supabase
Supabase is great, but having your own Supabase is even better. Pigsty can help you deploy enterprise-grade Supabase on your own servers (physical, virtual, or cloud) with a single command — more extensions, better performance, deeper control, and more cost-effective.
As of August 2026, the official Supabase self-hosting guide recommends Docker and classifies other implementations as community projects. Pigsty is an independent community integration and is not currently listed on that page.
This tutorial requires basic Linux knowledge. Otherwise, consider using Supabase cloud or plain Docker Compose self-hosting.
TL;DR
Prepare a Linux server, follow the Pigsty standard single-node installation process with the supabase config template:
After installation, access Supa Studio on port 8000 with username supabase and password pigsty.

Checklist
- At least one 2-core/4 GB server; 4 cores/8 GB or more is recommended for the full stack
- Static internal IPv4 address
- Supported Linux distro installed
- Standard Pigsty installation
- Modified config file: domain, passwords, IP address
- Docker module installed, ensure proxy/mirror available
- Use Pigsty’s
app.ymlto start Supabase
Table of Contents
- What is Supabase?
- Why Self-Host?
- Single-Node Quick Start
- Advanced: Security Hardening
- Advanced: Domain Configuration
- Advanced: External Object Storage
- Advanced: Using SMTP
- Advanced: True High Availability
What is Supabase?
Supabase is a BaaS (Backend as a Service), an open-source Firebase alternative, and the most popular database + backend solution in the AI Agent era.
Supabase wraps PostgreSQL and provides authentication, messaging, edge functions, object storage, and automatically generates REST APIs based on your database schema. After enabling pg_graphql on demand, it can also provide GraphQL APIs.
Supabase aims to provide developers with a one-stop backend solution, reducing the complexity of developing and maintaining backend infrastructure. It allows developers to skip most backend development work — you only need to understand database design and frontend to ship quickly! Developers can use vibe coding to create a frontend and database schema to rapidly build complete applications.
Supabase is one of the most popular open-source projects in the PostgreSQL ecosystem. As of August 2026, its GitHub repository has more than 100,000 stars. Supabase also offers a free hosted tier. The current Free plan includes shared CPU, 500 MB of RAM, a 500 MB database quota, and 1 GB of file storage; consult the official page for later changes.
Why Self-Host?
If Supabase cloud is so attractive, why self-host?
The most obvious reason is what we discussed in “Is Cloud Database an IQ Tax?”: costs can rise quickly once data, compute, or availability requirements outgrow a managed-service tier. And nowadays, reliable local enterprise NVMe SSDs have three to four orders of magnitude cost advantage over cloud storage, and self-hosting can better leverage this.
Another important reason is functionality — Supabase cloud features are limited. Many powerful PostgreSQL extensions aren’t available in cloud services due to multi-tenant security challenges and licensing. Despite extensions being a core PostgreSQL feature, Supabase currently promises only more than 50 preconfigured extensions; the exact list changes with platform releases. Self-hosted Supabase with Pigsty provides up to 576 ready-to-use PostgreSQL extensions.
Additionally, self-control and vendor lock-in avoidance are important reasons for self-hosting. Although Supabase aims to provide a vendor-lock-free open-source Google Firebase alternative, self-hosting enterprise-grade Supabase is not trivial. Supabase includes PostgreSQL extensions that it develops and maintains. It acquired the Oriole team in 2024 and offers OrioleDB as an optional Public Alpha; OrioleDB is not the production default and should not be described as a confirmed replacement for native PostgreSQL. Some Supabase extensions and patched kernels are not distributed by the official PGDG repository.
This is implicit vendor lock-in, preventing users from self-hosting in ways other than the supabase/postgres Docker image. Pigsty provides an open, transparent, and universal solution.
We package the 10 missing Supabase extensions as ready-to-use RPM/DEB packages for the current supabase template matrix: EL 8/9, Debian 12, and Ubuntu 22.04/24.04/26.04 on x86_64 and aarch64. See supported Linux distributions.
| Extension | Description |
|---|---|
pg_graphql | GraphQL support in PostgreSQL (Rust), provided by PIGSTY, enabled on demand |
pg_jsonschema | JSON Schema validation (Rust), provided by PIGSTY |
wrappers | Supabase foreign data wrapper bundle (Rust), provided by PIGSTY |
index_advisor | Query index advisor (SQL), provided by PIGSTY |
pg_net | Async non-blocking HTTP/HTTPS requests (C), provided by PIGSTY |
vault | Store encrypted credentials in Vault (C), provided by PIGSTY |
pgjwt | JSON Web Token API implementation (SQL), provided by PIGSTY |
pgsodium | Table data encryption TDE, provided by PIGSTY |
supautils | Security utilities for cloud environments (C), provided by PIGSTY |
pg_plan_filter | Filter queries by execution plan cost (C), provided by PIGSTY |
We also install most extensions by default in Supabase deployments. You can enable them as needed.
Newer templates install the pg_graphql package but no longer create the pg_graphql extension object by default. If you need GraphQL APIs, run CREATE EXTENSION IF NOT EXISTS pg_graphql; in the target database; the event trigger in the template will rebuild the graphql_public.graphql entry point and permissions.
Pigsty also handles the underlying highly available PostgreSQL cluster, highly available Silo object storage cluster, and even Docker deployment, Nginx reverse proxy, domain configuration, and HTTPS certificate issuance. You can spin up any number of stateless Supabase container clusters using Docker Compose and store state in external Pigsty-managed database services.
With this self-hosted architecture, you can choose among the PostgreSQL majors supported by the current template (15-18, default 18), install 576 extensions, and scale Supabase, PostgreSQL, and Silo independently. Compared with a managed service, you also assume responsibility for operating and securing that infrastructure.
Single-Node Quick Start
Let’s start with single-node Supabase deployment. We’ll cover multi-node high availability later.
Prepare a fresh Linux server, use the Pigsty supabase configuration template for standard installation,
then run docker.yml and app.yml to start stateless Supabase containers (default ports 8000/8443).
Before deploying Supabase, modify the auto-generated pigsty.yml configuration file (domain and passwords) according to your needs.
For local development/testing, you can skip this and customize later.
If configured correctly, after about ten minutes, you can access the Supabase Studio GUI at http://<your_ip_address>:8000 on your local network.
Default username and password are supabase and pigsty.

Notes:
- In mainland China, Pigsty uses 1Panel and 1ms DockerHub mirrors by default, which may be slow.
- You can configure your own proxy and registry mirror, then manually pull images with
cd /opt/supabase; docker compose pull. We also offer expert consulting services including complete offline installation packages. - If you need object storage functionality, you must access Supabase via domain and HTTPS, otherwise errors will occur.
- For serious production deployments, always change all default passwords!
Key Technical Decisions
Here are some key technical decisions for self-hosting Supabase:
Single-node deployment doesn’t provide PostgreSQL/Silo high availability. However, single-node deployment still has significant advantages over the official pure Docker Compose approach: out-of-the-box monitoring, freedom to install extensions, component scaling capabilities, and point-in-time recovery as a safety net.
Pigsty’s Supabase template does not start the upstream Compose db or supavisor containers, and does not use Supabase’s bundled connection pooler.
Stateless containers connect directly to the PostgreSQL service managed by Pigsty; the single-node template uses service port 5436 by default, which always routes to the current primary.
Logflare / Analytics in the template no longer writes to postgres._analytics in the application database. Instead, it uses the separate _supabase database and its _analytics schema.
This prevents internal scheduling tables such as oban_jobs and oban_peers from being created in the project database’s public schema and triggering Supabase Advisor RLS warnings. LOGFLARE_DB and LOGFLARE_SCHEMA control these locations.
The Query Performance page in Supabase Studio accesses pg_stat_statements with a public, extensions search path.
Pigsty keeps the pg_stat_statements extension objects in the monitor schema for compatibility with pg_exporter and existing monitoring dashboards. The template creates a compatibility view and functions in the extensions schema for Studio.
If you only have one server or choose to self-host on cloud servers, Pigsty recommends using external S3 instead of local Silo for object storage to hold PostgreSQL backups and Supabase Storage. This provides an hour-scale recovery path after a single-node failure. Actual RPO depends on the newest recoverable backup, WAL archiving state, and object-storage availability; the topology alone does not guarantee a fixed value.
For serious production deployments, Pigsty recommends at least 3-4 nodes, ensuring both Silo and PostgreSQL use enterprise-grade multi-node high availability deployments.
You’ll need more nodes and disks, adjusting cluster configuration in pigsty.yml and Supabase cluster configuration to use high availability endpoints.
Some Supabase features require sending emails, so SMTP service is needed. Unless purely for internal use, production deployments should use SMTP cloud services. Self-hosted mail servers’ emails are often marked as spam.
If your service is directly exposed to the public internet, we strongly recommend using real domain names and HTTPS certificates via Nginx Portal.
Next, we’ll discuss advanced topics for improving Supabase security, availability, and performance beyond single-node deployment.
Advanced: Security Hardening
Pigsty Components
For serious production deployments, we strongly recommend changing Pigsty component passwords. These defaults are public and well-known — going to production without changing passwords is like running naked:
grafana_admin_password:pigsty, Grafana admin passwordpg_admin_password:DBUser.DBA, PostgreSQL superuser passwordpg_monitor_password:DBUser.Monitor, PostgreSQL monitoring user passwordpg_replication_password:DBUser.Replicator, PostgreSQL replication user passwordpatroni_password:Patroni.API, Patroni HA component passwordhaproxy_admin_password:pigsty, Load balancer admin passwordminio_secret_key:S3User.MinIO, Silo root user secretetcd_root_password:Etcd.Root, ETCD root user password- Additionally, strongly recommend changing the PostgreSQL business user password for Supabase, default is
DBUser.Supa
These are Pigsty component passwords. Strongly recommended to set before installation.
Supabase Keys
Besides Pigsty component passwords, you need to change Supabase keys, including:
JWT_SECRET: JWT signing key, at least 32 charactersANON_KEY: Anonymous user JWT credentialSERVICE_ROLE_KEY: Service role JWT credentialSUPABASE_PUBLISHABLE_KEY/SUPABASE_SECRET_KEY: New opaque API keys, can be left empty if not enabledJWT_KEYS/JWT_JWKS: Asymmetric JWT keys and JWKS, can be left empty if not enabledANON_KEY_ASYMMETRIC/SERVICE_ROLE_KEY_ASYMMETRIC: Asymmetric signing JWTs, can be left empty if not enabledPG_META_CRYPTO_KEY: PostgreSQL Meta service encryption key, at least 32 charactersSECRET_KEY_BASE: Random secret used by RealtimeREALTIME_DB_ENC_KEY: Realtime database encryption keyDASHBOARD_USERNAME: Supabase Studio web UI default username, defaultsupabaseDASHBOARD_PASSWORD: Supabase Studio web UI default password, defaultpigstyLOGFLARE_PUBLIC_ACCESS_TOKEN: Logflare public access token, at least 32 random charactersLOGFLARE_PRIVATE_ACCESS_TOKEN: Logflare private access token, at least 32 random charactersLOGFLARE_DB/LOGFLARE_SCHEMA: Internal database and schema used by Logflare / Analytics, defaulting to_supabase/_analytics
Please follow the Supabase tutorial: Securing your services:
- Generate a
JWT_SECRETwith at least 40 characters, then use the tutorial tools to issueANON_KEYandSERVICE_ROLE_KEYJWTs. - Use the tutorial tools to generate an
ANON_KEYJWT based onJWT_SECRETand expiration time — this is the anonymous user credential. - Use the tutorial tools to generate a
SERVICE_ROLE_KEY— this is the higher-privilege service role credential. - If you use newer opaque API keys or asymmetric JWTs, also generate and fill
SUPABASE_PUBLISHABLE_KEY,SUPABASE_SECRET_KEY,JWT_KEYS,JWT_JWKS, and the corresponding asymmetricANON_KEY/SERVICE_ROLE_KEY. - Specify a random string of at least 32 characters for
PG_META_CRYPTO_KEYto encrypt Studio UI and meta service interactions. SECRET_KEY_BASEmust be at least 64 characters;REALTIME_DB_ENC_KEYmust be exactly 16 characters.- Generate separate random credentials for
S3_PROTOCOL_ACCESS_KEY_IDandS3_PROTOCOL_ACCESS_KEY_SECRET; do not reuse an object-storage administrator password. - If using different PostgreSQL business user passwords, modify
POSTGRES_PASSWORDaccordingly. - If your object storage uses different passwords, modify
S3_ACCESS_KEYandS3_SECRET_KEYaccordingly. - If Edge Functions are exposed to untrusted clients, set
FUNCTIONS_VERIFY_JWTtotrueas needed. API_EXTERNAL_URLshould now be the external Auth service URL, retaining the/auth/v1suffix, for examplehttps://supa.pigsty.io/auth/v1; keepSITE_URLandSUPABASE_PUBLIC_URLat the site root URL.- The current template defaults
PGRST_DB_SCHEMAStopublic,graphql_public; thestorageschema is used by the Storage API and is no longer exposed through PostgREST by default.
After modifying Supabase credentials, restart Docker Compose to apply:
Advanced: Domain Configuration
If using Supabase locally or on LAN, you can directly connect to Kong’s HTTP port 8000 via IP:Port.
You can use an internal static-resolved domain, but for serious production deployments, we recommend using a real domain + HTTPS to access Supabase.
In this case, your server should have a public IP, you should own a domain, use cloud/DNS/CDN provider’s DNS resolution to point to the node’s public IP (optional fallback: local /etc/hosts static resolution).
The simple approach is to batch-replace the placeholder domain (supa.pigsty) with your actual domain, e.g., supa.pigsty.io:
If not configured beforehand, reload Nginx and Supabase configuration:
The modified configuration should look like:
For complete domain/HTTPS configuration, see Certificate Management. You can also use Pigsty’s built-in local static resolution and self-signed HTTPS certificates as fallback.
Advanced: External Object Storage
You can use S3 or S3-compatible services for PostgreSQL backups and Supabase object storage. Here we use Alibaba Cloud OSS as an example.
Pigsty provides a
terraform/spec/aliyun-s3.tftemplate for provisioning a server and OSS bucket on Alibaba Cloud.
First, modify the S3 configuration in all.children.supabase.vars.apps.supabase.conf to point to Alibaba Cloud OSS:
Reload Supabase configuration:
You can also use S3 as PostgreSQL backup repository. Add an aliyun backup repository definition in all.vars.pgbackrest_repo:
Then select aliyun with all.vars.pgbackrest_method. Check the current backup first, run check mode, and only after explicit authorization re-render pgBackRest configuration on the named cluster, initialize the stanza, and establish a new full recovery point:
Backups in the old repository are not migrated automatically, and a recovery-window gap remains until the first full backup in the new repository succeeds. See Switching Repositories for the complete procedure.
Advanced: Using SMTP
You can use SMTP for sending emails. Modify the supabase app configuration with SMTP information:
Reload the configuration with ./app.yml -l supabase -t app_config,app_launch.
Advanced: True High Availability
After these configurations, you have enterprise-grade Supabase with public domain, HTTPS certificate, SMTP, PITR backup, monitoring, IaC, and access to 576 PostgreSQL extensions (basic single-node version). For high availability configuration, see other Pigsty documentation. We offer expert consulting services for hands-on Supabase self-hosting — $400 USD to save you the hassle.
Single-node RTO/RPO relies on external object storage as a safety net. If your node fails, backups in external S3 storage let you redeploy Supabase on a new node and restore from backup. This provides an hour-scale recovery fallback, but RPO depends on the actual backup and WAL-archive state and must be proven through restore drills. “MB-level” is not a fixed guarantee.
For a target RTO below 30 seconds while preserving acknowledged transactions, use multi-node, explicitly select the fast RTO preset and the crit.yml strict-synchronous policy, and validate them with failure drills. The default norm preset targets RTO below 45 seconds, while asynchronous replication does not promise RPO=0:
- ETCD: DCS needs three or more nodes to tolerate one node failure.
- PGSQL: PostgreSQL synchronous commit (no data loss) mode recommends at least three nodes.
- INFRA: Monitoring infrastructure failure has less impact; production recommends dual replicas.
- Supabase stateless containers can also be multi-node replicas for high availability.
In this case, you also need to modify PostgreSQL and Silo endpoints to use DNS / L2 VIP / HAProxy high availability endpoints.
For these parts, follow the documentation for each Pigsty module.
Reference conf/ha/trio.yml and conf/ha/safe.yml for upgrading to three or more nodes.
2 - Odoo: Self-Hosted Open Source ERP
Odoo is an open-source enterprise resource planning (ERP) software that provides a full suite of business applications, including CRM, sales, purchasing, inventory, production, accounting, and other management functions. Odoo is a typical web application that uses PostgreSQL as its underlying database.
All your business on one platform — Simple, efficient, yet affordable
Public Demo (may not always be available): http://odoo.pigsty.io, username: [email protected], password: pigsty
Quick Start
On a fresh Linux x86/ARM server running a compatible operating system:
Odoo listens on port 8069 by default. Access http://<ip>:8069 in your browser. The default username and password are both admin.
You can add a DNS resolution record odoo.pigsty pointing to your server in the browser host’s /etc/hosts file, allowing you to access the Odoo web interface via http://odoo.pigsty.
If you want to access Odoo via SSL/HTTPS, you need to use a real SSL certificate or trust the self-signed CA certificate automatically generated by Pigsty. (In Chrome, you can also type thisisunsafe to bypass certificate verification)
Configuration Template
conf/app/odoo.yml defines a template configuration file containing the resources required for a single Odoo instance.
Basics
Check the configurable environment variables in the .env file:
Then start Odoo with:
Access http://odoo.pigsty or http://10.10.10.10:8069
Makefile
Using External PostgreSQL
You can use external PostgreSQL for Odoo. Odoo will create its own database during setup, so you don’t need to do that.
Create the business user and database with:
Check connectivity:
Expose Odoo Service
Expose the Odoo web service via Nginx portal:
Odoo Addons
There are many Odoo modules available in the community. You can install them by downloading and placing them in the addons folder.
You can mount the ./addons directory to /mnt/extra-addons in the container, then download and extract addons to the addons folder.
To enable addon modules, first enter Developer mode:
Settings -> General Settings -> Developer Tools -> Activate the developer mode
Then go to Apps -> Update Apps List, and you’ll find the extra addons available to install from the panel.
Frequently used free addons: Accounting Kit
Demo
Check the public demo: http://odoo.pigsty.io, username: [email protected], password: pigsty
If you want to access Odoo via SSL, you must trust files/pki/ca/ca.crt in your browser (or use the dirty hack thisisunsafe in Chrome).
3 - Dify: AI Workflow Platform
Dify is a Generative AI Application Innovation Engine and open-source LLM application development platform. It provides capabilities from Agent building to AI workflow orchestration, RAG retrieval, and model management, helping users easily build and operate generative AI native applications.
Pigsty provides support for self-hosted Dify, allowing you to deploy Dify with a single command while storing critical state in externally managed PostgreSQL. You can use pgvector as a vector database in the same PostgreSQL instance, further simplifying deployment.
app/difytemplate latest verified Dify version:v1.15.0(2026-07-09). The template includes a Dify migration compatibility patch for PostgreSQL 18’s built-inuuidv7().
Quick Start
On a fresh Linux x86/ARM server running a compatible operating system:
Dify listens on port 5001 by default. Access http://<ip>:5001 in your browser and set up your initial user credentials to log in.
Once Dify starts, you can install various extensions, configure system models, and start using it!
Why Self-Host
There are many reasons to self-host Dify, but the primary motivation is data security. The Docker Compose template provided by Dify uses basic default database images, lacking enterprise features like high availability, disaster recovery, monitoring, IaC, and PITR capabilities.
Pigsty provides declarative Dify deployment and can use mirrors to address image access in China. The template puts PostgreSQL and pgvector under Pigsty management and deploys Compose Redis, VictoriaMetrics/Grafana monitoring, and an Nginx reverse proxy. It can request a Let’s Encrypt certificate after public DNS, ports, and Certbot are configured. Files are stored in DIFY_DATA (/data/dify) by default, with optional Silo/S3 object storage.
The current template places PostgreSQL/pgvector in an externally managed Pigsty database and directs API files and plugin data to DIFY_DATA (/data/dify by default). However, the built-in Compose Redis data remains under /opt/dify/volumes/redis/data, while Sandbox dependencies and Certbot data are also stored under /opt/dify/volumes/. The complete application stack is therefore not fully stateless, and a backup cannot retain only the database.
Installation
Let’s start with single-node Dify deployment. We’ll cover production high-availability deployment methods later.
First, use Pigsty’s standard installation process to install the PostgreSQL instance required by Dify:
When you use the ./configure -c app/dify command, Pigsty automatically generates a configuration file based on the conf/app/dify.yml template and your current environment.
You should modify passwords, domains, and other relevant parameters in the generated pigsty.yml configuration file according to your needs, then run ./deploy.yml to execute the standard installation process.
Next, run docker.yml to install Docker and Docker Compose, then use app.yml to complete Dify deployment:
You can access the Dify Web admin interface at http://<your_ip_address>:5001 on your local network.
The first login will prompt you to set up default username, email, and password.
You can also use the locally resolved placeholder domain dify.pigsty, or follow the configuration below to use a real domain with an HTTPS certificate.
Configuration
When you run ./configure -c app/dify, Pigsty generates a configuration file from the conf/app/dify.yml template and the current environment. The snapshot below matches the v4.5.0 source template:
Checklist
Here’s a checklist of configuration items you need to pay attention to:
- Hardware/Software: Prepare required machine resources: Linux
x86_64/arm64server, fresh installation of a mainstream Linux OS - Network/Permissions: SSH passwordless login access, user with sudo privileges without password
- Ensure the machine has a static IPv4 network address on the internal network and can access the internet
- If accessing via public network, ensure you have a domain pointing to the node’s public IP address
- Ensure you use the
app/difyconfiguration template and modify parameters as neededconfigure -c app/dify, enter the node’s internal primary IP address, or specify via-i <primary_ip>command line parameter
- In production, have you changed every example password, application secret, and database credential? [Required]
grafana_admin_password:pigsty, Grafana admin passwordpg_admin_password:DBUser.DBA, PG superuser passwordpg_monitor_password:DBUser.Monitor, PG monitoring user passwordpg_replication_password:DBUser.Replicator, PG replication user passwordpatroni_password:Patroni.API, Patroni HA component passwordhaproxy_admin_password:pigsty, Load balancer admin password
- Have you changed the PostgreSQL cluster business user password and application configurations using these passwords?
- Default username
difyand passworddifyai123456are generated by Pigsty for Dify; modify according to your needs - In the Dify configuration block, modify
DB_USERNAME,DB_PASSWORD,PGVECTOR_USER,PGVECTOR_PASSWORDaccordingly
- Default username
- Have you changed Dify’s default encryption key?
- You can randomly generate a password string with
openssl rand -base64 42and fill in theSECRET_KEYparameter
- You can randomly generate a password string with
- Have you changed the domain used by Dify?
- Replace placeholder domain
dify.pigstywith your actual domain, e.g.,dify.pigsty.io - You can use
sed -ie 's/dify.pigsty/dify.pigsty.io/g' pigsty.ymlto modify Dify’s domain
- Replace placeholder domain
Domain and SSL
If you want to use a real domain with an HTTPS certificate, you need to modify the pigsty.yml configuration file:
- The
difydomain in theinfra_portalparameter - It’s best to specify an email address
certbot_emailfor certificate expiration notifications - Configure Dify’s
NGINX_SERVER_NAMEparameter to specify your actual domain
Use the following commands to request Nginx certificates:
Run the app.yml playbook to redeploy Dify service for the NGINX_SERVER_NAME configuration to take effect:
File Backup
You can use restic to back up Dify’s file state. The current template requires at least /data/dify, /opt/dify/.env, and /opt/dify/volumes/; the latter contains Compose Redis, Sandbox dependencies, and any Certbot data. Dify data in PostgreSQL should still be backed up separately with Pigsty/pgBackRest.
After creating the Restic backup repository, you can backup Dify with:
Another option is to place /data/dify on a shared filesystem managed by the JUICE module. File data can live in Silo/S3 or in a PostgreSQL jfs_blob table; the latter is not PostgreSQL large-object storage.
To use PostgreSQL for both JuiceFS metadata and file data, first declare a dedicated database and least-privilege user in pg_databases, then declare the instance on the Dify node. Passwords below are placeholders and must not be used in production:
Handle database creation and JUICE deployment separately. After confirming the exact targets, run the playbooks:
Database creation, initial filesystem formatting, and mounting all change the target environment. Confirm the backup, database name, and host group before executing them. Start Dify only after the mount is ready; see JUICE configuration and its PITR consistency boundary. Before mounting over a nonempty /data/dify, stop Dify and plan migration of the existing files.
Reference
4 - InsForge: AI Backend-as-a-Service
InsForge is an open-source Backend-as-a-Service platform for AI coding agents. Built around PostgreSQL, it provides authentication, database APIs, file storage, a model gateway, edge functions, site deployment, payment integrations, and more, allowing applications to skip most backend boilerplate.
Pigsty provides the app/insforge configuration template, which runs InsForge OSS stateless services in Docker Compose while placing the most critical state in PostgreSQL managed by Pigsty. This lets you continue using Pigsty’s high availability, backup and recovery, monitoring, ingress domains, and infrastructure capabilities instead of hiding the database in an ephemeral container volume.
The current template targets InsForge OSS v2.2.6, uses external PostgreSQL, and exposes three services by default: the InsForge Dashboard/API, PostgREST, and Deno Runtime.
Quick Start
Run the following on a fresh Linux x86 / ARM server with a compatible operating system:
After installation, the default access URLs are:
http://<your_ip_address>:7130http://isf.pigsty
The default administrator account is [email protected] / pigsty. In production, you must change the administrator account, administrator password, JWT secret, encryption key, and database password.
To access InsForge through isf.pigsty, add the following entry to /etc/hosts on the machine running your browser:
To expose the service to the public internet, use a real domain and HTTPS certificate, and modify infra_portal as described below.
Checklist
- Prepare a fresh Linux server with at least
2C4G; use an SSD/NVMe disk. - Confirm that the server has a static private IPv4 address and can access GHCR / Docker Hub, or that a registry mirror is configured.
- After running
./configure -c app/insforge, change the default passwords, domains, and keys inpigsty.yml. - Generate new
JWT_SECRETandENCRYPTION_KEYvalues separately withopenssl rand -base64 32. - Keep
POSTGRES_PASSWORDconsistent with the password ofdbuser_insforgeinpg_users. - For public access, configure a real domain, an HTTPS certificate, and firewall access rules.
- Confirm that PostgreSQL extension packages are installed correctly, and run
pig pb infoafter deployment.
Architecture
The InsForge template separates the database from the application containers by default:
Components:
- InsForge App:
ghcr.io/insforge/insforge-oss:v2.2.6, providing the Dashboard and main API on port7130. - PostgREST:
postgrest/postgrest:v12.2.12, generating REST APIs from PostgreSQL schemas; exposed on host port5430. - Deno Runtime:
ghcr.io/insforge/deno-runtime:latest, the edge function runtime, listening on port7133. - PostgreSQL: Managed by Pigsty for persistent state, backup, monitoring, and high availability.
Configuration Template
conf/app/insforge.yml defines a single-node, self-hosted InsForge template. The default topology includes:
insforge: The node running the InsForge, PostgREST, and Deno Runtime containers.pg-meta: The PostgreSQL database cluster managed by Pigsty, including the roles, database, and extensions required by InsForge.infra: Infrastructure services such as Nginx ingress, Grafana, and VictoriaMetrics.etcd: The distributed configuration store required by Patroni.
Key configuration excerpts:
Important Parameters
app.yml copies the app/insforge directory to /opt/insforge and uses apps.insforge.conf to override /opt/insforge/.env. Common parameters include:
| Parameter | Default | Description |
|---|---|---|
JWT_SECRET | Sample secret | JWT signing secret; must be replaced in production, preferably with a random value of at least 32 characters |
ENCRYPTION_KEY | Sample secret | Encrypts runtime credentials; must be replaced in production and managed separately from JWT_SECRET |
ROOT_ADMIN_USERNAME | [email protected] | Root administrator account |
ROOT_ADMIN_PASSWORD | pigsty | Root administrator password; must be replaced in production |
POSTGRES_HOST / POSTGRES_PORT | 10.10.10.10 / 5432 | Pigsty PostgreSQL endpoint |
POSTGRES_DB | insforge | InsForge database |
POSTGRES_USER | dbuser_insforge | Application user that connects InsForge to PostgreSQL |
POSTGRES_PASSWORD | DBUser.Insforge | Application user password; must be replaced in production |
INSFORGE_VERSION | v2.2.6 | InsForge OSS image tag |
DENO_RUNTIME_VERSION | latest | Deno Runtime image tag |
APP_PORT | 7130 | External InsForge App port |
POSTGREST_PORT | 5430 | External PostgREST port |
DENO_PORT | 7133 | External Deno Runtime port |
ACCESS_API_KEY | Empty | Optional MCP / API access key; generated by InsForge when empty |
ACCESS_ANON_KEY | Empty | Optional anonymous frontend access key; should begin with anon_ when set |
OPENROUTER_API_KEY | Empty | Optional OpenRouter model gateway key |
AWS_S3_BUCKET / S3_* | Empty | Optional object storage configuration |
DENO_DEPLOY_TOKEN | Empty | Optional Deno Deploy integration |
VERCEL_TOKEN / FLY_API_TOKEN | Empty | Optional site deployment and compute platform integrations |
STRIPE_* / RAZORPAY_* | Empty | Optional payment integrations |
Generate production secrets with:
When changing the database password, keep the application and database definitions synchronized. For example:
Once ENCRYPTION_KEY has been used for production data, keep it stable. Changing it may make stored runtime credentials such as API keys, OAuth tokens, and function secrets impossible to decrypt.
Database and Permissions
The default InsForge database is named insforge and owned by dbuser_insforge. The template creates the following roles:
| Role | Login | Purpose |
|---|---|---|
dbuser_insforge | Yes | Application user that connects InsForge to PostgreSQL; granted superuser in the template |
anon | No | PostgREST anonymous role |
authenticated | No | PostgREST authenticated-user role |
project_admin | No | Administrative role with service-key semantics and BYPASSRLS |
files/insforge.sql configures PostgREST role privileges, default privileges, ACLs for project_admin, and the helper function public.reload_postgrest_schema(). The function executes:
This notifies PostgREST to reload its schema.
The upstream InsForge PostgreSQL image preinstalls insforge_pg_utils. The current Pigsty template does not depend on this extension package. Instead, it uses pgcrypto, http, and pg_cron already provided by Pigsty, while application migrations by InsForge manage runtime schemas.
Service Ports and Persistence
The default Docker Compose services are:
| Service | Container | Host Port | Description |
|---|---|---|---|
| InsForge App | insforge | 7130 | Dashboard and main API |
| PostgREST | insforge-postgrest | 5430 | Automatically generated REST API |
| Deno Runtime | insforge-deno | 7133 | Edge function runtime |
The default Docker volumes are:
| Volume | Mount Point | Description |
|---|---|---|
storage-data | /insforge-storage | Local file storage |
insforge-logs | /insforge-logs | Application logs |
deno_cache | /deno-dir | Deno module cache |
By default, Docker containers connect to the Pigsty node at 10.10.10.10:5432. The template HBA rule permits 172.16.0.0/12, covering Docker’s default bridge and common custom bridge networks.
Domain and Ingress
The template adds an InsForge entry to infra_portal by default:
To use a real domain such as insforge.example.com, replace the placeholder in bulk:
Then apply the Nginx ingress configuration:
To request an HTTPS certificate, first ensure that the domain resolves to the current node, then add or modify certbot under infra_portal.insforge:
Then run:
Operations
InsForge is installed in /opt/insforge. Common commands include:
For offline environments, save the images in advance:
Default artifact locations:
/tmp/docker/insforge/postgrest.tgz/tmp/docker/insforge/insforge.tgz/tmp/docker/insforge/deno.tgz/tmp/insforge.tgz
Load the images on the target machine:
Data and Backup
InsForge state is divided into two categories:
- Business data, users, project metadata, permissions, and related state are stored in the Pigsty PostgreSQL database
insforge. - Local files and logs are stored in the Docker volumes
storage-dataandinsforge-logs.
By default, the template schedules a full PostgreSQL backup every day at 1:00 AM:
After deployment, check the backup status:
If file storage is configured to use S3 / MinIO, file objects are managed by that object storage system. If you keep local volumes, include them separately in your host-level backup strategy.
Troubleshooting
Check container status:
View logs:
Check whether PostgreSQL is reachable from the container:
Check whether the HBA rules include the Docker network:
Check whether the roles exist:
Check for port conflicts:
Common issues:
- Cannot log in: Confirm that
ROOT_ADMIN_USERNAME/ROOT_ADMIN_PASSWORDwere written to/opt/insforge/.envby the template, and check theinsforgecontainer logs. - PostgREST fails to start: Confirm that the
anon,authenticated, andproject_adminroles exist, and thatJWT_SECRETmatches the InsForge App setting. - Database connection fails: Confirm that
POSTGRES_HOST,POSTGRES_PORT, andPOSTGRES_PASSWORDmatch thepg_usersconfiguration, and check that HBA permits the Docker network. - File upload or download errors: When using S3 / MinIO, check
AWS_S3_BUCKET,S3_ENDPOINT_URL,S3_FORCE_PATH_STYLE, and the access-key configuration.
References
- InsForge project: https://github.com/InsForge/InsForge
- Pigsty template: https://github.com/pgsty/pigsty/blob/main/conf/app/insforge.yml
- Docker Compose: https://github.com/pgsty/pigsty/blob/main/app/insforge/docker-compose.yml
- Database baseline: https://github.com/pgsty/pigsty/blob/main/files/insforge.sql
5 - Hindsight: AI Long-Term Memory
Hindsight is a PostgreSQL-native long-term memory service for AI agents.
Pigsty provides the app/hindsight configuration template (conf/app/hindsight.yml), using Pigsty-managed PostgreSQL by default instead of Hindsight’s built-in development database.
Quick Start
Default access URLs:
- UI:
http://hs.pigstyorhttp://<IP>:9999 - API:
http://hs-api.pigstyorhttp://<IP>:8888
Key Settings
conf/app/hindsight.yml overrides /opt/hindsight/.env through apps.hindsight.conf. Key parameters:
HINDSIGHT_API_PUBLISH_PORT: public API port, default8888HINDSIGHT_UI_PUBLISH_PORT: public UI port, default9999HINDSIGHT_DB_HOST/HINDSIGHT_DB_PORT/HINDSIGHT_DB_NAME/HINDSIGHT_DB_USER/HINDSIGHT_DB_PASSWORDHINDSIGHT_API_VECTOR_EXTENSION: defaultpgvectorHINDSIGHT_API_TEXT_SEARCH_EXTENSION: defaultnativeHINDSIGHT_API_LLM_PROVIDER: defaultnone
The default none LLM provider only ensures the service can start. Fact extraction, reflection, and consolidation require configuring Ollama or an OpenAI-compatible API.
Operations
References
- Hindsight project: https://github.com/vectorize-io/hindsight
- Pigsty template: https://github.com/pgsty/pigsty/blob/main/conf/app/hindsight.yml
6 - FerretDB: MongoDB Protocol
FerretDB provides a MongoDB-compatible protocol over PostgreSQL and the DocumentDB extension. Pigsty’s app/ferretdb runs only the stateless protocol proxy; PostgreSQL, the postgres database, the DocumentDB extensions, and the backend PostgreSQL login role must already exist. The mongo configuration template prepares these dependencies together.
Quick Start
After installing mongosh or another MongoDB-compatible client separately, connect with the dedicated login declared by the template:
Key Configuration
Override template variables through apps.ferretdb.conf in the inventory. Do not edit the deployed /opt/ferretdb/.env directly:
Port 5436 is Pigsty’s direct-to-current-primary PostgreSQL service. Linux host-gateway mapping lets the container connect through the local host while preserving Pigsty’s primary routing. The MongoDB port listens on loopback by default; change FERRETDB_BIND_ADDR explicitly only when remote clients require access.
FerretDB authenticates users through PostgreSQL, but it does not currently implement MongoDB authorization semantics, so MongoDB roles cannot provide access isolation. The template also does not enable MongoDB client TLS. Before exposing the service to an untrusted network, configure certificates and the FERRETDB_LISTEN_TLS* variables.
FerretDB releases specify a preferred DocumentDB version, while Pigsty may ship a newer compatible package. After upgrading either component, rerun an authenticated CRUD smoke test.
Optional Three-Node Topology
The mongo template includes a commented three-node PostgreSQL / DocumentDB cluster. Each node runs a FerretDB container, and HAProxy exposes standard port 27017 at the floating endpoint 10.10.10.4:27017 (mongo.pigsty). After enabling the complete pg-mongo cluster and the additional etcd members, run:
HAProxy uses TCP health checks to exclude stopped or unreachable FerretDB processes; the image’s built-in health check continues to verify the backend connection. Production deployments should also use a shared Silo or external S3-compatible pgBackRest repository so the same backup history remains available after a PostgreSQL primary failover.
References
7 - Teable: AI No-Code Database
Teable is a no-code database platform for team collaboration.
Pigsty provides the app/teable template (conf/app/teable.yml) and depends on PostgreSQL + Silo + Docker by default (no Redis dependency).
Quick Start
Default endpoints:
http://<IP>:8890http://tea.pigsty
Key Settings
The template writes the following into /opt/teable/.env:
POSTGRES_HOST/POSTGRES_PORT/POSTGRES_DB/POSTGRES_USER/POSTGRES_PASSWORDPRISMA_DATABASE_URLPUBLIC_ORIGIN(public URL)PUBLIC_DATABASE_PROXYTEABLE_PORT(default8890)
Operations
References
- Teable docs: https://help.teable.io/
- Pigsty template: https://github.com/pgsty/pigsty/blob/main/conf/app/teable.yml
8 - Gitea: Self-Hosted Git Service
Gitea is a lightweight open-source Git hosting platform.
Pigsty’s app/gitea template uses external PostgreSQL mode by default, configured via GITEA_DB_* values in .env.
Quick Start
Default endpoints:
- Web:
http://git.pigstyorhttp://<IP>:8889 - SSH:
<IP>:2222
Database Preparation
Connection string example:
Common Commands
References
- Gitea docs: https://docs.gitea.com/
- Pigsty template: https://github.com/pgsty/pigsty/tree/main/app/gitea
9 - NocoDB: Open-Source Airtable
NocoDB is an open-source Airtable alternative that turns any database into a smart spreadsheet.
It provides a rich user interface that allows you to create powerful database applications without writing code. NocoDB supports PostgreSQL, MySQL, SQL Server, and more, making it ideal for building internal tools and data management systems.
Quick Start
Pigsty provides a Docker Compose configuration file for NocoDB in the software template directory:
Review and modify the .env configuration file (adjust database connections as needed).
Start the service:
Access NocoDB:
- Default URL: http://nocodb.pigsty
- Alternate URL: http://10.10.10.10:8080
- First-time access requires creating an administrator account
Management Commands
Pigsty provides convenient Makefile commands to manage NocoDB:
Connect to PostgreSQL
NocoDB can connect to PostgreSQL databases managed by Pigsty.
When adding a new project in the NocoDB interface, select “External Database” and enter the PostgreSQL connection information:
After successful connection, NocoDB will automatically read the database table structure, and you can manage data through the visual interface.
Features
- Smart Spreadsheet Interface: Excel/Airtable-like user experience
- Multiple Views: Grid, form, kanban, calendar, gallery views
- Collaboration Features: Team collaboration, permission management, comments
- API Support: Auto-generated REST API
- Integration Capabilities: Webhooks, Zapier integrations
- Import/Export: CSV, Excel format support
- Formulas and Validation: Complex data calculations and validation rules
Configuration
NocoDB configuration is in the .env file:
Data Persistence
NocoDB metadata is stored by default in an external PostgreSQL database, and application data can also be stored in PostgreSQL.
If using local storage, data is saved in the /data/nocodb directory.
Security Recommendations
- Change Default Secret: Modify
NC_AUTH_JWT_SECRETin the.envfile - Use Strong Passwords: Set strong passwords for administrator accounts
- Configure HTTPS: Enable HTTPS for production environments
- Restrict Access: Limit access through firewall or Nginx
- Regular Backups: Regularly back up the NocoDB metadata database
Related Links
- NocoDB Website: https://nocodb.com/
- Documentation: https://docs.nocodb.com/
- GitHub Repository: https://github.com/nocodb/nocodb
- Pigsty Software Template: https://github.com/pgsty/pigsty/tree/main/app/nocodb
10 - Mattermost: Open-Source Team Collaboration
Mattermost is an open-source team collaboration platform and a private alternative to Slack.
Pigsty provides app/mattermost (conf/app/mattermost.yml), which stores app state in external PostgreSQL and persists file directories on host paths.
Quick Start
Default endpoints:
http://<IP>:8065http://mm.pigsty
On first access, initialize the admin account in the web UI.
Default Storage and Connections
Default template settings include:
- PostgreSQL URL:
POSTGRES_URL=postgres://dbuser_mattermost:DBUser.Mattermost@<IP>:5432/mattermost?... - Persistent directories:
/data/mattermost/{config,data,logs,plugins,client/plugins,bleve-indexes}
Operations
References
- Mattermost docs: https://docs.mattermost.com/
- Pigsty template: https://github.com/pgsty/pigsty/blob/main/conf/app/mattermost.yml
11 - Wiki.js: OSS Wiki Software
Public Demo: http://wiki.pigsty.cc

TL; DR
Postgres Preparation
Configuration
Access
- Default Port for wiki: 9002
12 - Maybe: Self-Hosted Personal Finance
Maybe is an open-source personal finance application for managing accounts, transactions, budgets, investments, and household financial views. Maybe is a typical Rails web application: it stores business data in PostgreSQL in production and uses Redis for background job queues.
Pigsty provides the app/maybe template, which connects the stateless Maybe Web / Worker containers to PostgreSQL managed by Pigsty and uses local Redis for the Sidekiq queue. This keeps your most important financial data in a PostgreSQL cluster that can be backed up, monitored, and recovered, rather than in an ephemeral Docker data volume.
The upstream Maybe repository has been archived, and its latest release is
v0.6.0. GHCR currently publishesstableandlatestimage tags. Pigsty usesstableby default, which tracks the latest release image.
Quick Start
Run the following on a fresh Linux x86 / ARM server with a compatible operating system:
Maybe listens on port 5002 by default. After installation, you can access it at:
http://<your_ip_address>:5002http://maybe.pigsty
On your first visit, select the option to create an account on the login page, then register your first household account to get started.
To access Maybe through maybe.pigsty, add the following entry to /etc/hosts on the machine running your browser:
To expose the service to the public internet, use a real domain and HTTPS certificate, and modify infra_portal as described below.
Checklist
- Prepare a fresh Linux server with at least
2C4G; use an SSD/NVMe disk. - Confirm that the server has a static private IPv4 address and can access GHCR / Docker Hub, or that a registry mirror is configured.
- After running
./configure -c app/maybe, change the default passwords, domain, and secrets inpigsty.yml. - Generate a new
SECRET_KEY_BASEwithopenssl rand -hex 64. - Keep
POSTGRES_PASSWORDconsistent with the password of themaybeuser inpg_users. - For public access, configure a real domain, an HTTPS certificate, and firewall access rules.
- Confirm that PostgreSQL backup jobs run correctly, and check
pig pb infoafter deployment.
Configuration Template
conf/app/maybe.yml defines a single-node, self-hosted Maybe template. The default topology includes:
maybe: The node running the Maybe Web / Worker / Redis containers.pg-maybe: The PostgreSQL database cluster managed by Pigsty.infra: Infrastructure services such as Nginx ingress, Grafana, and VictoriaMetrics.etcd: The distributed configuration store required by Patroni.
Key configuration excerpts:
Here, maybe_production is the default production database name used upstream by Maybe / Rails. You can rename it to maybe, but you must update POSTGRES_DB, pg_databases.name, pg_hba_rules.db, and every reference in documentation and operational scripts at the same time.
Important Parameters
app.yml copies the app/maybe directory to /opt/maybe and uses apps.maybe.conf to override /opt/maybe/.env. Common parameters include:
| Parameter | Default | Description |
|---|---|---|
MAYBE_IMAGE | ghcr.io/maybe-finance/maybe | Maybe image repository |
MAYBE_VERSION | stable | Image tag; keep stable for production |
MAYBE_PORT | 5002 | Host port exposed by Maybe |
MAYBE_DATA | /data/maybe | Persistent directory on the host |
APP_DOMAIN | maybe.pigsty | Placeholder for the default Maybe ingress domain |
SECRET_KEY_BASE | Sample random string | Rails encryption and signing secret; must be replaced in production |
DB_HOST / DB_PORT | 10.10.10.10 / 5432 | Pigsty PostgreSQL endpoint |
POSTGRES_USER | maybe | Application user that connects Maybe to PostgreSQL |
POSTGRES_PASSWORD | MaybeFinance2026 | Application user password; must be replaced in production |
POSTGRES_DB | maybe_production | Maybe production database |
REDIS_VERSION | 7-alpine | Local Redis image tag |
Generate a production secret with:
When changing the password, keep the application and database definitions synchronized. For example:
Domain and Ingress
The template adds a Maybe entry to infra_portal by default:
To use a real domain such as finance.example.com, replace the placeholder in bulk:
Then apply the Nginx ingress configuration:
To request an HTTPS certificate, first ensure that the domain resolves to the current node, then add certbot under infra_portal.maybe:
Then run:
Operations
Maybe is installed in /opt/maybe. Common commands include:
The web container automatically runs db:prepare at startup, so manual migration is not usually required. If the startup logs report a database migration problem after an image upgrade, inspect the logs, then run:
Data and Backup
Maybe state is divided into two categories:
- Business data is stored in the Pigsty PostgreSQL database
maybe_production. - Attachments and cache are stored in the host directories
/data/maybe/storageand/data/maybe/redis.
By default, the template schedules a full PostgreSQL backup every day at 1:00 AM:
After deployment, check the backup status:
If you use Maybe to store real financial data in production, at minimum:
- Regularly verify that PostgreSQL backups succeed.
- Place the pgBackRest repository on reliable storage or object storage.
- Include
/data/maybe/storagein file-level backups; for example, use restic to back it up to S3. - Do not expose
SECRET_KEY_BASE, database passwords, or API keys in a public repository.
Security Recommendations
Maybe manages highly sensitive personal and household financial data. For production use:
- Change all Pigsty default passwords, especially
pg_admin_password,pg_monitor_password,patroni_password, andhaproxy_admin_password. - Change the Maybe database user password in
POSTGRES_PASSWORD. - Use a new
SECRET_KEY_BASE; do not retain the sample value from the template. - Enable HTTPS for public access and restrict access to administration ports.
- If you enable
OPENAI_ACCESS_TOKENorSYNTH_API_KEY, assess both external API costs and the boundary of data exposure.
The upstream Maybe repository has been archived. It is suitable for users who are satisfied with the existing feature set and prefer long-term local ownership. If you need continuously evolving features or automatic bank synchronization, evaluate the upstream maintenance status before adopting it.
References
- Maybe project: https://github.com/maybe-finance/maybe
- Maybe Docker self-hosting guide: https://github.com/maybe-finance/maybe/blob/main/docs/hosting/docker.md
- Pigsty Maybe template: https://github.com/pgsty/pigsty/blob/main/conf/app/maybe.yml
- Pigsty Docker module
- Pigsty Nginx ingress
13 - Immich: Self-Hosted Photo and Video Library
Immich is a high-performance, self-hosted photo and video management application and one of the most popular open-source alternatives to Google Photos. It provides web and mobile uploads, album sharing, timelines, maps, EXIF and RAW support, LivePhoto, semantic search, facial recognition, and automatic backups under the AGPL-3.0 license.
Pigsty’s app/immich template runs the Immich application layer with Docker Compose and stores metadata in Pigsty-managed PostgreSQL.
The current template follows the Immich v3 layout and uses VectorChord by default for similar-image search, smart search, and face-search vectors.
Unlike Immich’s official single-node Compose template, PostgreSQL does not run in an application container. Pigsty manages it instead, providing monitoring, backups, PITR, extension management, and high-availability access.
Quick Start
Immich recommends at least 2 CPU cores and 6 GB of RAM, or 4 CPU cores and 8 GB of RAM for smooth operation. The v3 amd64 machine-learning image requires the x86-64-v2 instruction set. Linux with local SSD storage is recommended for production.
On a fresh x86 or ARM Linux server running a compatible operating system:
Default endpoints:
If you use photo.pigsty, add a hosts entry on the browser host or replace the template domain with a real domain.
Template Structure
conf/app/immich.yml defines a single-node self-hosted Immich template. The default topology includes:
immich: the node running Immich Server, Machine Learning, and local Valkey/Redis containers.pg-immich: the Pigsty-managed PostgreSQL cluster.infra: Nginx ingress, Grafana, VictoriaMetrics, and other infrastructure.etcd: the distributed configuration store required by Patroni.
Application containers include:
immich-server: API, Web UI, and background jobs, exposed on host port2283by default.immich-machine-learning: CLIP and facial-recognition model inference.redis: local Valkey queues and cache.
The template does not start the PostgreSQL container from Immich’s upstream Compose file. Pigsty provides the database through DB_URL.
Data Storage Strategy
Immich state is divided into three layers that must be managed separately:
- Media files: original photos and videos, thumbnails, transcoded videos, avatars, and the upload queue, stored in the host directory specified by
UPLOAD_LOCATION. - PostgreSQL: metadata for users, albums, assets, EXIF, file paths, job state, people, faces, and smart-search vectors.
- Valkey/Redis: queues, cache, and runtime state; it must not be treated as an authoritative data source.
Photo and video files are not stored in PostgreSQL. Conversely, Immich cannot reconstruct its complete application state simply by rescanning the media directory; the paths and metadata in the database are equally important.
A recoverable Immich backup must therefore include both PostgreSQL and the media directory. Backing up only the database loses the photos, while backing up only the files cannot reliably restore albums, users, shares, faces, and search state.
PostgreSQL
Default database connection and vector extension:
The template installs the extension packages on the pg-immich cluster and creates the database extensions:
vchord must be added to shared_preload_libraries through pg_libs; the template already configures it:
The default connection goes directly to PostgreSQL on port 5432. Do not point Immich at PgBouncer transaction pooling. Direct PostgreSQL connections or session pooling are more reliable for migrations, indexes, and prepared statements.
Immich still treats pre-existing PostgreSQL as an advanced deployment option, but explicitly notes that it enables WAL-based backup tools such as pgBackRest and Barman. The Pigsty template uses a non-superuser path: Pigsty creates the database, user, and extensions in advance, so the Immich application user does not need PostgreSQL superuser privileges.
Media Files
Uploaded photos, videos, thumbnails, transcoded files, and avatars are stored in the host directory specified by UPLOAD_LOCATION:
PostgreSQL stores only metadata and file paths. Media files are not stored in PostgreSQL and are not automatically protected by pgBackRest.
A production deployment must back up at least two data layers:
- PostgreSQL: use Pigsty pgBackRest / PITR.
- Media files: perform a complete file-level backup of
/data/immich/library, including originals, the upload queue, thumbnails, transcoded files, avatars, and other generated assets.
For a more consistent combined backup, stop immich-server before backing up the database and media directory together. If the service cannot be stopped, back up the database first, followed by the filesystem.
Images and Networking
The default images come from GHCR and Docker Hub:
If image pulls are slow or restricted, configure proxy_env or docker_registry_mirrors in pigsty.yml.
Operations
After installation, enter /opt/immich:
To pin a specific Immich version, set the following in pigsty.yml:
Read the upstream release notes before upgrading Immich or VectorChord. After upgrading the VectorChord package, you will usually also need to update the extension and rebuild the related indexes in the immich database:
Rebuilding indexes for a large library can take a long time. Confirm that you have a backup and a maintenance window before proceeding.
References
- Immich project: https://github.com/immich-app/immich
- Immich pre-existing PostgreSQL: https://docs.immich.app/administration/postgres-standalone/
- Immich backup and restore: https://docs.immich.app/administration/backup-and-restore/
- Pigsty Immich template: https://github.com/pgsty/pigsty/blob/main/conf/app/immich.yml
- Pigsty Docker module
- Pigsty Nginx ingress
14 - Kong: API Gateway
Kong is an open-source API gateway.
Pigsty’s app/kong template stores configuration in PostgreSQL and runs a one-time migration job (kong-migration) automatically.
Quick Start
Default ports:
- Proxy HTTP:
8000 - Proxy HTTPS:
8443 - Admin API:
8001
Database Preparation
Connection string example:
Common Commands
References
- Kong docs: https://docs.konghq.com/
- Pigsty template: https://github.com/pgsty/pigsty/tree/main/app/kong
15 - Metabase: BI Analytics Tool
Metabase is a fast, easy-to-use open-source business intelligence tool that lets your team explore and visualize data without SQL knowledge.
Metabase provides a friendly user interface with rich chart types and supports connecting to various databases, making it an ideal choice for enterprise data analysis.
Quick Start
Pigsty provides a Docker Compose configuration file for Metabase in the software template directory:
Review and modify the .env configuration file:
Start the service:
Access Metabase:
- Default URL: http://metabase.pigsty
- Alternate URL: http://10.10.10.10:3001
- First-time access requires initial setup
Management Commands
Pigsty provides convenient Makefile commands to manage Metabase:
Connect to PostgreSQL
Metabase can connect to PostgreSQL databases managed by Pigsty.
During Metabase initialization or when adding a database, select “PostgreSQL” and enter the connection information:
After successful connection, Metabase will automatically scan the database schema, and you can start creating questions and dashboards.
Features
- No SQL Required: Build queries through visual interface
- Rich Chart Types: Line, bar, pie, map charts, and more
- Interactive Dashboards: Create beautiful data dashboards
- Auto Refresh: Schedule data and dashboard updates
- Permission Management: Fine-grained user and data access control
- SQL Mode: Advanced users can write SQL directly
- Embedding: Embed charts into other applications
- Alerting: Automatic notifications on data changes
Configuration
Metabase configuration is in the .env file:
Recommended: Use a dedicated PostgreSQL database for storing Metabase metadata.
Data Persistence
Metabase metadata (users, questions, dashboards, etc.) is stored in the configured database.
If using H2 database (default), data is saved in the /data/metabase directory. Using PostgreSQL as the metadata database is strongly recommended for production environments.
Performance Optimization
- Use PostgreSQL: Replace the default H2 database
- Increase Memory: Add JVM memory with
JAVA_OPTS=-Xmx4g - Database Indexes: Create indexes for frequently queried fields
- Result Caching: Enable Metabase query result caching
- Scheduled Updates: Set reasonable dashboard auto-refresh frequency
Security Recommendations
- Change Default Credentials: Modify metadata database username and password
- Enable HTTPS: Configure SSL certificates for production
- Configure Authentication: Enable SSO or LDAP authentication
- Restrict Access: Limit access through firewall
- Regular Backups: Back up the Metabase metadata database
Related Links
- Metabase Website: https://metabase.com/
- Documentation: https://www.metabase.com/docs/
- GitHub Repository: https://github.com/metabase/metabase
- Pigsty Software Template: https://github.com/pgsty/pigsty/tree/main/app/metabase
16 - Registry: Container Image Cache
Pigsty provides the app/registry template (conf/app/registry.yml) for:
- Docker Registry cache service (default
5000) - Optional management UI (default
5080)
Quick Start
Default endpoints:
- Registry API:
http://<IP>:5000orhttp://d.pigsty - Registry UI:
http://<IP>:5080orhttp://dui.pigsty
Image data is stored in /data/registry by default.
Docker Client Configuration
If you run HTTP without TLS, Docker must trust the registry explicitly:
After editing /etc/docker/daemon.json, restart Docker:
Operations
app/registry/Makefile runs in /opt/registry by default:
References
- Docker Registry docs: https://docs.docker.com/registry/
- Pigsty template: https://github.com/pgsty/pigsty/blob/main/conf/app/registry.yml
17 - JumpServer: Open-Source Bastion Host
JumpServer is an open-source PAM and bastion-host system for centralized access management of SSH, RDP, database, and web assets.
Pigsty’s app/jumpserver template runs the JumpServer Community Edition application layer with Docker Compose and uses Pigsty-managed PostgreSQL as its persistent backend database.
The current template is based on JumpServer v4.10.16-ce. It retains the Community Edition core, celery, koko, lion, chen, and web services plus local Redis, while removing the built-in PostgreSQL service from the upstream installer.
Pigsty manages PostgreSQL, backups, monitoring, Nginx ingress, and the database lifecycle.
Quick Start
On a fresh x86 or ARM Linux server running a compatible operating system:
Run the database migration once after the containers start:
Default endpoints:
Default web login:
Change the administrator password immediately after the first login.
Pre-Deployment Checklist
- Prepare a fresh Linux server with at least
2C4G; use more memory and configure swap for production. - Verify that the server IP, DNS, NTP, SSH, and sudo work correctly.
- Verify access to Docker Hub, or configure
docker_registry_mirrors/proxy_env. - After running
./configure -c app/jumpserver, change the default passwords,SECRET_KEY,BOOTSTRAP_TOKEN, andDOMAINSinpigsty.yml. - Ensure that
DOMAINScontains the hostname or IP actually used by the browser, such as10.10.10.10:8080. - Ensure that PostgreSQL backup jobs work; check
pig pb infoorpgbackrest infoafter deployment.
Configuration Template
conf/app/jumpserver.yml defines a single-node self-hosted JumpServer template. The default topology includes:
jumpserver: the node running JumpServer application containers and local Redis.pg-jumpserver: the Pigsty-managed PostgreSQL cluster.infra: Nginx ingress, Grafana, VictoriaMetrics, and other infrastructure.etcd: the distributed configuration store required by Patroni.
app.yml copies app/jumpserver to /opt/jumpserver, overwrites /opt/jumpserver/.env with apps.jumpserver.conf, and then runs docker compose up -d.
Core application services:
jms_core: Django API and web backend, listening on container port8080.jms_celery: asynchronous jobs, scheduled jobs, and background queues.jms_web: Nginx web ingress, mapped to host port8080by default.jms_koko: SSH / SFTP terminal endpoint, mapped to host port2222by default.jms_lion: Web Terminal component.jms_chen: WebSocket and database-terminal support component.jms_redis: local Redis for caching, queues, and the Channels backend.
Key Parameters
Common parameters:
| Parameter | Default | Description |
|---|---|---|
JUMPSERVER_VERSION | v4.10.16-ce | JumpServer Community Edition image version |
JUMPSERVER_DATA | /data/jumpserver | Persistent application directory |
DOMAINS | 10.10.10.10:8080,10.10.10.10,jump.pigsty | Trusted domains and IPs allowed for login |
SECRET_KEY | Example value | Encryption key; replace and retain it for production |
BOOTSTRAP_TOKEN | Example value | Component registration token; replace and retain it for production |
DB_HOST / DB_PORT | 10.10.10.10 / 5432 | Pigsty PostgreSQL endpoint |
DB_USER / DB_NAME | jumpserver / jumpserver | Application user and database |
DB_PASSWORD | DBUser.JumpServer | Application user password; replace it for production |
DOCKER_SUBNET | 192.168.250.0/24 | Internal JumpServer Compose subnet |
REDIS_HOST | 192.168.250.2 | Fixed IP of the local Redis container |
CORE_HOST | http://192.168.250.4:8080 | Internal JumpServer core endpoint |
HTTP_PORT | 8080 | Web ingress port |
SSH_PORT | 2222 | Koko SSH/SFTP endpoint port |
CORE_WORKER | 2 | Number of core Gunicorn workers, sized for a 2C4G sandbox |
CELERY_WORKER_COUNT | 2 | Worker concurrency for each Celery queue |
Example commands for generating production keys:
Do not change SECRET_KEY or BOOTSTRAP_TOKEN after production data exists. Store them together with database backups, /data/jumpserver, and /opt/jumpserver/.env. Losing the original SECRET_KEY may make encrypted account credentials in the database unrecoverable.
Do not use single or double quotes in DB_PASSWORD or REDIS_PASSWORD. This matches the behavior of the official JumpServer installer.
Login and DOMAINS
JumpServer validates trusted access domains during login. DOMAINS must include the Host actually used by the browser:
Normal login URL:
If the login page shows:
Check /opt/jumpserver/.env and the container environment:
Recreate the core container after correcting it:
Also update pigsty.yml or conf/app/jumpserver.yml; otherwise, the next ./app.yml run will overwrite /opt/jumpserver/.env again.
Do not use an old URL containing csrf_failure=1 to determine whether the configuration is still wrong. That page displays the DOMAINS=... warning using the failed request context. Retest with the normal login page and use an incognito window if necessary.
Docker Network
The template uses a fixed Docker bridge subnet:
Fixed IPs serve two purposes:
- Avoid transient Docker DNS resolution failures while JumpServer Python and Java components start.
- Allow PostgreSQL HBA rules to permit the application subnet precisely.
PostgreSQL sees container clients as coming from 192.168.250.0/24, so the template includes:
If 192.168.250.0/24 conflicts with an existing network, update all of the following together:
DOCKER_SUBNETand the fixed IP for each component.REDIS_HOSTandCORE_HOST.pg_hba_rules.addrandpgb_hba_rules.addr.- Recreate the Compose network and containers.
Do not set DB_HOST to 127.0.0.1; inside a container, that address refers to the container itself. Use the host’s private IP or the Pigsty L2 VIP.
PostgreSQL
JumpServer 4.x uses PostgreSQL and requires PostgreSQL 16 or later. The template uses Pigsty to create the database, user, HBA rules, backup schedule, and optional PgBouncer endpoint.
The application database does not require additional PostgreSQL extensions:
The template’s pg_version can be pinned to 16, 17, or a later major version for your environment; JumpServer requires at least PostgreSQL 16. For a high-availability database deployment, follow the commented pg_vip_enabled example in the template and point the application’s DB_HOST to the primary-database VIP.
JumpServer’s Django migrations and Celery Beat are unsuitable for PgBouncer transaction pooling. The default is a direct PostgreSQL connection on port 5432. If you use PgBouncer, configure session pooling for the jumpserver user.
Deployment Verification
After installation, run:
Expected results:
jms_core,jms_celery,jms_web,jms_redis,jms_koko,jms_lion, andjms_chenare allhealthy.make healthreturnsstatus=true,db_status=true, andredis_status=true.make migrateprintsNo migrations to applyor completes any pending migrations.
Database checks:
Expected results:
- The Patroni cluster Leader is
running. - PostgreSQL is version 16 or later.
- The public schema contains about 168 tables after JumpServer migrations.
- The pgBackRest stanza status is
ok.
Troubleshooting
Login Page Reports a DOMAINS Configuration Error
Verify that both configuration layers match:
You must recreate the core container after changing .env:
Also update apps.jumpserver.conf.DOMAINS in the Pigsty inventory; otherwise, the next ./app.yml run will overwrite it.
admin / ChangeMe Cannot Log In
First distinguish between two kinds of errors:
- A red
DOMAINS=...box at the top of the page indicates a domain / CSRF configuration problem, not a password problem. - A form message reporting an incorrect username or password indicates a credential problem.
You can verify inside the container whether the default password is still valid:
Web Returns 502
Check core and web:
If the problem is a race over the core log directory during the first start, confirm that /data/jumpserver/core/data/logs exists. The template creates this directory in advance.
Containers Keep Restarting or Health Checks Time Out
JumpServer uses substantial memory on a 2C4G node. The template defaults to:
If Gunicorn worker timeouts, SIGKILL, or system memory exhaustion still occur, add memory or swap, or reduce the worker counts further. Check resource usage with:
Operations
After installation, enter /opt/jumpserver:
When upgrading JumpServer, do not only change the image tag; you must run database migrations:
Keep SECRET_KEY and BOOTSTRAP_TOKEN unchanged during the upgrade.
Backup and Restore
JumpServer state has two layers:
- PostgreSQL database: back up with Pigsty pgBackRest / PITR.
- Application files:
/data/jumpserverand/opt/jumpserver/.env, which contain logs, recordings, component data, Redis persistence, and keys.
Restore the database, .env, and file directory from the same environment:
Restoring PostgreSQL without the original SECRET_KEY prevents JumpServer from decrypting stored account credentials correctly.
Community Edition Scope
This template uses PostgreSQL as JumpServer’s own backend database and follows the self-hosted Community Edition deployment path. JumpServer’s “database asset management” is a separate product capability and is not the same as this backend database.
References
- JumpServer project: https://github.com/jumpserver/jumpserver
- JumpServer installer: https://github.com/jumpserver/installer
- Pigsty JumpServer template: https://github.com/pgsty/pigsty/blob/main/conf/app/jumpserver.yml
- Pigsty Docker module
- Pigsty Nginx ingress
18 - ByteBase: Schema Migration
Bytebase is a database schema change and version management tool.
Pigsty provides a ready-to-use Compose template in app/bytebase. It listens on 8887 by default and connects to external PostgreSQL via BB_PGURL.
Quick Start
Access:
http://ddl.pigstyhttp://<IP>:8887
After first startup, initialize the admin account using the Bytebase setup wizard.
External PostgreSQL
Default connection string example:
You can create the database user and database in Pigsty first:
Common Commands
References
- Bytebase docs: https://www.bytebase.com/docs/
- Pigsty template: https://github.com/pgsty/pigsty/tree/main/app/bytebase
19 - pgAdmin: PostgreSQL GUI
pgAdmin is an open-source PostgreSQL administration and development GUI. Pigsty v4.5.0 provides the app/pgadmin Docker Compose template and can generate a server list and password file from the current inventory.
The template login is [email protected] with password pigsty. It is suitable only for a local demo. Before deployment on a shared network or the Internet, change the credentials, restrict port access, and configure HTTPS.
Quick Start
conf/meta.yml declares pgAdmin on the app group by default. Deploy it against an explicitly limited target:
The default port is 8885; use http://<app_ip>:8885. http://adm.pigsty works only after infra_portal, Nginx, and DNS are configured.
The first container start can take tens of seconds. Check it on the application node:
Application Configuration
Override .env through apps.pgadmin.conf on the app group in pigsty.yml:
app.yml copies the template to /opt/pgadmin and writes overrides to /opt/pgadmin/.env. This file contains the login password and should remain mode 0600.
The current template uses the unpinned dpage/pgadmin4 image. For production, pin a tested version or digest in docker-compose.yml and validate image upgrades as separate changes.
Load the Server List
env_pgadmin generates:
/infra/pgadmin/servers.json: PostgreSQL instance list/infra/pgadmin/pgpass: database administrator password file
In the default conf/meta.yml, the infra and app groups point to the same host, so pgAdmin can bind-mount both files read-only. If pgAdmin and Infra run on different hosts, the application node does not automatically have /infra/pgadmin/; securely distribute equivalent files or customize the mounts instead of assuming that a local path is shared across hosts.
For the default colocated topology, regenerate the files and then ask the running container to import the list and password:
pgpass contains credentials for pg_admin_username. Restrict access to the files, backups, and application host. If pgAdmin should not hold DBA credentials, generate connection definitions for a dedicated least-privilege role instead.
Domain and HTTPS
Add an entry to infra_portal:
Update Nginx on the explicitly limited Infra group:
For a real public domain, point DNS at the server and set certbot on the portal entry:
See CA and Certificates for prerequisites and renewal. The directly exposed port 8885 is not an HTTPS endpoint.
State and Management
From /opt/pgadmin:
The Compose template does not persist /var/lib/pgadmin. Pigsty can re-import its generated server list, but preferences, users, and other state created in the pgAdmin UI may be lost when the container is recreated. If that state matters, add a protected persistent volume for the directory and include it in backups after validating the template change.

Security Checklist
- Change the default pgAdmin login and never distribute real credentials in scripts, screenshots, or tickets.
- The default port mapping listens on the host network; restrict sources with a firewall and use Nginx with valid HTTPS for Internet access.
- Protect
/infra/pgadmin/pgpassand/opt/pgadmin/.env; prefer a least-privilege database role. - Pin and validate the container image, and back up any pgAdmin state you choose to persist.
- pgAdmin can execute privileged SQL. Dropping a database, table, or data still requires separate target confirmation and a recent backup.
20 - PGWeb: Browser-based PostgreSQL Client
PGWeb Client
PGWeb is a browser-based PostgreSQL client. Pigsty includes a small Docker Compose template under app/pgweb; it publishes container port 8081 on host port 8886.
Open http://cli.pigsty when that portal entry resolves to the Infra node, or browse directly to http://10.10.10.10:8886. The public demo is http://cli.pigsty.cc.
PGWeb asks for a PostgreSQL connection URL. For example:
These strings contain public demonstration defaults and disable TLS. Use a least-privilege account, a non-default secret, and an appropriate sslmode for real deployments; do not expose an unauthenticated PGWeb container or database credentials to untrusted networks.

Shortcuts
The bundled Makefile provides:
The template currently uses the unpinned sosedoff/pgweb image. Pin an image digest or version in app/pgweb/docker-compose.yml when reproducible production deployment matters.
21 - PostgREST: Auto-Generated API
PostgREST exposes PostgreSQL schemas directly as REST APIs.
Pigsty provides the app/postgrest template, with default port 8884.
Quick Start
Default endpoints:
http://<IP>:8884http://api.pigsty(if ingress domain is configured)
Key Settings
Common .env parameters:
POSTGREST_DB_URI: database connection stringPOSTGREST_DB_SCHEMA: exposed schema (defaultpigsty)POSTGREST_DB_ANON_ROLE: anonymous rolePOSTGREST_JWT_SECRET: JWT secret
Swagger UI (Optional)
You can run Swagger UI separately to preview APIs:
Then open http://<IP>:8882.
Common Commands
References
- PostgREST docs: https://postgrest.org/en/stable/
- Pigsty template: https://github.com/pgsty/pigsty/tree/main/app/postgrest
22 - Electric: PostgreSQL Sync Engine
Electric is a PostgreSQL sync engine focused on efficiently delivering database changes to frontend and edge applications.
Pigsty provides the app/electric template (conf/app/electric.yml) to bootstrap database, container, and ingress settings in one flow.
Quick Start
Default endpoints:
http://<IP>:8002http://elec.pigsty(default domain in the template)
Metrics port defaults to 8003 (ELECTRIC_PROMETHEUS_PORT).
Key Settings
conf/app/electric.yml writes apps.electric.conf into /opt/electric/.env. Common parameters:
DATABASE_URL: PostgreSQL connection string used by Electric (replication privileges required)ELECTRIC_PORT: Electric HTTP port (default8002)ELECTRIC_PROMETHEUS_PORT: metrics port (default8003)ELECTRIC_INSECURE: can betruein dev; disable in prod and use proper secrets
Operations
References
- Electric website: https://electric-sql.com/
- Electric docs: https://electric-sql.com/docs
- Pigsty template: https://github.com/pgsty/pigsty/blob/main/conf/app/electric.yml
23 - Jupyter: Notebooks and Data Analysis
JupyterLab is an interactive notebook, terminal, and data-analysis environment. Pigsty v4.5.0 has two distinct deployment paths:
- The
VIBEmodule, managed by Ansible and systemd, for the complete v4.5.0 development sandbox. - The lightweight standalone
app/jupyterDocker Compose template documented here.
app/jupyter is not a default apps inventory entry, and data-directory preparation is a separate step. Do not assume that app.yml -e app=jupyter handles its directory ownership.

Quick Start
Generate a strong token with openssl rand -hex 32. The default port is 8888; open http://<host_ip>:8888.
lab.pigsty works only when that name is configured in infra_portal, Nginx, and DNS. The template default JUPYTER_TOKEN=pigsty is for local demonstrations only and must be replaced in production.
Current Template
The v4.5.0 .env defaults are:
Compose mounts host /data/jupyter at /home/jovyan/work and passes the token into the container. The latest tag changes upstream; production deployments should use a tested, explicit image tag or digest.
For SciPy, R, Julia, TensorFlow, PyTorch, or Spark, select another Jupyter Docker Stacks image listed in .env, while still pinning its version and validating architecture support.
Access PostgreSQL
Install the modern Psycopg driver and optional analysis libraries from a Jupyter terminal:
Do not store real passwords in notebooks. This example obtains the connection string through hidden input and reads system information only:
Use Pandas and SQLAlchemy with a system statistics view:
These examples access system views only. Obtain authorization from the data owner before reading application tables, and limit columns, predicates, and result size.
Persistence and Dependencies
Only /home/jovyan/work is mapped to /data/jupyter. The following are not persistent across container recreation by default:
- Python or Conda packages installed temporarily inside the container
- notebooks, configuration, and caches outside
work - the container’s own user state
For production, install dependencies through a pinned image, custom Dockerfile, or reproducible dependency file, and back up /data/jupyter separately. A persistent mount is not a backup.
Management Commands
From ~/pigsty/app/jupyter:
make clean removes the container but retains /data/jupyter. make purge recursively deletes /data/jupyter; it is an unrecoverable data-deletion operation and requires confirmation of the exact directory and a recent backup.
Security Checklist
- Use a strong random token, protect
.env, and do not disable authentication. - The default port mapping listens on the host network. Restrict sources with a firewall and prefer Nginx with valid HTTPS.
- A notebook can execute arbitrary code and access mounted files and databases. Grant only least-privilege database accounts and host directories.
- Pin and scan the image, and validate dependency upgrades reproducibly.
- Back up
/data/jupyterregularly and test restoration to a temporary directory.
Related Links
24 - PGLOG: PostgreSQL Log Analysis Application
PGLOG is a sample application included with Pigsty that uses the pglog.sample table in MetaDB as its data source. You simply need to load logs into this table, then access the related dashboard.
Pigsty provides convenient commands for pulling CSV logs and loading them into the sample table. On the meta node, the following shortcut commands are available by default:
Next, you can access the following links to view the sample log analysis interface.
- PGLOG Overview: Present the entire CSV log sample details, aggregated by multiple dimensions.
- PGLOG Session: Present detailed information about a specific connection in the log sample.
The catlog command pulls CSV database logs from a specific node for a specific date and writes to stdout
By default, catlog pulls logs from the current node for today. You can specify the node and date through parameters.
Using pglog and catlog together, you can quickly pull database CSV logs for analysis.
25 - NOAA ISD Global Weather Station Historical Data Query
If you have a database and don’t know what to do with it, why not try this open-source project: Vonng/isd
You can directly reuse the monitoring system Grafana to interactively browse sub-hourly meteorological data from nearly 30,000 surface weather stations over the past 120 years.
This is a fully functional data application that can query meteorological observation records from 30,000 global surface weather stations since 1901.
Project URL: https://github.com/Vonng/isd
Online Demo: https://demo.pigsty.io/d/isd-overview
Quick Start
Clone this repository
Prepare a PostgreSQL instance
The PostgreSQL instance should have the PostGIS extension enabled. Use the PGURL environment variable to pass database connection information:
Fetch and import ISD weather station metadata
This is a daily-updated weather station metadata file containing station longitude/latitude, elevation, name, country, province, and other information. Use the following command to download and import:
Fetch and import the latest isd.daily data
isd.daily is a daily-updated dataset containing daily observation data summaries from global weather stations. Use the following command to download and import.
Note that raw data downloaded directly from the NOAA website needs to be parsed before it can be loaded into the database, so you need to download or build an ISD data parser.
Load pre-parsed CSV dataset
The ISD Daily dataset has some dirty data and duplicate data. If you don’t want to manually parse and clean it, a stable pre-parsed CSV dataset is also provided here.
This dataset contains isd.daily data up to 2023-06-24. You can download and import it directly into PostgreSQL without needing a parser.
More Data
Two parts of the ISD dataset are updated daily: weather station metadata and the latest year’s isd.daily (e.g., the 2023 tarball).
You can use the following command to download and refresh these two parts. If the dataset hasn’t been updated, these commands won’t re-download the same data package:
You can also use the following commands to download and load isd.daily data for a specific year:
In addition to the daily summary isd.daily, ISD also provides more detailed sub-hourly raw observation records isd.hourly. The download and load methods are similar:
Data
Dataset Overview
ISD provides four datasets: sub-hourly raw observation data, daily statistical summary data, monthly statistical summary, and yearly statistical summary
| Dataset | Notes |
|---|---|
| ISD Hourly | Sub-hourly observation records |
| ISD Daily | Daily statistical summary |
| ISD Monthly | Not used, can be calculated from isd.daily |
| ISD Yearly | Not used, can be calculated from isd.daily |
Daily Summary Dataset
- Compressed package size 2.8GB (as of 2023-06-24)
- Table size 24GB, index size 6GB, total size approximately 30GB in PostgreSQL
- If timescaledb compression is enabled, total size can be compressed to 4.5 GB
Sub-hourly Observation Data
- Total compressed package size 117GB
- After loading into database: table size 1TB+, index size 600GB+, total size 1.6TB
Database Schema
Weather Station Metadata Table
Daily Summary Table
Sub-hourly Raw Observation Data Table
Parser
The raw data provided by NOAA ISD is in a highly compressed proprietary format that needs to be processed through a parser before it can be converted into database table format.
For the Daily and Hourly datasets, two parsers are provided here: isdd and isdh.
Both parsers take annual data compressed packages as input, produce CSV results as output, and work in pipeline mode as shown below:
User Interface
Several dashboards made with Grafana are provided here for exploring the ISD dataset and querying weather stations and historical meteorological data.
ISD Overview
Global overview with overall metrics and weather station navigation.

ISD Country
Display all weather stations within a single country/region.

ISD Station
Display detailed information for a single weather station, including metadata and daily/monthly/yearly summary metrics.

ISD Detail
Display raw sub-hourly observation metric data for a weather station, requires the isd.hourly dataset.

26 - WHO COVID-19 Pandemic Dashboard
Covid is a sample Applet included with Pigsty for visualizing the World Health Organization’s official pandemic data dashboard.
You can browse COVID-19 infection and death cases for each country and region, as well as global pandemic trends.
Overview
GitHub Repository: https://github.com/pgsty/pigsty-app/tree/master/covid
Online Demo: https://demo.pigsty.io/d/covid
Installation
Enter the application directory on the admin node and execute make to complete the installation.
Other sub-tasks:
27 - StackOverflow Global Developer Survey
Overview
GitHub Repository: https://github.com/pgsty/pigsty-app/tree/master/db
Online Demo: https://demo.pigsty.io/d/sf-survey
28 - DB-Engines Database Popularity Trend Analysis
Overview
GitHub Repository: https://github.com/pgsty/pigsty-app/tree/master/db
Online Demo: https://demo.pigsty.io/d/db-engine
29 - AWS & Aliyun Server Pricing
Overview
GitHub Repository: https://github.com/pgsty/pigsty-app/tree/master/cloud
Online Demo: https://demo.pigsty.io/d/ecs
Article: Analyzing Computing Costs: Has Aliyun Really Reduced Prices?
Data Source
Aliyun ECS pricing can be obtained as raw CSV data from Price Calculator - Pricing Details - Price Download.
Schema
Download Aliyun pricing details and import for analysis
Similarly for AWS EC2, you can download the price list from Vantage:
Visualization
Browse the interactive panels in the online demo: https://demo.pigsty.io/d/ecs




