| Crates.io | doggygallery |
| lib.rs | doggygallery |
| version | 0.5.3 |
| created_at | 2025-10-31 19:59:41.343709+00 |
| updated_at | 2025-11-14 21:03:27.675221+00 |
| description | A secure, beautiful media gallery server with TLS 1.3, HTTP Basic Auth, automatic light/dark mode, lazy loading, and pagination |
| homepage | https://github.com/meltingscales/DoggyGallery |
| repository | https://github.com/meltingscales/DoggyGallery |
| max_upload_size | |
| id | 1910676 |
| size | 898,308 |
A secure, fast, and beautiful media gallery server built with Rust. Serve your images and videos over HTTPS with HTTP Basic Authentication.
Links:
/docs# Install directly from crates.io
cargo install doggygallery
# Run from anywhere
doggygallery --help
# Install directly from GitHub
cargo install --git https://github.com/meltingscales/DoggyGallery
# Run from anywhere
doggygallery --help
# Clone the repository
git clone https://github.com/meltingscales/DoggyGallery
cd DoggyGallery
# Build the project
cargo build --release
# Binary will be at: ./target/release/doggygallery
# Or use just
just build
The easiest way to run DoggyGallery in development mode is with the provided just recipes:
# Generate self-signed certificates and run with default settings
just dev
# Run with a custom media directory
just dev-custom /path/to/your/media
This will:
certs/media/ directory if it doesn't existhttps://127.0.0.1:7833 (port 7833 = "RUFF" on phone keypad! 🐕)admin/admin./target/release/doggygallery \
--cert /path/to/cert.pem \
--key /path/to/key.pem \
--media-dir /path/to/media \
--username your_username \
--password your_secure_password \
--host 0.0.0.0 \
--port 7833
./target/release/doggygallery \
--self-signed-certs-on-the-fly \
--media-dir /path/to/media \
--username your_username \
--password your_password \
--host 127.0.0.1 \
--port 7833
Warning: Self-signed certificates are NOT suitable for production! Use proper certificates from a trusted CA like Let's Encrypt.
Options:
--cert <PATH> Path to TLS certificate file
--key <PATH> Path to TLS private key file
--self-signed-certs-on-the-fly Generate self-signed certificates on-the-fly
--media-dir <PATH> Directory containing media files to serve
--username <USERNAME> Username for HTTP Basic Authentication
--password <PASSWORD> Password for HTTP Basic Authentication
--host <HOST> Host to bind to [default: 0.0.0.0]
--port <PORT> Port to listen on [default: 7833]
-h, --help Print help
All options can also be set via environment variables with the DOGGYGALLERY_ prefix:
export DOGGYGALLERY_CERT=/path/to/cert.pem
export DOGGYGALLERY_KEY=/path/to/key.pem
export DOGGYGALLERY_MEDIA_DIR=/path/to/media
export DOGGYGALLERY_USERNAME=admin
export DOGGYGALLERY_PASSWORD=secure_password
export DOGGYGALLERY_HOST=0.0.0.0
export DOGGYGALLERY_PORT=7833
export DOGGYGALLERY_SELF_SIGNED=true
./target/release/doggygallery
# Using just
just gen-certs
# Or manually with OpenSSL
mkdir -p certs
openssl req -x509 -newkey rsa:4096 -nodes \
-keyout certs/key.pem \
-out certs/cert.pem \
-days 365 \
-subj "/C=US/ST=State/L=City/O=DoggyGallery/CN=localhost"
For production, use Let's Encrypt with Certbot:
# Install certbot
sudo apt-get install certbot
# Generate certificate
sudo certbot certonly --standalone -d yourdomain.com
# Certificates will be in:
# /etc/letsencrypt/live/yourdomain.com/fullchain.pem
# /etc/letsencrypt/live/yourdomain.com/privkey.pem
just # List all available commands
just build # Build for production
just dev # Run development server
just dev-custom <DIR> # Run with custom media directory
just test # Run tests
just check # Run linter and type checks
just fmt # Format code
just gen-certs # Generate self-signed certificates
just audit # Security audit of dependencies
just trivy-fs # Scan for vulnerabilities
. are not served--self-signed-certs-on-the-fly option is for development onlyDoggyGallery is built with modern Rust technologies:
DoggyGallery/
├── src/
│ ├── main.rs # Application entry point
│ ├── config.rs # Configuration and CLI parsing
│ ├── auth.rs # Authentication middleware
│ ├── handlers.rs # HTTP request handlers
│ ├── models.rs # Data models
│ ├── templates.rs # Template definitions
│ └── tls.rs # TLS configuration
├── templates/
│ └── gallery.html # Gallery UI template
├── Cargo.toml # Dependencies
├── justfile # Build automation
└── README.md # This file
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.