In this post I'll walk through the steps to download a free copy of Splunk, apply for a 10GB/day developer license, and set up your own Splunk server for your homelab. Splunk is a great tool to learn because it's widely used especially in large companies and because it's fun to dig in to. In the future, I'll post about getting data into Splunk from a variety of sources including Unifi network equipment, Corelight/Zeek, Salesforce, Microsoft, and more!

In this post I'll be using a number of tools that I already have set up in my homelab, but if you don't have these tools already don't worry! You could easily run Splunk in a virtual machine or directly on your desktop. Here are the tools I'll be using along with links to installation guides if you're interested in setting them up yourself:

Step 1: Creating Our Virtual Machine (VM)

I already use TrueNAS to host data for other projects, so we'll be creating a VM there, but you could create one locally using something like VirtualBox for free. If you're using TrueNAS you can follow along with these steps, or if you're going the VirtualBox route you can skip to Step 2: Installing Ubuntu.

  1. Login to TrueNAS and select Virtualization on the left-hand side, then select Add in the upper right
    TrueNAS VM Page
  2. Enter the following information under Operating System and then click Next (any options not mentioned here can be left with their default setting):
    1. Guest Operating System: Linux
    2. Name: Splunk
    3. Password: make-a-password
  3. On the CPU And Memory page adjust the settings listed below and then click Next
    1. Virtual CPUs: 1
    2. Cores: 4 (I recommend at least 4 but adjust based on your system)
    3. Threads: 1
    4. CPU Mode: Host Model
    5. Memory Size: 8 GiB (I recommend at least 8 GiB but adjust based on your system)
  4. On the Disks page create a new disk image that's at least 100 GiB and then click Next, here are the settings I used:
    1. Select Disk Type: AHCI
    2. Zvol Location: nvme1/vms
    3. Size: 100 GiB
  5. Your configuration on the Network Interface page may vary from mine, but here are the settings I used. After you've filled these out click Next:
    1. Adapter Type: Intel e82585 (e1000)
    2. Mac Address: Autogenerated
    3. Attach NIC: bond10 (this is a bond that I created to combine multiple NICs, you'll likely just have one NIC option and it will be different from this)
  6. On the Installation Media page we'll need to upload an ISO to install our operating system (OS) from. We'll be using the latest long-term support release of Ubuntu Server which as of this writing is 24.04.2 LTS and can be downloaded here
  7. Click Upload New Image File and select an appropriate location to save the file on your NAS. Then click Choose File, select the file we downloaded, and click Upload
    1. If you got an error message that the file is too large, skip this step from now and refer to the ISO Too Large section of this post for workarounds.
  8. Leave the settings in the GPU section at their defaults and click Next
  9. Review the Confirm Options section and click Save
  10. If everything went well you should now see your new VM in the Virtual Machines list
    TrueNAS VM Page

ISO Too Large

If you received an error that the ISO was too large when you tried to upload it this section contains steps for a workaround. If you didn't get this error feel free to skip to the next section Installing Ubuntu.

If you're still here that means that the ISO file was too large for you to upload through the web interface so as a workaround we'll create an SMB share to store the ISO in instead!

  1. In TrueNAS, select Datasets on the left-hand side, click on the Zvol you'd like to store your ISOs in, and then click Add Dataset on the right-hand side of the page.
    TrueNAS Datasets Page
  2. On the Add Dataset page, enter a name for your dataset like "isos" and select SMB from the Dataset Preset dropdown. Then check off Create SMB Share and click Save
    TrueNAS Add Dataset
  3. Your SMB Share should be all set now! If you're on windows you can open File Explorer and enter \\nas-address\isos in the address bar to connect. If you're on a Mac open Finder and press CMD + K, then enter smb://nas-address/isos and click Connect
    Finder Connect to Server
  4. Once you're connected you should be able to drag and drop the ISO to your share and watch it upload!
    Finder Copy Progress
  5. Finally, now that our ISO is uploaded we need to attach it to our VM. In TrueNAS go to Virtualization on the left-hand side, then click the arrow to the right of the VM and select Devices
    TrueNAS Virtual Machines page with the Splunk VM expanded and callouts on Virtualization, the expand arrow and Devices
  6. Select Add in the upper right corner, then select the ISO you uploaded, enter a Device Order of 1010, and click Save
    TrueNAS Add Device form with type CD-ROM, the Ubuntu 24.04.2 ISO selected and device order 1010
  7. If you get this permission error you can fix it by following these steps:
    TrueNAS validation error saying filesystem permissions stop the libvirt-qemu user from reading the ISO
    1. Click on Datasets, then select your isos data set and scroll down on the right-hand side until you see Permissions. Click Edit next to permissions
      TrueNAS Datasets page with the isos dataset selected and the Permissions Edit button marked
    2. Click Add Item then fill in the below and click Save Access Control List:
      1. Who: User
      2. User: libvirt-qemu
      3. Permissions: Full Control
      4. TrueNAS Edit ACL page adding a libvirt-qemu user entry with Allow and Full Control permissions
    3. Try steps 5 and 6 again to add the ISO to your VM

Installing Ubuntu

Since we'll be using Ubuntu Server to host Splunk we'll need to install Ubuntu on our VM. If you're using TrueNAS go to the Virtualization section, click the arrow to the right of your VM, click Start, and then click Display. If you're installing Ubuntu somewhere else you can jump right into the steps below!

  1. Select your language with the arrow keys and press Enter
    Ubuntu installer language selection screen with English highlighted
  2. Select your keyboard configuration, then highlight the Done key and press Enter
    Ubuntu installer keyboard configuration screen with English (US) layout and variant selected
  3. On the type of installation page, leave the defaults and press Enter
    Ubuntu installer installation type screen with Ubuntu Server selected and Done highlighted
  4. Write down the IP address shown on the network configuration page since we'll need it later to connect to our server, then press Enter
    Ubuntu installer network configuration screen showing the ens3 interface with a DHCPv4 address
  5. Leave the proxy address page blank and press Enter
    Ubuntu installer proxy configuration screen with the proxy address field left blank
  6. On the mirror configuration page wait until you see "This mirror location passed tests." and then press Enter
    Ubuntu archive mirror configuration screen with the “This mirror location passed tests” message highlighted
  7. Leave the storage configuration settings at their defaults, press the down arrow key to select Done and then press Enter
    Ubuntu guided storage configuration screen using the entire 100 GB disk as an LVM group
  8. On the next storage configuration page leave all of the defaults and press Enter
    Ubuntu storage configuration summary listing the /, /boot and /boot/efi partitions with Done highlighted
  9. When prompted to confirm a destructive action highlight Continue and then press Enter
    Ubuntu installer Confirm destructive action dialog with the Continue button highlighted
  10. On the profile configuration page fill out all of the fields and then select Done and press Enter
    Ubuntu profile configuration screen with name, server name and username set to splunk and a masked password
  11. On the Ubuntu Pro page leave "Skip for now" selected and press Enter to continue
    Ubuntu installer Upgrade to Ubuntu Pro screen with Skip for now selected
  12. On the SSH configuration page press Space to check off "Install OpenSSH server" and then highlight Done and press Enter
    Ubuntu installer SSH configuration screen with Install OpenSSH server checked
  13. We don't need any of the featured snaps so select Done and press Enter
    Ubuntu installer featured server snaps list with no snaps selected and Done highlighted
  14. The installer will now proceed to install the system and any applicable updates based on our selections. Once the installation is complete you'll see a Reboot Now option at the bottom of the screen. Select that and press Enter
    Ubuntu installer Installation complete screen showing the install log and the Reboot Now button
  15. If you receive an error about the installation medium just press Enter
    Console messages reporting a failure unmounting the CD-ROM and asking to remove the installation medium
  16. Assuming everything went well you should see a screen like this after your VM finishes rebooting:
    Ubuntu 24.04.2 LTS console login prompt after the VM reboots
  17. We'll want features like copy and paste to work so instead of proceeding on the web terminal we'll use SSH to connect to our server. Open the Command Prompt on Windows or Terminal on Mac and use this command to connect to your server:
    ssh username@ip-address
    
    Terminal showing an SSH login to the server and the Ubuntu welcome message reporting 63 available updates
  18. As you can see from the welcome message there are a number of updates available so let's apply those before going any further. Run these commands to apply all available updates to your server:
    sudo apt update
    sudo apt upgrade -y
    
  19. Great! With those updates installed we're ready to move on to installing Splunk

Installing Splunk

  1. First, we'll need to get a copy of the Splunk Enterprise installer. Luckily, Splunk offers a free download of the installer to anyone who creates an account here
  2. Once you've made it to the download page, select Linux and then click Copy wget link on the .deb line (.deb is like the Ubuntu equivalent of .exe on Windows)
    Splunk Enterprise 9.4.2 download page with the Linux tab marked as step 1 and the .deb package’s Copy wget link as step 2
  3. Switch back to your SSH connection to your server and paste the wget link into the terminal. This will download the Splunk installer directly to your server
    Terminal running wget to download the Splunk 9.4.2 .deb installer, finishing at 100 percent
  4. Now that we have the installer downloaded we just need to run it! You can use the command below to run the installer:
    sudo dpkg -i splunk-... (Press tab to auto-fill the full name)
    
    Terminal running sudo dpkg -i on the Splunk .deb package and unpacking Splunk 9.4.2
  5. Once the installer is complete we'll want to enable Splunk to run at startup and acknowledge the EULA. We can accomplish both of those items with this command:
    sudo /opt/splunk/bin/splunk enable boot-start
    
  6. After you run the command you'll be presented with the EULA. Accept that agreement and then proceed to create an account
    Splunk setup prompts in the terminal asking for an administrator username and a new password
  7. Now Splunk will automatically start whenever you boot your server and you can also manually start it with the command below that we'll run now
    sudo systemctl start splunk
    
  8. Splunk may take a few minutes to start, but once it does you can access it at
    http://your-server-ip:8000
    
    Splunk Enterprise sign-in page with username and password fields and a first-time sign-in note
  9. Login with the username and password you created and you should see the Splunk homepage
    Splunk Enterprise home page greeting “Hello, Administrator” with the Apps sidebar and Bookmarks tab

Bonus Tip: Splunk Developer License

By default, Splunk gives you a trial enterprise license for 60 days and then you can convert to a free license that has a limited feature set and only allows you to ingest 500MB/day of data. Luckily Splunk also offers a developer license that many people don't know about! You can apply for a developer license here and if you're approved you'll receive a license that supports most of the same features as the enterprise license and allows up to 10GB/day of data ingestion. These licenses can't be used for production use, but they're perfect for your homelab!

What's Next

In this post we got Splunk set up, but there are still a lot of pieces missing. We're still using HTTP instead of HTTPS, we're on port 8000, and we're typing in an IP address to connect instead of a nice DNS name. We also haven't added any data to Splunk yet or performed any searches! That's why this is just part one of this series of posts. In future posts we'll cover enabling SSL, ingesting data through syslog, Splunk apps, and the Splunk HTTP Event Collector (HEC) from multiple sources including Unifi network devices, Microsoft, and Salesforce. Stay tuned for those posts over the next few weeks!