For the moment let's not worry about the healthcheck not showing the env id.
Instead, let's see if we can Project One-Click spin-ups working. First, stop the OliveTin stack and change your PORTAINER_ENV value to 1, as we now know that's the correct env id. Start the stack again, and then modify these lines in portainerstack.sh:
Lines 15 & 16 should currently look like this:
portainerEnv=$(curl -s -k -H "X-API-Key: $portainerToken" "http://$portainerHost:9000/api/endpoints" | jq '.[] | select(.Name=="local") | .Id') \
&& [[ -z $portainerEnv ]] && portainerEnv=$(curl -s -k -H "X-API-Key: $portainerToken" "https://$portainerHost:$portainerPort/api/endpoints" | jq '.[] | select(.Name=="local") | .Id')
I'd like you to add a space and a backslash to the end of line 16, and then add the third line below between the current line 16 & line 17:
portainerEnv=$(curl -s -k -H "X-API-Key: $portainerToken" "http://$portainerHost:9000/api/endpoints" | jq '.[] | select(.Name=="local") | .Id') \
&& [[ -z $portainerEnv ]] && portainerEnv=$(curl -s -k -H "X-API-Key: $portainerToken" "https://$portainerHost:$portainerPort/api/endpoints" | jq '.[] | select(.Name=="local") | .Id') \
&& [[ -z $portainerEnv ]] && portainerEnv="$PORTAINER_ENV"
This should allow us a fallback of using the value in PORTAINER_ENV if the curl commands are unsuccessful in getting the env id.
After that, try to add any project via Project One-Click...
EDIT: The above shouldn't be necessary. I'm fairly certain the non-standard name you're using for the local Portainer environment is at the root of this. Check my response to your last PM, but if you rename primary back to local everything should start working.



