SnappSnapp
  • Getting Started
  • Installation
  • Configuration
  • Styling
  • Introduction
  • Custom URLs
  • Authentication
  • Multi-Domain Architecture
  • Team Management
  • Third-Party Integrations
  • Metrics & Analytics
  • API Reference
  • English
  • Italiano
  • Getting Started
  • Installation
  • Configuration
  • Styling
  • Introduction
  • Custom URLs
  • Authentication
  • Multi-Domain Architecture
  • Team Management
  • Third-Party Integrations
  • Metrics & Analytics
  • API Reference
  • English
  • Italiano
  • Guide

    • Getting Started
    • Installation
    • Configuration
    • Styling

Docker Compose

Snapp can be deployed using Docker Compose. This setup runs the application and a PostgreSQL database with persistent storage.

Requirements

  • Docker
  • Docker Compose
  • PostgreSQL 14+

Basic setup

Create a docker-compose.yml file:

services:
  db:
    image: postgres:16
    container_name: snapp-db
    restart: always
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: password
      POSTGRES_DB: local
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U root -d local']
      interval: 5s
      timeout: 3s
      retries: 10
      start_period: 5s

  snapp:
    image: uraniadev/snapp:beta
    container_name: snapp
    ports:
      - '3000:3000'
    volumes:
      - ./data/settings.yaml:/app/config/settings.yaml
      # optional – uploaded user avatars
      - ./data/avatars:/app/config/avatars
      # optional – uploaded organization logos
      - ./data/logos:/app/config/logos
    environment:
      DATABASE_URL: postgres://root:password@db:5432/local
    depends_on:
      database:
        condition: service_healthy
    restart: unless-stopped

volumes:
  pgdata:

Why this matters

  • PostgreSQL exposes a health state via pg_isready
  • Snapp starts only after the database is reachable
  • Prevents race conditions during first boot and restarts
  • No custom wait scripts, no polling loops

Application configuration

Snapp requires a configuration file at: /app/config/settings.yaml

This file is optional. The application will generate a fallback.

Minimal settings.yaml

appname: Snapp

admin:
  - email: admin@example.org
    username: admin

hosts:
  - origin: https://example.org
    options:
      customRedirect: /dashboard

Configuration notes

  • admin

    • Admin users are bootstrapped at first startup
    • Passwords are auto-generated once
  • hosts

    • Defines allowed public origins
    • Each host can have independent options and behaviors

A full configuration reference is available in the Configuration section.

First startup

From the project directory:

docker compose up -d

On first run, Snapp will:

  1. Connect to PostgreSQL
  2. Run database migrations
  3. Bootstrap internal data
  4. Generate an admin password

The generated admin password is printed once in the container logs.

Retrieve it with:

docker logs snapp

Password recovery

After first startup, passwords are not regenerated, nor stored.

To enable password recovery:

  • Configure an SMTP provider in settings.yaml
  • Restart the container

Without SMTP configured, the email will be rendered as logs.

Updating Snapp

To update to a newer image:

docker compose pull
docker compose up -d

Database migrations are applied automatically if required.

Notes

  • Snapp is self-hosted and stateful

  • Back up:

    • PostgreSQL volume
    • settings.yaml
    • uploaded assets (avatars, logos)
  • The beta image may introduce breaking changes

Prev
Getting Started
Next
Configuration