Linux Jails (sandboxes / containers) with Jailmaker

I have another question, this time around the GPU passthrough option. In Truenas’s Apps, I can allocate my Nvidia GPU to multiple apps. Is this possible with jailmaker? I’m thinking in line of wanting to run Plex and Jellyfin and passthrough to both as an example.
image

Thanks everyone for the help. I just needed to add the port. I must of missed that in the video. Now onto to installing the *arrs.

The location bar did get cropped from the video, but I do state it, but it’s quick.

1 Like

I’ve been looking into docker-compose a bit more and it looks like stacks are simply all the orchestrated containers inside the compose file. With that in mind, is the agent using docker swarm to work with multiple nodes?

I don’t think it’s using swarm.

I assumed dockge is simply logging into the other dockge agents on the same port you would, and using an API to control the agent.

Yes. A dockge stack is a compose file. That’s the neat thing, you can edit them on disk, and they appear in dockge, edit them in dockge, and the changes are reflected on disk.

1 Like

Ok, makes sense. Thanks!

So, first off, awesome little tool. I moved plex from docker to its own jail and its SOO Much less flakey.

But I need some guidance on allowing tun networking. I need to get a few wireguard/tailscale jails up and running and don’t know where to start with my config.

Start by checking out the old forum thread and the GitHub Discussions. Wireguard and Tailscale were mentioned their. Maybe that will get you started.

I’ve got the follow on GitHub, do you have a link handy for the old forum thread?

See first post in this thread.

Follow up questions, dockge was working great but…
Tried installing a second instance of Radarr and I am unable to access it on the alternate port 17878 instead of 7878.
It’s unclear to me if I am required to setup a bridge in order to change the default docker ports and\or if the setting up a bridge the recommended solution for running jailmaker.
I did create the bridge and changed macvln to bridge in the jailmaker config file to test this theory but that prevented jailmaker from starting. I know Stux demonstrated using a bridge in his video but I had a hard time following. I’m not overly concerned with the firewall between Scale and the jailmaker apps. I really just wanted the simplest way for this to work and be maintained.

First off. Jip-Hop this is an amazing tool. I know you spent untold hours and hours creating it and the Truenas experimenters owe you a GREAT debt of gratitude. How you figured all this out is amazing.

A couple of system maintenance questions.

  1. Is there a way to rename a jail?
    I have a jail I created with the wrong name "myjail"and would like to rename it “plex” to better describe it.

  2. Is there a way to clone a jail?
    I could create an boilerplate jail with my tweaks and clone it for a default jail.

  3. Is there a way to take a jail and back it up as is intact to an offsite location like a usb drive?
    This way a jail could just be restored from the backup and you would be up and running quickly.

1 Like

I believe all that would be done with machinectl. Here are some of the options that you can use with machinectl. We would need @Jip-Hop to confirm if it would cause issues with jailmaker or not.

  clone NAME NAME             Clone an image
  rename NAME NAME            Rename an image

I’m not sure about backing up yet.

machinectl documentation

Ah, found it. Got tailscale working fine, but still wrangling my wireguard/mullvad’ed jail

Cloning is not implemented in jailmaker.

Instead you may create a config template. See the docker config template for inspiration (specifically the initial_setup bit):

To rename an existing jail you’d have to manually rename the dataset which was created for your jail inside the jails directory. Stop the jail first if it’s running then use the zfs rename command on the CLI.

You can backup your jail using the features provided by TrueNAS. Such as snapshots and replication.

2 Likes

Just seeing if anyone has an answer for this. Thanks.

Multiple jails can use the GPU simultaneously.

2 Likes

Sweet, thanks for confirming!

Did you also specify the bridge instead of a NIC interface as well?