Skip to playerSkip to main content
  • 6 minutes ago
The Anubis web firewall can help keep AI bots from overloading your web server, but its default graphics are a little unprofessional. In this video, I'll explore how you can build your own custom version of Anubis with whatever graphics you'd prefer!

Follow along with my written guide: https://nerdonthestreet.com/wiki?find=Customize%20the%20Anubis%20Graphics

Learn more about Anubis and support its developer: https://anubis.techaro.lol/
---
Join the Nerd Club: http://nerdclub.nots.co
Official website: https://nerdonthestreet.com
Discord server: https://discord.nots.co
Subreddit: https://reddit.com/r/nerdonthestreet
Facebook page: https://facebook.com/NerdOnTheStreet
Twitter feed: https://twitter.com/NOTS_Network
E-Mail: jacob@nerdonthestreet.com
Transcript
00:00Hello everyone, I'm Jacob Kaufman, I'm the Nerd on the Street, and today I'm showing you how to customize Anubis.
00:12Alright guys, in my last video I talked about how to set up a web firewall called Anubis.
00:18The purpose of Anubis is to block automated robots from scraping your website, particularly those run by AI companies.
00:24And the reason, once again, that you might want to do that, outside of any principled stuff, is simply because
00:30AI scrapers can scrape websites so much that they actually take the websites down.
00:35So you install Anubis on your web server, as I went over in that other video, and you can keep
00:39your website online, defending it against these AI scraping companies who are just sending so many requests that it would
00:45otherwise overload your server and take your website down.
00:48Now, as I covered in that video, Anubis has a catch out of the box. The default graphics that you
00:53see when a request is being processed, and then after it's either accepted or rejected, is not exactly a professional
01:00image.
01:00It's this anime girl with jackal ears, playing on the mythological Anubis.
01:05The developer of Anubis knew that not everybody would want these images on their websites, so as they explain, they
01:12put these graphics in there on purpose, and then they offer a paid version of Anubis that is rebranded.
01:18Now, for the record, I am not against that business model. I actually think it's a clever thing to do.
01:23People who don't know anything about tech, especially people working at a lot of large companies that are dealing with
01:28this problem of AI scrapers,
01:30They're going to be happy to pay a support contract to this person, to give them an unbranded version of
01:35the software, and a little bit higher priority support.
01:37But on the other hand, because Anubis is open source and freedom respecting, people who are technically inclined can absolutely
01:44grab the source code and change the images themselves.
01:46And what I'm showing you how to do here in this video is how to change those images, so by
01:51watching this you are becoming part of a technically inclined crowd.
01:54As I stated in that previous video, I really appreciate all the work that is being put into Anubis, and
01:59I would certainly encourage you to go and throw a few bucks towards the Anubis developer if it's helping you.
02:04However, the price they charge for their rebranded or unbranded version is actually $50 a month minimum.
02:10There's a $50 a month option, and then there's a Contact Us option, which is probably going to be more
02:15expensive.
02:16And $50 a month is going to be out of reach, I know, to basically any individuals who are just
02:21wanting to run a website for fun.
02:22And might also be a little steep, even for some very small businesses.
02:26Once again, large corporations with a lot of money to throw around are going to be more than happy to
02:31pay that $50 a month.
02:32And generally, at those large corporations, people aren't allowed to mess with their servers by just following some random person's
02:38YouTube tutorial.
02:39So I don't think that I'm taking any business away from Anubis by making this video.
02:43What I'm doing is making it more accessible to the people who probably wouldn't have been in a position to
02:47pay anyway.
02:48And yeah, you might just not want an anime girl to be the first thing people see when they go
02:53to your website.
02:53Again, this is not an ideological stance against the default images, and nothing against the developer.
02:59The developer has equated the default images with the shopping cart test, if you're familiar with that.
03:04It's a litmus test of if somebody's a good person in society or not, based on whether they return a
03:09shopping cart to the rack in a parking lot before they drive off.
03:12I don't quite buy that metaphor, because the whole point of the shopping cart test is that it doesn't take
03:17anything away from you to walk over to the rack.
03:20In my opinion, it does take a little bit away from your branding and, you know, your dignity on a
03:24certain level to have these images displayed immediately as the first thing everybody sees when they go to your website.
03:29So yeah, that's my justification for making this video.
03:32Again, absolutely no beef with the developer or the fact that they've chosen to put these defaults in.
03:37But without further ado, I'm going to cut to the desktop and show you how you can change those graphics
03:41out.
03:41Alright guys, and here we are on the desktop.
03:43As you can see, this is an Ubuntu system, and this is actually a virtual machine.
03:47This is running in VirtualBox.
03:49I wanted to show you this on Ubuntu, because Ubuntu and Ubuntu-based distributions like Mint and PopOS are still
03:56some of the most popular Linux distributions out there today.
03:58So if you're running Linux on the desktop, then this might be what you're using.
04:02If you're running Windows, you can just install Ubuntu into VirtualBox to follow these instructions, or you can try following
04:08them in WSL or something.
04:09But I am going to show you how to do this on Linux.
04:12You can also do it on the server itself.
04:13The reason I'm not showing you how to do this build process on the server is because it requires installing
04:18some dependency packages.
04:19Generally, as a security precaution, you want to install as few unnecessary things on your servers as possible.
04:24But the instructions here that I'm going to show you in the terminal are actually almost the same as if
04:28you're running Debian on the server,
04:30like we are in this example.
04:31So just to recap, the web server that is running Anubis here is at example1.nerdonthestreet.com.
04:38I'm just going to show you how to do this today with our Apache example from last time,
04:42because we're going to basically build a custom version of Anubis with custom graphics,
04:45and we're just going to drop that new executable in place.
04:48You don't need to worry about your setup in Apache or Nginx when you're doing this kind of customization.
04:52And as you can see, if I open up Firefox here, if I just go to example1.nerdonthestreet.com,
04:58I'll hit enter here, and the first time we load, you'll see we got that making sure you're not a
05:02bot screen
05:03with that anime jackal girl on the screen.
05:06If I do a shift refresh here, we're not going to see that again,
05:08but we can get that challenge page to come up by using a private tab.
05:12Go through all these first time setup things with Firefox here.
05:15So if I go to example1.nerdonthestreet.com again, as you can see, if we open up a private tab,
05:22we'll always get that screen.
05:23So that's how you can test if this is working.
05:24So with that in mind, if I come into the terminal from last time,
05:28we installed the Anubis package that we still have here on the server.
05:32I actually upgraded it to 1.27 for this video, since that's the version of Anubis that's out right now.
05:37So that was the package that we installed to get Anubis onto the system,
05:41and the actual executable is located at userbinanubis, as you can see here.
05:47So we'll just keep that in mind.
05:48Now back here in Firefox, I'm going to go to Anubis' GitHub page.
05:52That is at github.com slash techarohq slash Anubis.
05:57So this is the same GitHub page that we downloaded Anubis from in the last video,
06:01from that releases section.
06:03But over here on the left, this is the source code of Anubis,
06:06because it is open source and freedom respecting, like I said.
06:09The images that we want to customize are located in web static image.
06:16So this is the actual directory.
06:17You can see we have three files here.
06:19We've got a happy, pensive, and reject file.
06:22And if we open all those up, you can see in the browser that these are the mascots in question.
06:27These are the images that we're trying to replace with something else.
06:30So all we need to do is grab the entire set of the source code here.
06:33We need to replace those three image files, and then we just build Anubis.
06:37It's very easy right now.
06:39These are not hard-coded in any other way but just the files being there.
06:43If too many people do this, in the future, the author of Anubis could add other tricks
06:47just to try and detect if you've changed the files and make it more difficult.
06:51It would be very hard for them to actually prevent people from changing those images out
06:55as long as this is open source.
06:56But they could make it more difficult.
06:58But for now, it's quite easy.
06:59So in order to clone this GitHub repository onto our local system, I'm going to minimize
07:04Firefox here, and I'm going to exit out of the server for a moment.
07:08So this is just a terminal on the local Ubuntu system.
07:11Although, once again, if you want to do this on the server itself, you could.
07:14Either way, we need to install the packages that will let us grab that source code, and
07:18we need to install some more packages that will let us build the source code.
07:21So I'm going to do that all in one command.
07:23First of all, I'm going to run sudo apt update, and we'll do an update and an upgrade, just
07:28like last time on our server, just to make sure that our computer here is up to date.
07:32Always a good idea to do that before you install new packages.
07:34As you can see, I do have some upgrades available.
07:36I installed this virtual machine a few days ago.
07:39So I'll go ahead and let those updates install.
07:42And a couple minutes later, that's done.
07:43I'll clear my screen here.
07:45And now we can do a sudo apt install for the packages we actually need today.
07:48So on Ubuntu 26.04, the packages you'll need to install that are not there by default are
07:54git, which we'll use to clone the source code, golang, dash go, esbuild, and bront.ly.
08:02And those three packages will be used to build Anubis.
08:04If you're using a different Linux distribution, like Fedora or Arch, the names of these packages
08:09might be slightly different.
08:10So you'll need to go to your distribution's package website or just play around with your
08:14package manager and figure out what packages you'll need to install that would give you
08:17the equivalent of these.
08:19But on Ubuntu or on Debian, these are going to be the packages that you need.
08:22So I'll go ahead and install all of those.
08:24They will pull in some additional dependencies that will also be useful.
08:28All right.
08:29And once that's complete, we can go ahead and clear the screen again.
08:32So now what I want to do is copy that source code down from GitHub to this server.
08:37I've got another video all about using git that you can go and check out if you're new to this.
08:41But on GitHub, I'm just going to click on the green code button.
08:44And just with HTTPS selected here by default, I'll click this little copy button next to
08:50this URL.
08:51That's going to copy the complete path to a .git file.
08:54And we'll be able to feed that into the git command line program in order to copy those
08:58files.
08:59So back here in the terminal, I'll type in git clone.
09:02And then we'll just paste that URL in.
09:04And I'll run this.
09:05Now just to demonstrate to you, if we were doing this on the server, we would have only
09:09the command line to see, but since I'm on a virtual machine with a screen here, I can
09:14open up my home directory and you can see this Anubis folder.
09:17This is the folder that we just grabbed when we ran that git clone command.
09:21So if we come in here, you'll see it's the exact same files that we had on GitHub.
09:24And we can just come in here and replace those images.
09:27Before we do that, I want to go back to the terminal.
09:29I'm going to CD into the Anubis directory.
09:32And then I can run git status.
09:35That's going to tell me what branch we're on.
09:36You can see Anubis calls their default branch main, and the main branch is going to have
09:41continuous development going into it.
09:43It doesn't correspond with an exact release of Anubis necessarily.
09:46If I run git log, you can see some of the commits that are here on the main branch.
09:51So we could build Anubis on main here, but there might be bugs in the program that haven't
09:56been caught by all of Anubis's QA since they haven't actually done a release, or your
10:00configuration files might not translate one-to-one between one Anubis release and an in-between
10:05version like this.
10:06So I want to tell git to check out a specific version of Anubis.
10:11If we come back to GitHub here, we can click on this 51 tags button, and that's going to
10:16show us all of the tags of Anubis.
10:18Generally on GitHub, releases correspond with tags.
10:21Releases are a GitHub concept.
10:23This is where on the GitHub website they can type up descriptions and put in pre-built
10:27assets.
10:28But in the underlying git program, these are called tags.
10:31And the tag is just a snapshot of the source code when this tag was taken.
10:35So the most recent tag for the most recent release is called v1.27.0.
10:40And it's super easy to check that version out in git.
10:44I can just type in git checkout v1.27.0.
10:48If I run that, you'll see we get a message, but we're switching to that version.
10:52Now, if you were actually planning to make code changes that you wanted to submit back
10:56to Anubis, there are some additional steps that you'd want to take at this point.
11:00Really, if you were doing that, you wouldn't be checking out a tag in the first place probably.
11:04But since all we want to do is build, we can just ignore all of this.
11:06If I run git status, you can see our head is detached at v1.27.0, which is what we
11:13want.
11:13So if you're using a different version of Anubis on your server, just remember to check
11:17out the version that you are using, whether that's the latest version or an older version.
11:21Now that I've done that and we have the appropriate version of Anubis installed, I can come back
11:25to our file browser, and like I said, this is just in web static image, and we have these
11:32images.
11:32We can see previews of them right here, and all we have to do is replace these images
11:36with other ones.
11:37Now, to make this as simple as possible, you can see these are webp images.
11:41I'm just going to replace them with webp images, and I'm going to call them the same names.
11:46That way we don't have to patch the source code so it's looking for a different name
11:49or anything.
11:50It's just a drop-in replacement of these three image files specifically.
11:53So if you haven't already done so, at this point you're going to want to go and find
11:57what images you want to use instead of these.
11:59You can find a lot of images online, a lot of icons.
12:02Obviously, you do want to make sure that whatever images you use are images you have legal permissions
12:07to use on your website.
12:08A pretty useful website for finding icons and logos and things is svgrepo.com.
12:15There are various other websites that do the exact same thing.
12:18This is just one that I happen to use sometimes.
12:20And if we go to svgrepo.com, you can see they've got some other bot verification thing going
12:26on that's not Anubis.
12:27But you can come here and just search for checkmark, for instance, for the accepted icon.
12:33And you'll get lots of different images that all mean the same thing.
12:36They're all just checkboxes.
12:38We also get a very large ad at the bottom of the screen, so be careful about that.
12:41This is the one I'm looking for here.
12:43This happens to be an image that is created from Google Fonts.
12:47This is actually an emoji from Google Fonts.
12:49I'm going to use three Google Fonts emojis from the Noto Emojis font family because I
12:54know that the Google Fonts license allows me to use the font on my website.
12:58Now svgrepo is a website that lets you download SVG files.
13:02Just to make this a little simpler here, I'm going to skip a step.
13:05We're going to need to convert whatever image we have into a WebP file.
13:08And so I don't have to open up an SVG file in Inkscape or anything.
13:12I'm just going to download this as a PNG file instead, so you can pick what size you
13:16want, how big you want the image to appear later.
13:18I'll grab the 256 by 256 version of this.
13:21I'll drag the slider all the way up here to make it the full 256 pixels wide.
13:25And then down on the export button, I'll hover over the arrow and choose the same PNG size
13:30that I did before.
13:31That will download this as a PNG image.
13:33Before I go any further, I'm just going to go and download the other two images that I
13:36want to use.
13:37I already happen to know the URLs for these, so I'll just type them in so I don't have to
13:40go hunting
13:41for them.
13:41Here's the gear icon.
13:43I'm going to use this when we are performing the challenge.
13:45From the user's perspective, the website is loading.
13:52So there's that.
13:54And finally, for people who are denied, if we do have a false positive or if somebody's
13:58actually a bot, I'm going to use this no entry sign for that one.
14:02So I'll download this.
14:06There we go.
14:07So we don't need SVG repo anymore.
14:08I don't think we need GitHub anymore either.
14:10I'll just close Firefox for now.
14:12And here in our file browser, I'm going to open up our downloads directory in a new window
14:16here.
14:17So these are the three images we want to use.
14:19Like I said, I want them to be named the same things as these and I want them to be
14:23the
14:23same format.
14:24So for our good icon here, I'm going to double click this and open it up in an image viewer.
14:29And then I'm going to do a control shift S to save as or that doesn't work in this image
14:33viewer.
14:34Wow.
14:34Can I really not save as an Ubuntu's default image viewer?
14:37I guess not.
14:39Wow.
14:39Okay.
14:40Well, in order to convert these PNG images to WebP, you've got a couple of different options.
14:44You could install a different image viewer like GwinView, which is KDE's image viewer.
14:48That one actually has the ability to save images in different formats.
14:51Or we can use the terminal.
14:53Since we're on Linux here and some people might be following along with this sort of on a server,
14:57I'll show you how to do this on the terminal.
14:58So I opened up a terminal in the downloads folder here.
15:01You can just CD into downloads if you need to.
15:03And I'm going to want to use a command called C WebP.
15:06It's not installed by default, but I'll just run it to see if Ubuntu tells me what the package
15:10is called.
15:10Looks like the package is just called WebP.
15:12So I'll run sudo apt install WebP.
15:16Classic two tries for a password.
15:19Okay.
15:19So if I run C WebP, I'll use a quality of say 80%.
15:23That's pretty good in general for WebP images.
15:26We'll pass in the name of our input here.
15:29So I want to convert this checkmark button first.
15:31So I'll start typing that in.
15:33I'll just press tab to autocomplete it.
15:34Then I'll say dash O and this is the output file name.
15:38So you can name it anything you want for now.
15:41Eventually we're going to want to rename it to happy.webp.
15:44So I'm just going to convert it straight to a file called happy.webp.
15:47When I run this, you'll see we get a new file in here called happy.webp and it looks
15:52the exact same as the PNG file.
15:54It's just compressed with WebP.
15:55I'm going to run that same command for our other two images for gear image.
16:00I'll run that and output it to pensive.webp.
16:03And then for our no entry file, I'll output that one to reject.webp.
16:09You can actually see there's a no entry sign that the mascot holds up in reject.webp here.
16:14So this icon fits really well for that one at least.
16:17All right.
16:17So we've converted those three files and I'm just going to copy these files and paste
16:22them right over here.
16:23And since they have the same file names, our file browser will ask us, do you want to replace
16:27this file?
16:28And I'll say yes, replace this one, replace this one and replace this one.
16:32So now we have our new images in the Anubis source code.
16:35If I come back over to our directory in Git, I can run git status and you'll see we've modified
16:40three files in here.
16:41We don't need to do anything else.
16:42Once again, this is just a local build.
16:44We don't need to track this with Git, but you can see Git has recognized that we have
16:47updated these images.
16:48So finally, we can go ahead and build Anubis.
16:51This is the actual meat of the video.
16:54Now there are two different ways we can build this.
16:56Like I said, on our server, we installed a .deb package.
17:00So we could build a new .deb package and then install it on our server in the same way.
17:04A different way we could do this is to just build an Anubis binary executable file and
17:09then drop that into that user bin directory that I showed you before.
17:13I'm going to show you how to build it both ways because the commands to build them and
17:17the tools used to build them are a little bit different.
17:19And once again, I have no clue what the Anubis developers are going to do in the future.
17:23So if they decide to change how one of these works, maybe the other one will still work
17:28in the future a little bit longer.
17:29So the first way I'm going to show you how to do this is to just build a binary file,
17:33just the Anubis executable that you can drop in all by itself.
17:36And for that, we're going to use the make command.
17:38Now there's a file in here called make file.
17:41I've got another video I made years ago about compiling software from source and I talked
17:45about a few different types of build systems that open source projects tend to use.
17:50If you see a make file in a directory like this, you know that you can probably use the
17:54make command to build it.
17:56Now if I open up this make file with our text editor, we can see the different make targets
18:00that are available.
18:01This is essentially just a fancy script.
18:03And I can see from these make targets, if I run make all, it's going to shortcut me
18:08to make build.
18:09And then I can go down to make build and see what exactly that will do.
18:13That's going to first make the assets, which we've got another couple of lines for here.
18:17Then it's going to build Anubis itself.
18:18So that looks like what I want to do.
18:20So here on our terminal, I'll just run make all and let's see if that works.
18:25Make was not installed on Ubuntu.
18:27All right.
18:27So I forgot to add that one to my list earlier.
18:29We'll just run apt install make, not going to bother rerecording the whole video.
18:34Sometimes people appreciate problems coming up so you can see how I solve them.
18:38And that was a simple one.
18:39All right.
18:40So we've got make installed.
18:41Let's try it again.
18:42I'll run make all and we get a message NPM.
18:46No such file the directory.
18:47I thought I installed NPM earlier.
18:49Let's try running NPM to see if that command is recognized.
18:53That's not installed.
18:54Did I install Golang?
18:55Apt policy, Golang, go.
18:58Yeah, I installed that one.
18:59I must have just forgotten to put NPM in there.
19:02So once again, if you get a message that says no such file the directory when make is trying
19:06to run something, just try running it yourself and then install whatever package you need
19:10to to get that command to work.
19:14That does look like a more reasonable amount of dependencies pulled in than we had earlier.
19:20I see.
19:21So NPM would have actually pulled in, I just saw the build essential package getting installed
19:27here and that would have pulled in make by itself.
19:29That's why I didn't have make in my instructions.
19:31I must have just forgotten to type NPM in earlier.
19:34So that explains why that just went wrong.
19:36This seems like a good time to plug.
19:37I will have a written set of instructions for this video in the description below.
19:42If you copy or read the commands from that one, then you hopefully won't miss things
19:45like I just did.
19:47So look for that down in the description if you want to save some time while going through
19:50this.
19:51Okay, so NPM is installed.
19:53Once again, third time to the charm, I'll run make all.
19:57And hopefully this time it actually does something.
19:59All right, so we're running NPM CI and we got an error there.
20:03All right.
20:03So this says NPM CI can only install packages when your packet.json and package lock.json
20:09are in sync.
20:10Please update your lock file with NPM install before continuing.
20:13All right.
20:13So I'll go ahead and do that.
20:14I'll run NPM install.
20:18And we see that's changing some of the files over here in the file browser and that's finished.
20:22So let's try it again.
20:24Make all.
20:25We're on the same thing we did before, which is going to start off by running NPM CI itself.
20:28And you can actually see here in the make file.
20:31The first thing that make all is doing is running make build.
20:34The first thing make build is doing is running make assets.
20:36And the first thing make assets does is run make depths.
20:39And the first thing in the make depth section is running NPM CI.
20:43So you can kind of see how the steps in this make file directly correspond to the output
20:46you see when you run make in your terminal.
20:49The next one is go mod download, which is now what's being run.
20:54All right.
20:54So now we're actually running the go build command or rather make is running it automatically
20:58for us.
20:59And you can see the go build command is going to have a dash O flag for output.
21:04And the output is going to go to var Anubis.
21:06So I'm going to close this make file here.
21:09And we're going to go to the var directory right here.
21:12And it's empty right now because it's still building.
21:15All right, and as that finishes, you can see we have binary executable files pop up here
21:20in our var directory.
21:21So we just ran this build again on this local Ubuntu machine, I'm going to open up another
21:25terminal and just SSH again into example one dot nerd on the street.com.
21:32So again, the Anubis binary, at least here on Debian was installed to user Ben, I can actually
21:38run which Anubis to check where it is and it's at user Ben Anubis.
21:42So one of the ways that you could go about doing this right now is just to stop right
21:46here and copy this Anubis file onto your server.
21:49Maybe I should have opened the server up in the graphical file browser here.
21:52Here, I'll do the same thing.
21:54I'll SFTP into root at example one dot nerd on the street dot com.
21:59And then I'll navigate to user Ben and Anubis is right here.
22:04So just to show you, let's actually try doing it.
22:07I'm going to open up a private tab in Firefox.
22:10And I'll go again to example one dot nerd on the street dot com.
22:14And you can see right now we still have that Anubis mascot there.
22:17So I'll close Firefox.
22:18Let's just copy this Anubis file.
22:20And I'll just paste it right here.
22:22And it's going to ask, do you want to replace that file?
22:24I'll say yes, replace it.
22:25We'll make sure to wait until that's finished copying over.
22:28And after that's been copied over, I'm going to restart Anubis on the server.
22:32Get our server terminal back out here, so I'll run systemctl restart and you may remember
22:38from last time we called the service Anubis at Apache dot service.
22:42So I'll restart that service and then let's open up our private tab again.
22:45I'll go to example one dot nerd on the street dot com.
22:48And this time you can see we have a gear icon there instead of the Anubis mascot.
22:53So that is working.
22:54That's a complete set of steps to customize the graphics on Anubis.
22:57If you wanted, you could stop right here.
22:59Now, like I said, I'm going to show you how to do this one more way, because right now,
23:03if I come into my server and I run apt install on this Anubis dev file, well, it tells me
23:08that Anubis is already at that version.
23:10How about if I add dash dash reinstall here?
23:14It will go ahead and re-extract that package onto my system.
23:17So I've done that.
23:18I'll restart the Anubis service once again.
23:21And then if I come back into Firefox, you'll see that our modifications have been lost here.
23:25Any time that you install Anubis, if you install an update from one of those dev packages,
23:30it will overwrite the Anubis binary and you'll have to go in here and build the appropriate
23:35version and copy the binary over again.
23:37If this is a single server and it's just your private server and you're okay doing that,
23:42then there's nothing wrong with that.
23:43You can absolutely manage your server that way.
23:45However, a more semantically correct way to do this would be to actually build a custom
23:49dev package that will include our modifications as well.
23:52And that way, if you're deploying Anubis onto multiple servers, you can reuse the same
23:55dev package on all of them and not have to copy this file into that complicated location
24:00manually on every single server.
24:02So if I come back to my local terminal here, we're going to use a different tool to build
24:06the dev file.
24:07This other tool is called Yeet.
24:09Now make is a very standard tool that lots of open source projects use.
24:13Yeet is not.
24:14Yeet is a tool that the Anubis developer actually made basically just for their own projects,
24:19namely Anubis, and we had this make file that told make what to do.
24:23Down here we have a yeet file with a .js extension that's going to tell this yeet tool what to
24:28do.
24:28I'm going to open this one up, and we actually wanted to make some edits to this one just
24:32to save some time.
24:33This isn't strictly necessary, but if we come into our yeet file, you can see Anubis is
24:36published for a lot of different platforms.
24:38It's published for FreeBSD, Windows, and Linux.
24:41And on Linux, it's not just published for regular old Intel and AMD processors.
24:45It's also published for ARM processors, PowerPC processors, RISC processors.
24:50You're probably not using any of these.
24:52If you're watching my video, you know, very slight chance that you're using Linux on ARM,
24:56but the vast majority of the time you're just running Linux on AMD64, which is regular old
25:01Intel and AMD processors.
25:03So I'm going to comment out the rest of these so that we're only building the version that
25:07we need.
25:08You can comment out whatever you want and keep whatever you want.
25:11It's just going to take longer the more of these you're building.
25:13Now here under Linux and AMD64, you can see there are actually four different package formats
25:19that this is set up to package for.
25:21We have Deb for our Debian and Ubuntu distributions, RPM for our Red Hat and SUSE distributions.
25:26We also have a systemd sys extension package format, and then we have a tarball package format,
25:32which is really going to be most useful for packages on other distributions like Arch, Solus,
25:37whatever else, to take that tarball and turn it into their preferred packaging format.
25:42So you can remove the ones from here that you don't need as well.
25:44Just make sure you don't catch any of the punctuation at the end.
25:47We still need our two closing brackets, but I'm going to remove tarball and I'm going to
25:51remove sys extension.
25:52I'll just build this for Deb and RPM just to show you that it will do multiple at once.
25:57Now one more thing I'm going to do here is scroll down near the bottom of this file,
26:01and we have these tarball build sections at the bottom here, two of these tarball.build functions.
26:07One of them makes a, as they call it, half-baked tarball.
26:11Once again, really only useful for distributions who are trying to package Anubis.
26:15And then we've got one that makes a full tarball with vendored NPM dependencies below that.
26:20We actually don't need any of that for what we're doing here.
26:23And getting those to run properly does actually require some extra steps before running the
26:27yeet file from the little bit of testing that I did.
26:29So since we don't need it, I'm just going to remove both of those functions altogether.
26:34We don't need to worry about the windows thing below it.
26:36You could remove that too if you're not building for windows.
26:39But that's all I'm going to do in terms of modifications here.
26:42So I'll click save.
26:43Now if you don't do those modifications again, it will actually work and you will still get
26:47your dev file, but you're going to be waiting a lot longer as it builds 10 times as much
26:51stuff.
26:52And you might also see some errors for some of the builds that it's trying to do.
26:55So this is how my yeet file is going to look.
26:57And then we're going to run this one in the terminal by running go tool yeet.
27:02So I'll run that.
27:04And everything's loading a little bit slower here just because I am in a virtual machine.
27:07It might still take a little bit longer to do the packaging than to just do the binary
27:11itself, which is another downside to doing it this way.
27:14But after a few moments, we'll start seeing some of those builds come through.
27:20And when that's finished, you'll see these info lines saying that we built a .deb package
27:24and a .rpm package.
27:26Those info lines tell us that once again, they were built into the VAR directory.
27:29So I'll close our text editor here.
27:30And if we come into the VAR directory one more time, now you can see two new files.
27:34We've got a dev file that we can use on any Ubuntu or Debian servers.
27:37And we have an RPM file that we can use on any Red Hat, Fedora, OpenSUSE, whatever servers
27:43that want RPM.
27:44So at this point, again, I'm going to copy this Anubis file that we just built.
27:48I'll go into our web servers directory here.
27:51And it just put me into the slash root directory.
27:53Earlier when I first connected, it put me at the actual root of the file system.
27:57Coming back in here to our servers terminal, you could see I was running everything as the
28:01root user here.
28:02So if I just CD back to my home directory, then I print the working directory, you can
28:06see the root user's home directory is at slash root rather than slash home.
28:10So I'll come in there and I'll paste the dev file that we just made next to the one that
28:14was already there.
28:15It is named something slightly different since we compiled it from scratch.
28:18You can see the yeet build system appended this tilde dev to the file name.
28:23I can actually rename this.
28:24And just so we know what it is at the end, I'll put dash custom graphics.
28:29That way when we come onto our server, I can run an LS here and you can see we have
28:33two
28:34different dev files to choose from.
28:35We've got Anubis and we have Anubis with custom graphics.
28:38So once again, now I can just sudo apt install dot slash Anubis and I'll put my tilde in to
28:45get the rest of the file name.
28:46We can run that and it's going to unpack.
28:49Actually it sees it as a downgrade, but it is going to replace the version of Anubis that
28:53we had installed with this new one.
28:55It's probably seeing it as a downgrade because if we do an apt policy Anubis, you can see
29:01that we now have a tilde dev appended to the actual package version.
29:05So that's a way you can see on a server easily if you're running the stock build of Anubis
29:09or a custom built version.
29:10So we've done that.
29:11And once again, if I come into our private tab in Firefox here, I can go to example one
29:16dot nerd on the street dot com.
29:18And oh, what happened there?
29:20Okay.
29:20Forgot one last step here.
29:22We just installed our custom version of Anubis once again, the old version is still running.
29:26It's still loaded into RAM.
29:28So once again, anytime that you change the version you have installed, whether it's manually
29:31copying that file or if you're installing it with apt, apparently they have not added
29:35a service restart step to the package.
29:37They could do that, but they haven't done it yet.
29:39So we need to run system CTL restart Anubis at Apache dot service.
29:44If we do that, then we can come in here and let's try that one more time.
29:48Example one dot nerd on the street dot com and there is our custom graphics.
29:52All right.
29:52Glad that that worked at the end there.
29:54My recording on the screen here is passing an hour.
29:56This video got longer than I wanted it to be.
29:59Like I said, I'm going to keep this take.
30:01I'm going to edit this down as tight as I can because I already feel like I've taken
30:04too long since the last video to get around to making this one.
30:07So hopefully that wasn't too unbearable to sit through.
30:09If you were too bored, then you probably didn't need this video in the first place.
30:12But if you found all of that interesting, hopefully seeing the entire process, including
30:16some bumps along the way, helped you develop a sense of some of those troubleshooting skills
30:20that can be useful when you're working on this tool or any others.
30:23Again, my video here is not meant to disparage or discourage you from supporting the Anubis
30:28developer.
30:28You can go to anubis dot Tekaro dot LOL to get to their official website and you can see
30:34some sponsorship options there.
30:36You can also support me and help me make more videos by going to nerdclub dot knots dot co and
30:40that'll send you over to my website nerd of the street dot com and you can contribute
30:44for just three dollars a month.
30:45And I also have prepaid plans if you don't like subscriptions.
30:48Totally optional though, even if you don't have money to contribute to me, check out my
30:51other videos.
30:52Feel free to subscribe on YouTube or Daily Motion or Rumble or any of the other websites
30:56that this video ends up on.
30:57And let me know down in the comments or even better at the forums here at nerd of the street
31:01dot com if you have any questions about the process that I went through today.
31:04For now though, that's everything I wanted to touch on.
31:06So enjoy your customized Anubis.
31:08I'm Jacob Kaufman, I'm the Nerd on the Street and I'll see you guys in the next one.
31:11Bye.
Comments

Recommended