Restart docker if restart vps

Good morning,
is it possible to automatically restart docker and n8n if my vps restarts for any reason?

Welcome to the community @anto88k!

That can be achieved with restart: always

Here a discussion about the same topic. Is part of the most docker-compose files in the GitHub repository but not part of the Server Setup guide. Will also add it there.

Did update it:


Thanks, i do it but if i restart server i need to write sudo docker-compose up -d
for start n8n :frowning: