JFrog Artifactory OSS + PostgreSQL
Open source artifact repository manager.
Overview
JFrog Artifactory OSS is an open-source universal artifact repository manager that serves as a central hub for storing, organizing, and distributing binary artifacts throughout the software development lifecycle. Originally launched by JFrog in 2008, Artifactory has become the industry standard for artifact management, supporting over 30 package types including Maven, Gradle, npm, Docker, NuGet, and PyPI. The OSS version provides essential repository management capabilities for teams looking to centralize their binary artifact storage without the advanced features of the Pro and Enterprise versions. This stack combines Artifactory OSS with PostgreSQL as a robust, ACID-compliant database backend and NGINX as a high-performance reverse proxy. PostgreSQL replaces the default Derby database to provide better performance, scalability, and data integrity for production environments, while NGINX handles SSL termination, load balancing, and serves as a buffer against connection spikes. This architecture creates a production-ready artifact management platform that can handle substantial traffic loads and provides the reliability needed for continuous integration and deployment pipelines. This configuration is ideal for development teams, DevOps engineers, and organizations that need centralized artifact management with enterprise-grade database reliability but don't require the advanced features of commercial Artifactory versions. The combination delivers the performance benefits of PostgreSQL's advanced indexing and query optimization alongside NGINX's event-driven architecture, making it suitable for teams managing hundreds of artifacts daily across multiple repositories and package formats.
Key Features
- Universal repository support for 30+ package types including Maven, Gradle, npm, Docker, NuGet, and PyPI with native metadata handling
- PostgreSQL backend providing ACID compliance, advanced indexing, and superior query performance compared to default Derby database
- NGINX reverse proxy with HTTP/2 support, SSL termination, and connection pooling for improved client performance
- Virtual and remote repository aggregation allowing unified access to multiple artifact sources through single endpoints
- Advanced artifact search capabilities with property-based filtering, checksum verification, and metadata querying
- REST API for automated artifact deployment, retrieval, and repository management with comprehensive CLI tools
- Built-in security scanning for open-source vulnerabilities in uploaded artifacts with detailed reporting
- Flexible permission system with repository-level access control and user group management
Common Use Cases
- 1Centralizing Maven and Gradle artifacts for Java development teams with automated dependency resolution
- 2Managing Docker images for containerized applications with registry federation and vulnerability scanning
- 3Hosting private npm packages alongside public registry proxying for Node.js development workflows
- 4Storing release binaries and deployment artifacts for CI/CD pipelines with automated retention policies
- 5Creating development team artifact sharing hub with role-based access control and audit trails
- 6Implementing artifact promotion workflows between development, staging, and production repositories
- 7Building on-premises artifact caching proxy to reduce external dependency download times and bandwidth
Prerequisites
- Minimum 4GB RAM and 2 CPU cores recommended for production workloads handling moderate artifact traffic
- 20GB+ free disk space for artifact storage, with additional space planning based on binary retention requirements
- Ports 80, 443, 8081, and 8082 available for NGINX proxy and Artifactory service binding
- Basic understanding of repository management concepts including virtual, local, and remote repository types
- Familiarity with NGINX configuration for SSL certificate installation and custom domain setup
- PostgreSQL administration knowledge for backup configuration and performance tuning
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 artifactory: 3 image: releases-docker.jfrog.io/jfrog/artifactory-oss:latest4 environment: 5 - JF_SHARED_DATABASE_TYPE=postgresql6 - JF_SHARED_DATABASE_DRIVER=org.postgresql.Driver7 - JF_SHARED_DATABASE_URL=jdbc:postgresql://postgres:5432/artifactory8 - JF_SHARED_DATABASE_USERNAME=${POSTGRES_USER}9 - JF_SHARED_DATABASE_PASSWORD=${POSTGRES_PASSWORD}10 volumes: 11 - artifactory-data:/var/opt/jfrog/artifactory12 ports: 13 - "8082:8082"14 - "8081:8081"15 depends_on: 16 - postgres17 networks: 18 - artifactory-network19 restart: unless-stopped2021 postgres: 22 image: postgres:1523 environment: 24 - POSTGRES_USER=${POSTGRES_USER}25 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}26 - POSTGRES_DB=artifactory27 volumes: 28 - postgres-data:/var/lib/postgresql/data29 networks: 30 - artifactory-network31 restart: unless-stopped3233 nginx: 34 image: nginx:alpine35 volumes: 36 - ./nginx.conf:/etc/nginx/nginx.conf:ro37 ports: 38 - "80:80"39 - "443:443"40 depends_on: 41 - artifactory42 networks: 43 - artifactory-network44 restart: unless-stopped4546volumes: 47 artifactory-data: 48 postgres-data: 4950networks: 51 artifactory-network: 52 driver: bridge.env Template
.env
1# Artifactory2POSTGRES_USER=artifactory3POSTGRES_PASSWORD=secure_postgres_password45# Default admin: admin / passwordUsage Notes
- 1Web UI at http://localhost:8082
- 2Default login: admin / password
- 3Configure repositories after login
- 4Supports Maven, Gradle, npm, Docker
- 5OSS version limited to certain types
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
artifactory
artifactory:
image: releases-docker.jfrog.io/jfrog/artifactory-oss:latest
environment:
- JF_SHARED_DATABASE_TYPE=postgresql
- JF_SHARED_DATABASE_DRIVER=org.postgresql.Driver
- JF_SHARED_DATABASE_URL=jdbc:postgresql://postgres:5432/artifactory
- JF_SHARED_DATABASE_USERNAME=${POSTGRES_USER}
- JF_SHARED_DATABASE_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- artifactory-data:/var/opt/jfrog/artifactory
ports:
- "8082:8082"
- "8081:8081"
depends_on:
- postgres
networks:
- artifactory-network
restart: unless-stopped
postgres
postgres:
image: postgres:15
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=artifactory
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- artifactory-network
restart: unless-stopped
nginx
nginx:
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "80:80"
- "443:443"
depends_on:
- artifactory
networks:
- artifactory-network
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 artifactory:5 image: releases-docker.jfrog.io/jfrog/artifactory-oss:latest6 environment:7 - JF_SHARED_DATABASE_TYPE=postgresql8 - JF_SHARED_DATABASE_DRIVER=org.postgresql.Driver9 - JF_SHARED_DATABASE_URL=jdbc:postgresql://postgres:5432/artifactory10 - JF_SHARED_DATABASE_USERNAME=${POSTGRES_USER}11 - JF_SHARED_DATABASE_PASSWORD=${POSTGRES_PASSWORD}12 volumes:13 - artifactory-data:/var/opt/jfrog/artifactory14 ports:15 - "8082:8082"16 - "8081:8081"17 depends_on:18 - postgres19 networks:20 - artifactory-network21 restart: unless-stopped2223 postgres:24 image: postgres:1525 environment:26 - POSTGRES_USER=${POSTGRES_USER}27 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}28 - POSTGRES_DB=artifactory29 volumes:30 - postgres-data:/var/lib/postgresql/data31 networks:32 - artifactory-network33 restart: unless-stopped3435 nginx:36 image: nginx:alpine37 volumes:38 - ./nginx.conf:/etc/nginx/nginx.conf:ro39 ports:40 - "80:80"41 - "443:443"42 depends_on:43 - artifactory44 networks:45 - artifactory-network46 restart: unless-stopped4748volumes:49 artifactory-data:50 postgres-data:5152networks:53 artifactory-network:54 driver: bridge55EOF5657# 2. Create the .env file58cat > .env << 'EOF'59# Artifactory60POSTGRES_USER=artifactory61POSTGRES_PASSWORD=secure_postgres_password6263# Default admin: admin / password64EOF6566# 3. Start the services67docker compose up -d6869# 4. View logs70docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/artifactory-oss/run | bashTroubleshooting
- Artifactory fails to start with database connection errors: Verify POSTGRES_USER and POSTGRES_PASSWORD environment variables match between services and ensure PostgreSQL is fully initialized before Artifactory startup
- Web UI shows 502 Bad Gateway errors: Check that Artifactory service is running on port 8082 and NGINX upstream configuration correctly points to artifactory:8082 internal address
- PostgreSQL container exits with permission denied errors: Ensure postgres-data volume has correct ownership (999:999) or initialize with proper user mapping using init containers
- Artifact uploads fail with insufficient storage errors: Monitor artifactory-data volume usage and implement cleanup policies for old artifacts or increase allocated storage
- Repository resolution extremely slow: Tune PostgreSQL memory settings in postgresql.conf, increase shared_buffers and work_mem based on available system RAM
- Docker registry push/pull operations timeout: Increase NGINX client_max_body_size directive and proxy timeout values to accommodate large container image transfers
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
artifactorypostgresqlnginx
Tags
#artifactory#jfrog#repository#artifacts#binary-management
Category
DevOps & CI/CDAd Space
Shortcuts: C CopyF FavoriteD Download