How do you make apps autostart upon TrueNAS reboot? I got a bunch of apps that I have to start manually every time I reboot TrueNAS, and it’s getting frustrating. What is the setting that tells them to autostart? I am guessing that it must be some environment variable or something, such as KEEP_APP_RUNNING
or something like that.
what is the restart policy of the container?
if are build as catalogue app, this commando should work
docker inspect **containername** --format='{{json .HostConfig.RestartPolicy}}' | jq
ix container are named like ix-container-container-1, in any case with docker ps
you can see exactly the name.
1 Like
Thanks. Here’s what I get for czkawka
:
admin@nas1:~$ sudo docker inspect ix-czkawka-czkawka-1 --format='{{json .HostConfig.RestartPolicy}}' | jq
{
"Name": "no",
"MaximumRetryCount": 0
}
I take it that means that the restart policy is no
, right? How do I make it yes
though?
Here’s a chunk of what the full inspect
says:
admin@nas1:~$ sudo docker inspect ix-czkawka-czkawka-1
[
{
"Id": "e37a481b6515b8eca5b4b0ca491697998ab74bb5b7ad7e480134a7b44ce0f74e",
"Created": "2025-03-06T20:06:18.68847054Z",
"Path": "/init",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 13812,
"ExitCode": 0,
"Error": "",
"StartedAt": "2025-03-06T20:06:26.689348766Z",
"FinishedAt": "0001-01-01T00:00:00Z"
Alright, nevermind, I found out that the apps that did not autostart had the Restart Policy
set to No
. And this is, indeed, exposed to the user on the Edit screen(!). Interestingly, apps that did autostart do not have this parameter exposed.
1 Like