Nextcloudpi - Raspberry Pi3 - reboot issue

Hi
I have installed and configured with no issue. Synced with phone and desktop everything went perfect.
After I have restarted Raspberry and can’t access nextcloud.

I’m quite new to docker and I think I’m missing something obvious but so far haven’t found any answer.
After running

docker run -d -p 443:443 -p 80:80 -v ncdata:/data --name nextcloudpi ownyourbits/nextcloudpi $DOMAIN

I see:

docker: Error response from daemon: Conflict. The container name “/nextcloudpi” is already in use by container “276ccb651abea86011569d4b8ad2ebc194699b338dfee4be5d3d4105bbe25f7f”. You have to remove (or rename) that container to be able to reuse that name.

Is there any way to start container automatically after reboot?

hi,

after reboot your container is stopped, but not removed, so you can just re-start it instead of running a new container

docker start nextcloudpi

edit: in order to auto-start automatically you can create a systemd unit or use rc.local

Many thanks, I knew I’m missing something obvious.

Thx