Skip to main content

Nexus Repository Application Guide

Nexus Repository is a universal artifact repository manager supporting Maven, npm, Docker, PyPI, and many other formats.

Status: Available (Not Yet Tested)


Quick Reference

PropertyValue
Application IDnexus
CategoryArtifact Registry
Default Imagesonatype/nexus3:latest
Application Port8081
Default CPU2048 (Fargate)
Default Memory4096 MB (Fargate)
Default Instancet3.medium (EC2)
Health Check Path/
Health Check Grace300 seconds
Supports FargateYes
Supports EC2Yes
OIDC SupportNo (Nexus Pro feature)
Database RequiredNo (embedded OrientDB)

Capabilities

  • Universal repository manager
  • Maven, Gradle, npm, NuGet, PyPI, RubyGems, Docker
  • Proxy repositories (cache remote artifacts)
  • Hosted repositories (store internal artifacts)
  • Group repositories (aggregate multiple repos)
  • Component analysis and security
  • REST API
  • Blob stores (local, S3)
  • Repository health check

Optional Ports

PortProtocolDirectionFeature FlagDescription
5000TCPInboundenableDockerRegistryDocker Registry (group)
5001TCPInboundenableDockerRegistryDocker Registry (hosted)
5002TCPInboundenableDockerRegistryDocker Registry (proxy)

Example enabling Docker registry:

{
"enableDockerRegistry": true
}

Authentication

Supported Auth Modes

ModeStatusDescription
alb-oidcAvailableALB-level authentication
noneAvailableLocal accounts only

Note: Native OIDC/SAML requires Nexus Pro license.


Environment Variables

VariableDescription
INSTALL4J_ADD_VM_PARAMSJVM memory tuning

Storage Configuration

Container (Fargate)

PropertyValue
Data Path/nexus-data
EFS Path/nexus
Volume NamenexusData
Container User200:200
EFS Permissions755

EC2

PropertyValue
EBS Device/dev/xvdh
Data Path/opt/nexus-data
Log Paths/opt/nexus-data/log/nexus.log, /opt/nexus-data/log/audit/audit.log

Deployment Context Examples

Development

{
"stackName": "Nexus-Dev",
"applicationId": "nexus",
"applicationName": "Nexus Dev",
"description": "Nexus development repository",
"environment": "development",

"runtime": "fargate",
"securityProfile": "dev",
"topology": "application-service",

"networkMode": "public-no-nat",
"region": "us-east-1",

"authMode": "none",

"cpu": 2048,
"memory": 4096,

"enableMonitoring": true,
"logRetentionDays": "7"
}

Production - With Docker Registry

{
"stackName": "Nexus-Production",
"applicationId": "nexus",
"applicationName": "Nexus Repository",
"description": "Production artifact repository",
"environment": "production",

"runtime": "ec2",
"securityProfile": "production",
"topology": "application-service",

"domain": "example.com",
"subdomain": "nexus",
"enableSsl": true,

"networkMode": "private-with-nat",
"region": "us-east-1",

"authMode": "alb-oidc",
"cognitoAutoProvision": true,
"cognitoDomainPrefix": "nexus-prod-yourcompany",
"cognitoMfaEnabled": true,

"instanceType": "t3.large",
"minInstanceCapacity": 1,
"maxInstanceCapacity": 2,

"enableDockerRegistry": true,

"complianceFrameworks": "SOC2",
"awsConfigEnabled": true,
"guardDutyEnabled": true,
"wafEnabled": true,

"enableMonitoring": true,
"enableEncryption": true,
"logRetentionDays": "730",
"retainStorage": true
}

Cost estimate: ~$350/month


Compliance Use Cases

  • SOC2: Software bill of materials (SBOM) tracking
  • PCI-DSS: Secure artifact storage for payment processing
  • HIPAA: Audit trail for healthcare application deployments

Post-Deployment Tasks

  1. Get Admin Password:
    # Fargate
    aws ecs execute-command --cluster CLUSTER --task TASK --container nexus \
    --command "cat /nexus-data/admin.password"

    # EC2
    ssh ec2-user@instance 'cat /opt/nexus-data/admin.password'
  2. Change Admin Password: First login prompts password change
  3. Create Repositories: Maven, npm, Docker as needed
  4. Configure Blob Stores: S3 for scalable storage
  5. Set Up Cleanup Policies: Manage storage growth