
Self-hosting Nexus Repository the easy way
Yulei ChenSonatype Nexus Repository is the most widely used open-source artifact repository manager. It supports Docker, Maven, npm, PyPI, NuGet, and dozens of other package formats out of the box. Many teams rely on hosted solutions or manage their own servers, but self-hosting gives you full control over your artifacts, no user limits, and no per-seat pricing.
Sliplane makes self-hosting Nexus painless. With one-click deployment, you get a running Nexus instance in minutes - no server setup, no reverse proxy config, and no infrastructure to maintain.
Prerequisites
Before deploying, ensure you have a Sliplane account (free trial available).
Quick start
Sliplane provides one-click deployment with presets.
- Click the deploy button above
- Select a project
- Select a server (If you just signed up you get a 48-hour free trial server)
- Click Deploy!
About the preset
The one-click deploy above uses Sliplane's Nexus preset. Here is what it includes:
- Sonatype Nexus 3 image (
sonatype/nexus3) with a specific version tag for stability - Persistent storage mounted to
/nexus-dataso your repositories, configurations, and artifacts survive restarts - Random admin password disabled (
NEXUS_SECURITY_RANDOMPASSWORD=false) so you can log in with the default credentials right away - JVM tuned for 2 GB servers with heap and direct memory set to 512 MB each
Next steps
Once Nexus is running on Sliplane, open it using the domain Sliplane provided (e.g. nexus-xxxx.sliplane.app). Nexus takes about 1-2 minutes to fully start, so give it a moment if you see a loading screen.
Default credentials
The preset disables random password generation, so you can log in with:
- Username:
admin - Password:
admin123
Change this password immediately after your first login. Go to the user icon in the top-right corner, click Change password, and set something secure.
Environment variables
Here are some useful environment variables you can customize in the Sliplane service settings:
| Variable | Description | Default |
|---|---|---|
NEXUS_SECURITY_RANDOMPASSWORD | Set to true to generate a random admin password on first boot (stored in /nexus-data/admin.password) | false |
INSTALL4J_ADD_VM_PARAMS | JVM options for heap, direct memory, and other flags | -Xms512m -Xmx512m -XX:MaxDirectMemorySize=512m |
If you have a larger server (4 GB+ RAM), you can increase the JVM memory settings for better performance. For example: -Xms1200m -Xmx1200m -XX:MaxDirectMemorySize=1200m -Djava.util.prefs.userRoot=/nexus-data/javaprefs.
Logging
Nexus logs to STDOUT by default, which works well with Sliplane's built-in log viewer. You can check the logs directly in the Sliplane dashboard. For more on working with container logs, see our guide on how to use Docker logs.
Troubleshooting
If Nexus does not start or shows out-of-memory errors, the JVM memory settings may be too high for your server. Lower the -Xms, -Xmx, and -XX:MaxDirectMemorySize values in the INSTALL4J_ADD_VM_PARAMS environment variable.
If you forgot the admin password and had NEXUS_SECURITY_RANDOMPASSWORD set to true, the generated password is stored in /nexus-data/admin.password. You can read it using Sliplane's terminal feature or by checking the service logs on first boot.
Cost comparison
You can also self-host Nexus Repository with other cloud providers. Here is a pricing comparison for the most common ones:
| Provider | vCPU | RAM | Disk | Monthly Cost | Note |
|---|---|---|---|---|---|
| Sliplane | 2 | 2 GB | 40 GB | €9 (~$10.65) | Flat rate, 1 TB bandwidth, SSL included |
| Fly.io | 2 | 2 GB | 40 GB | ~$18 | Disk and bandwidth billed separately |
| Render | 1 | 2 GB | 40 GB | ~$35 | 100 GB bandwidth, Disk billed separately |
| Railway | 2 | 2 GB | 40 GB | ~$67 + $20 plan | Pro plan floor, usage-based, bandwidth billed separately |
Click here to see how these numbers were calculated.
(Assuming an always-on instance running 730 hrs/month)
- Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
- Fly.io:
shared-cpu-2x2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU). - Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
- Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.
Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.
FAQ
What can I host on Nexus Repository?
Nexus supports a wide range of package formats including Docker, Maven, npm, PyPI, NuGet, Helm, Go, apt, yum, and more. You can use it as a private registry for your team's artifacts, a proxy cache to speed up dependency downloads, or both at the same time.
How do I configure Nexus as a Docker registry?
After logging in, go to Server administration (gear icon) > Repositories > Create repository and choose docker (hosted). Set an HTTP connector port (e.g. 5000), then configure your Docker client to push and pull from your Nexus instance. Note that Docker registry access requires an additional port, which you can expose through Sliplane's service settings.
How do I update Nexus?
Change the image tag in your Sliplane service settings to the new version and redeploy. Check Docker Hub for the latest stable version. Nexus handles database migrations automatically on startup.
Are there alternatives to Nexus Repository?
Yes. JFrog Artifactory is a popular commercial alternative with a free tier. Gitea and Forgejo include built-in package registries that cover Docker, npm, Maven, and more. For Docker-only registries, the open-source Distribution (formerly Docker Registry) is a lightweight option.
How much disk space does Nexus need?
It depends on how many artifacts you store. Nexus itself needs about 1-2 GB for the application, and the rest goes to your repositories. The 40 GB disk included with Sliplane's base plan is plenty for most small-to-medium teams. If you need more, you can upgrade your server or use Hetzner Object Storage as a blob store backend.