Help with custom containers

Hello. I’m new to TrueNAS. I’ve been evaluating TrueNAS SCALE over the past week. I’m having trouble with apps. I want to install NextCloud, but I need to setup a custom apps first - primarily linuxserver/mariadb. I’m running into an issue where I can’t get phpMyAdmin or MySQL Workbench to connect to MariaDB. If I setup an external interface “‘enp2s0’ Interface”, things seem to hang if I try to visit the phpMyAdmin website. Without an interface, phpMyAdmin loads fine. I’ve tried changing the port so that node port 9001 forwards to container port 3306, and update the database clients accordingly, but nothing seems to work. I’ve logged into the container and granted privileges for root to connect from any host and flushed the privileges, but that hasn’t helped either. Can someone point me in the direction of how to setup custom applications in TrueNAS? I feel like this is fairly simple, but I’m oblivious to where I’m going wrong. I just want to expose an image on a port - preferably 3306, but it seems Kubernetes only allows 9000+. Also, I saw that I could add a catalog of apps, but I wasn’t certain what third party catalogs are available. I found one, but they don’t seem to support TrueNAS anymore.

Can you please confirm which version of TrueNAS Scale you are running on as apps and container networking in Dragonfish and ElectricEel are completely different?

TrueNAS SCALE Dragonfish 24.04 [release]

Sorry, I just noticed the Dashboard has a more specific version as Dragonfish-24.04.2.3

1 Like

If you have no apps as yet, my advice would be to upgrade to Electric Eel now before you install any apps and save yourself any possible pain from the app migration from a later move to EE.

(In essence Dragonfish and EE use entirely different infrastructure for delivering apps, and there is a migration process - so starting with EE apps avoids the need for this.)

Also, I haven’t installed MariaDB myself, but I suspect that it will be easier under EE than under Dragonfish.

2 Likes

Thanks. I’ve uninstalled all apps and in the middle of upgrading.

As a new user, I would recommend to you to implement @joeschmuck’s Multi Report script so that you get your system configuration emailed to you once a week (and get health checks on your disks as well).

1 Like

I’m still having trouble getting Custom Apps running/exposed. Internally, its exposed via port 3306. I can shell into the docker container and log into MariaDB via mysql. So it’s running… I just don’t know how to expose that port on the network.

If I go to the system shell of TrueNAS itself, running ss -tuln or netstat -tuln shows that nothing is listening on 3306.

If I run sudo docker ps, I see my container listed

sudo docker ps
CONTAINER ID   IMAGE                                    COMMAND                CREATED          STATUS                    PORTS                                                           NAMES
e565a5ae63e6   linuxserver/mariadb:latest               "/init"                40 minutes ago   Up 40 minutes             3306/tcp                                                        ix-mariadb-mariadb-1

MariaDB is a fork from MySQL since the purchase by Oracle made upgrading to later versions financially unviable.The “M” in the LAMP stack is MariaDB rather than MySQL now. So just about every service has switched over from MySQL to MariaDB since the SQL syntax and functions are the same.

Thank you for the script. I’ve got it setup and running. Are there any other resources for people new to TrueNAS to help get us started beyond configuration?

I figured it out. I can connect to the server via MySQL Workbench.

Something has definitely changed with the ports between the two version of TrueNAS. Under network configuration, leave Host Network unchecked, and add the port with Container Port and Host Port matching. Prior to the upgrade, this port mapping was in another area, and it gave me a message that I couldn’t use anything less than 9000 for the port - and even then, I couldn’t connect to the custom port.

You’re still on 24.04 Dragonfish?
If not, I thought they removed that restriction in 24.10…?

Either way, your time getting apps to work is better spent in 24.10 (just like @Protopia mentioned) since the apps layer has been completely rebuilt.

I was on Dragonfish-24.04.2.3 at the start of this conversation, as that was what was installed by default. I have now upgraded to ElectricEel-24.10.0 per the advice of @Protopia . I figured the default selection is what TrueNAS deemed as the best configuration since I had just downloaded the ISO a few days ago and wasn’t prompted to upgrade to EE.

I just saw that an icon next to the custom apps button also supports YAML, so had I gone that route, I would have picked up on the port mapping strait away since I’m more familiar with docker itself rather than the app gui.

At this point I cannot help more - whilst I have general experience of Docker, I have not yet updated to EE myself and so have zero experience of the TrieNAS Docker environment.

@dan hosts Uncle Fester’s Basic TrueNAS Configuration Guide which was a bit dated, and currently (but somewhat slowly) being changed to include more planning information and updated build and configuration instructions and screenshots.

1 Like

You’ve been a great help with the version update that led me into the rite direction, and the scripts report of drive status looks pretty handy so far. Thank you for taking the time to help me out.