Today's Deep-Dive: Verdaccio
Ep. 136

Today's Deep-Dive: Verdaccio

Episode description

This episode introduces Verdaccio, a lightweight Node.js private proxy registry designed to help developers manage their software packages efficiently. It acts as a personal warehouse for digital tools, allowing users to store private packages and cache public ones, ensuring quick access and reliability. Verdaccio requires no complex setup, making it beginner-friendly, and supports popular JavaScript package managers like NPM, Yarn, and PNPM. It simplifies the management of dependencies and provides a centralized entry point for different software sources.

Key features include caching for faster access, the ability to modify and publish packages, and user management for secure access. Verdaccio is suitable for various users, from individuals to large teams, and is particularly useful in testing environments due to its lightweight nature. The installation process is straightforward, and users can quickly set it up to run locally. The page emphasizes the importance of security and offers resources for support and community engagement. Overall, Verdaccio streamlines the software development process by providing organization and control over dependencies.

Download transcript (.srt)
0:00

Have you ever felt like you're building

0:01

this awesome thing with software,

0:03

but all your tools are just kinda scattered

0:05

all over the place?

0:06

Yeah, I know exactly what you mean.

0:07

You're like pulling bits and pieces from here and there.

0:09

It's a mess.

0:10

It gets confusing really fast.

0:12

For sure.

0:13

Well today, we're diving into something

0:14

that can help you organize all that chaos.

0:17

Ooh, that sounds good.

0:18

And keep your software building blocks

0:21

right where you need them.

0:23

I like that, like Legos all organized nice and neat.

0:25

Exactly.

0:26

Yeah.

0:27

We're talking about Verdaccio.

0:28

Think of it as your own little software package warehouse.

0:31

Ah, that's a great analogy.

0:33

A place to keep and manage all those digital tools

0:35

you need for your projects.

0:37

Before we get into it though,

0:38

big thanks to Safe Server for supporting this deep dive.

0:42

They provide hosting for Verdaccio

0:44

and offer digital transformation consulting.

0:47

I didn't know that.

0:48

You can find more about them at www.safeserver.de.

0:52

Cool.

0:53

So back to Verdaccio.

0:55

Our mission today is pretty straightforward.

0:57

Okay.

0:58

So you explain what Verdaccio is in simple terms

1:01

and why it might be super useful for you.

1:03

Makes sense.

1:04

Especially if you're new to software development

1:06

or working on projects

1:07

that use multiple different pieces of software.

1:10

Yeah, those dependencies can be a real headache.

1:12

Exactly.

1:13

To get to the bottom of it,

1:14

we'll be looking at Verdaccio's own documentation

1:17

and their GitHub page.

1:19

Great resources.

1:20

Let's jump in.

1:21

All right, so first things first.

1:23

What exactly is Verdaccio?

1:25

Well, technically it's described as a lightweight

1:28

node.js private proxy registry.

1:32

Okay, so a lot of technical terms

1:34

all smashed together there.

1:35

Can we break that down a little?

1:36

Absolutely, let's start with lightweight.

1:38

Basically it means it's easy to get up and running.

1:41

I like easy.

1:41

Doesn't require a big complex database setup

1:44

right out of the gate.

1:45

Think of it like starting small and simple.

1:47

Perfect for beginners.

1:48

Nobody wants to be overwhelmed with configuration

1:51

before they even get started.

1:52

Exactly.

1:53

Then we have Node.js.

1:55

That's a technology that lets developers use JavaScript

1:58

for backend stuff.

1:59

Right, JavaScript, the language of the web.

2:02

Exactly.

2:03

And because so many modern web tools

2:05

rely on JavaScript and this thing called NPM

2:08

to manage their different parts.

2:09

NPM, as in the package manager.

2:11

Yes, that one.

2:13

So Rodaccio being built with Node.js

2:15

fits right into that ecosystem.

2:17

It speaks the same language.

2:18

Exactly.

2:19

OK.

2:20

And private, I'm guessing that's about keeping things

2:22

for ourselves, right?

2:23

Precisely.

2:24

Private means you can store your own software packages,

2:28

like code you've written specifically

2:29

for your company or a project.

2:32

And you keep all that in your own Rodaccio warehouse

2:35

separate from the public internet.

2:36

So it's like having your own little private library just

2:39

for your team's books.

2:40

I like that analogy.

2:42

Yes.

2:42

And then finally, we have proxy registry.

2:45

All right, that one sounds a bit more complicated.

2:47

It's not too bad.

2:48

Think of a registry in the software world

2:50

as a giant catalog.

2:52

Where all sorts of software packages are listed.

2:54

You can find what you need there.

2:56

The biggest public one for JavaScript is called npmjs.org.

3:00

Right, I've definitely seen that name floating around.

3:02

Yeah, so Rodaccio acts as a proxy,

3:05

which means it sits between you and these public registries.

3:08

Kind of like a middleman.

3:09

Exactly.

3:10

When you need a software package, you ask Rodaccio first.

3:13

Like a personal shopper?

3:14

It checks if you have that package stored

3:17

in your own private warehouse.

3:19

And if not, it goes out to that public registry.

3:21

The big public library.

3:22

Gets the package for you and brings it back.

3:24

Oh, I see.

3:25

That's pretty clever.

3:26

So it can help me find stuff, whether it's my own tools

3:28

or those public ones.

3:29

Exactly.

3:30

One stop shop.

3:31

That makes a lot of sense.

3:33

The documentation also mentions something

3:35

called zero config required.

3:38

Is that as amazing as it sounds?

3:40

Oh, yeah.

3:40

That's a big plus.

3:42

Rodaccio is designed to be super easy to get started with.

3:45

It comes with its own small, built-in storage.

3:48

That's awesome.

3:48

So as soon as you install it, you

3:50

don't need to worry about setting up any additional databases

3:52

or complex systems.

3:54

That's a huge time saver.

3:55

You can just start using it right away.

3:56

Precisely.

3:58

And speaking of getting things quickly,

3:59

since Rodaccio is acting as this proxy registry,

4:03

how does it handle actually getting those public packages?

4:05

So imagine this.

4:06

When Rodaccio goes out to a public registry like npmjs.org

4:11

and fetches a package you need, it also makes a copy of it.

4:15

And stores that copy locally in your warehouse,

4:18

this is called caching.

4:20

So basically it's like holding onto a spare just in case.

4:23

Exactly.

4:24

So the next time you need that same package,

4:26

Rodaccio doesn't have to go out to the internet again.

4:28

It can just hand you that local copy it already has.

4:31

And that speeds things up.

4:33

Significantly.

4:34

Especially if you or your team frequently

4:37

use the same packages over and over again.

4:39

So it's like having the most popular books

4:41

from the library already on your shelf at home.

4:43

Exactly.

4:44

No need to go all the way to the library every time.

4:47

Love it.

4:48

But there's also another really useful aspect

4:50

to this caching thing.

4:51

Great.

4:52

Oh, yeah.

4:52

The GitHub page actually talks about how sometimes packages

4:56

on public registries can just disappear.

4:58

Like poof, gone.

4:59

Or they might have issues.

5:00

So things break.

5:01

Things can break.

5:03

But if Rodaccio already has a cached copy, you're protected.

5:07

Your project won't suddenly stop working because a package

5:10

vanished from the internet.

5:12

That's a huge relief.

5:13

It's like having a backup plan for your software tools.

5:15

Exactly.

5:16

Peace of mind. I like that.

5:18

So just to recap, we've got private packages.

5:21

It acts as a go-between for other registries

5:24

and keeps copies of things just in case.

5:27

Those are the main things Rodaccio does right.

5:29

That's a great summary.

5:30

So why would someone actually use Rodaccio?

5:32

Well, there are a few really compelling reasons.

5:35

The first, as we already discussed,

5:37

is for private packages.

5:39

If you're working on code that's specific to your company

5:42

or a project and you want to keep it under wraps.

5:45

Makes sense.

5:46

Rodaccio lets you use familiar tools like NPM

5:50

to manage and share that code privately.

5:53

Only within your team.

5:54

Exactly.

5:55

It's like having your own app store just

5:56

for your internal tools.

5:57

Yeah.

5:57

I could see how that'd be really useful for keeping

5:59

sensitive work secure.

6:00

Absolutely.

6:01

And you also mentioned earlier that it can connect

6:03

to other registries too.

6:04

Right.

6:05

Why is that helpful?

6:06

So sometimes organizations might be

6:08

using different sources for their software packages.

6:11

Maybe they have some internal private registries in addition

6:14

to those big public ones.

6:16

Verdaccio can act like a single entry point

6:19

to all of these different places.

6:21

So I don't have to go hunting around for stuff.

6:23

Exactly.

6:23

Instead of your developers having

6:25

to configure their systems to look in multiple locations,

6:29

they can just point everything to Verdaccio.

6:31

And it takes care of the rest.

6:33

It simplifies things dramatically.

6:34

One central hub for everything.

6:36

Much easier to manage.

6:38

For sure.

6:38

We also talked about caching and how it speeds things up

6:41

and provides that extra safety net.

6:43

Right.

6:43

Any other reasons to use Verdaccio?

6:45

Yes.

6:46

Actually, there's one more pretty neat use case.

6:49

Imagine you find a small bug in a public software package.

6:54

Or you want to tweak it slightly before the original creators

6:57

release an update.

6:58

OK.

6:59

With Verdaccio, you can actually download that package,

7:02

make your change, and then publish your modified version

7:05

locally.

7:06

Wow.

7:07

That's pretty powerful.

7:08

You're in control.

7:08

You have the power.

7:09

You don't have to wait for someone else to fix it for you.

7:12

Exactly.

7:13

So it seems like Verdaccio gives you a lot more control

7:15

over your software dependencies.

7:16

It does.

7:17

But who actually uses Verdaccio?

7:19

Is this just a tool for big companies,

7:21

or can anyone benefit from it?

7:23

Definitely not just for big companies.

7:25

It's used by a really diverse range of people and projects,

7:28

because it supports all the popular JavaScript package

7:31

managers, like NPM Yarn and PMPM.

7:33

So pretty much anyone working with JavaScript.

7:35

Yeah, it fits right in.

7:37

And for teams that use tools like Docker for packaging

7:39

applications and Kubernetes for managing them,

7:42

more advanced stuff.

7:43

Ferdatio has special support that

7:44

makes integration a breeze.

7:46

So it can scale with you as your projects grow.

7:49

Absolutely.

7:50

Now, I was looking at the documentation,

7:52

and there was a really long list of well-known projects

7:56

and companies that use Ferdatio.

7:58

I was really surprised by some of the names on there.

8:00

It is quite a list.

8:01

It includes projects like Inksp and PMPM itself, Vendor

8:05

Create React app.

8:06

That's a popular one.

8:07

It is.

8:08

A lot of people use that to get started with web development.

8:11

Also, Angular CLI Storybook, Grafana, Gatsby, Babel, DOT,

8:15

JS, DocuSource, Vue, CLI, UPI, and many others.

8:18

It's a really wide range.

8:20

Big names, small names, everything in between.

8:22

It really shows that Ferdatio is a trusted and reliable tool

8:25

used across different areas of software development.

8:28

And it's not just for building software.

8:30

It also mentions some projects use Ferdatio

8:32

for testing their software.

8:34

Oh, yeah.

8:35

That's another great use case, because Ferdatio

8:37

is so lightweight and can be set up quickly.

8:39

It's perfect for creating these isolated testing environments.

8:42

Precisely.

8:43

Projects like Create React App, Mozilla Neutrino, PNPM,

8:47

Storybook, Babel Dot, JS, Angular, Clive, DocuSaurus.

8:51

They all use it to check how their software interacts

8:54

with different package versions without messing

8:56

with their main development setup.

8:58

Right.

8:58

You don't want to break things while you're testing.

8:59

Exactly.

9:00

And it helps them ensure their testing

9:02

is consistent and reliable.

9:04

So Ferdatio helps guarantee that their software will work

9:06

correctly no matter what.

9:08

In a controlled environment, yes.

9:09

Very cool.

9:10

So let's say someone listening to this is intrigued

9:12

and wants to give Ferdatio a try.

9:14

How do they actually get started?

9:16

Well, the first thing you need is

9:17

to have Node.js version 18 or newer installed

9:21

on your computer.

9:21

OK.

9:22

Node.js version 18 or newer.

9:25

Got it.

9:25

What's next?

9:26

You can install Ferdatio using the same tool

9:29

you use for managing other JavaScript packages.

9:31

Usually, this would be npm.

9:33

Makes sense.

9:33

The command is npm install dachio-ferdatio at next 8.

9:39

OK.

9:40

npm install dachio-ferdatio at next 8.

9:42

The dashi indicates you're installing it globally,

9:44

so you can run it from anywhere on your system.

9:46

OK.

9:47

And at next 8 ensures you're getting the latest

9:49

and greatest version.

9:50

Now, if you prefer yarn, the command

9:52

would be yarn global add-ferdatio at next 8.

9:56

And for pnpm, it's pnpm i-g-ferdatio at next 8.

10:00

So you've got options.

10:02

Exactly.

10:02

Choose your weapon.

10:03

What if I'm a Docker person?

10:06

For Docker enthusiasts, there's an official image

10:08

readily available.

10:09

The command to pull it down is docker pull

10:11

verdatio verdatio.nightly-master.

10:15

This lets you run Verdatio neatly within a container.

10:18

Which is super convenient for certain setups.

10:20

It is.

10:20

And for those operating at an even larger scale

10:22

with Kubernetes, there's a Helm chart available as well.

10:25

So Verdatio's got you covered no matter how you like to work.

10:27

Pretty much.

10:28

But once I've got it installed, how do I actually

10:30

get Verdatio running?

10:31

Oh, it's incredibly straightforward.

10:33

You just open up your terminal or command prompt

10:35

and type in verdatio.

10:37

That's it.

10:37

That's it.

10:38

Hit Enter, and you're off to the races.

10:40

That is surprisingly easy.

10:41

So it's running in the background now.

10:43

But how do I actually use it with my projects?

10:45

By default, Verdatio runs on a specific web

10:48

address on your computer.

10:49

It's http.localhost.4873.

10:53

OK, I'm writing that down.

10:54

To tell your NPM projects to use your local Verdatio instead

10:57

of the public NPM registry, you can run a command

11:00

in your terminal.

11:01

It's npm setregistry, http.localhost.4873.

11:07

So I'm basically saying, hey, NPM, when I need a package

11:10

or I want to share one, look at this address on my computer

11:12

first.

11:13

Precisely.

11:14

And if you want to use Verdatio just for a specific command

11:16

without changing your default settings,

11:18

you can also do it like this.

11:19

npm cm figregistry, http.localhost.4873,

11:24

npm install package name.

11:26

This instructs NPM to use your local registry just

11:29

for that one particular installation.

11:31

Handy for testing things out.

11:32

Exactly.

11:33

You also mentioned a web interface earlier.

11:34

How do I see that?

11:35

If you open up your web browser and navigate

11:37

to http.localhost.4873, you'll be greeted by a simple web page.

11:43

OK.

11:44

It displays all the packages currently residing

11:46

in your local Virdatio registry.

11:48

You can even search for specific packages right there.

11:51

So it's a nice visual way to manage my software warehouse.

11:54

Exactly.

11:55

Drag and drop.

11:56

I like it.

11:57

All right, so we've covered what Virdatio is,

11:59

why you'd want to use it, who's using it,

12:01

and how to get started.

12:03

What are some of the key things you can actually

12:05

do with it once it's up and running?

12:07

Well, you can do all the essential things you would

12:09

expect from a package registry.

12:10

You can install packages into your projects

12:13

using commands like npm install package name.

12:16

And you can publish your own custom packages

12:18

to your private registry using npm publish.

12:21

So the fundamental actions are covered.

12:23

What about more fine-grained control?

12:25

Virdatio also offers a variety of advanced features.

12:28

You can unpublish packages if you need to.

12:31

Be careful with that one.

12:32

Yes, definitely use caution.

12:34

Rewind button doesn't always work.

12:36

Not in this case.

12:37

But you can also add tags to specific versions

12:40

of your packages using npm distag.

12:43

And you can even mark older packages as deprecated

12:46

to let users know they should probably avoid using them.

12:49

So like a little warning sign?

12:51

Precisely.

12:52

Proceed with caution.

12:53

I like it.

12:54

It's good to know you have that level of control

12:57

over your packages.

12:58

But what about keeping things secure

13:02

and managing who can access what?

13:04

So Verdaccio has you covered there as well.

13:07

For user management, you can register new users,

13:10

allow them to change their passwords,

13:12

and manage the special tokens they use for secure login.

13:15

It also integrates with security tools like npm audit and yarn

13:19

audit.

13:20

These tools can help you find and address potential security

13:23

vulnerabilities hiding within the packages

13:25

that your project depends on.

13:27

Very important.

13:27

You don't want any nasty surprises sneaking in.

13:30

Exactly.

13:31

Better safe than sorry.

13:33

Security is always top of mind.

13:34

Are there any other handy features

13:36

that we haven't talked about yet?

13:37

Yeah, there are a couple other things.

13:39

It has built-in search functionality,

13:40

so you can easily find packages within your registry,

13:43

either through the command line or that web

13:45

interface we talked about.

13:47

Love a good search bar.

13:48

Of course.

13:49

It also has a very simple ping command you can use.

13:52

Ping.

13:53

Yeah, you can ping the server just

13:55

to check that your Verdaccio server is up and running

13:58

and responding correctly.

13:59

Just make sure it's alive.

14:00

Exactly.

14:01

And while it might be less relevant for a private

14:04

registry, it even supports starring and unstarring

14:07

packages.

14:08

Just like on GitHub.

14:10

I like it.

14:11

So it sounds like it covers pretty much all the bases,

14:13

the essentials, and then some nice extras on top.

14:16

I'd say so.

14:16

Now, we should mention that Verdaccio is open source, right?

14:19

Yes, it is.

14:20

So what about getting help or contributing to the project?

14:23

Well, it's a community-driven project

14:25

run entirely by volunteers.

14:26

They gladly welcome donations to support their efforts.

14:29

That's awesome.

14:30

They have a really comprehensive set of documentation

14:33

available online.

14:35

Always helpful.

14:35

They also have a blog, a community forum,

14:38

where you can ask questions and get help.

14:40

And they even have recordings of past talks and presentations

14:44

about Verdaccio.

14:45

Nice.

14:45

So plenty of resources available if you get stuck

14:48

or want to learn more.

14:49

Absolutely.

14:50

And if you happen to stumble upon any security

14:53

vulnerabilities, they have a very clear process

14:56

for reporting them.

14:57

Responsible disclosure.

14:58

Good.

14:59

Exactly.

15:00

And it's worth mentioning that several companies

15:02

like JetBrains, Crowdon Browser Stack, Netlify, Algolia,

15:05

and Docker provide free licenses for their tools and services

15:09

to the Verdaccio team.

15:10

Wow, so they're getting some good support.

15:12

Yes, they are, which is fantastic.

15:14

It helps keep the project running smoothly.

15:16

That's great to see.

15:16

It really highlights that spirit of collaboration

15:19

in the open source community.

15:21

So to wrap things up, what's the one key takeaway

15:23

someone listening should remember about Verdaccio?

15:26

I'd say the main takeaway is that Verdaccio offers

15:28

this really straightforward way to set up

15:31

your own local software package warehouse.

15:34

This lets you manage your private code securely,

15:36

which is super important.

15:37

It also speeds up your development workflow

15:40

by caching public packages.

15:41

You don't have to go download them every time.

15:43

Exactly.

15:44

You get more control, more reliability

15:46

without the complexity of a full-blown enterprise

15:49

grade registry system.

15:51

It's like that perfect sweet spot.

15:52

It is.

15:53

And it's especially useful for anyone working with JavaScript,

15:56

from those just starting out to seasoned veterans leading

16:00

larger teams.

16:01

Absolutely.

16:02

It sounds like a fantastic tool for anyone

16:04

who wants to bring a bit more organization speed and control

16:08

to their software development process

16:10

without needing to become a server expert.

16:11

Couldn't have said it better myself.

16:14

Well, listeners, we hope this deep dive has

16:16

shed some light on Verdaccio and how it can help you streamline

16:19

your development workflow.

16:21

Think about how having your own personalized software toolkit

16:25

right at your fingertips could simplify your projects

16:28

and boost your confidence in your development process.

16:30

And potentially save you a lot of headaches down the road.

16:33

Big thanks again to Safe Server for supporting this deep dive.

16:36

For all your software hosting needs and expert advice

16:39

on digital transformation, be sure to check them out

16:41

at www.safeserver.de.

16:44

They know their stuff.

16:45

Keep those dependencies organized.

16:45

Keep those dependencies organized.