brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: turn a working portainer stack into a custom template with one button

Portainer
~/tips/tip-portainer-template-from-deployed-stack

Stacks > mystack > Create template from stack

Saves the compose file of a running stack as a reusable template.

I would rather copy a stack that runs than write the same compose file again from memory.

Stacks > mystack > Create template from stack

Open the deployed stack and press Create template from stack. Portainer asks for a title, description, platform and type, fills the web editor with the stack’s compose file and creates the custom template when you press Create custom template.

Check the file before you save. Anything specific to this one deployment, such as hostnames or real passwords, belongs out of the template, or in variables if you have Business Edition.

Further reading: Portainer docs: Create a template from a deployed stack

More Portainer tips Choose Polling in a Portainer GitOps update when your Git host can't reach Portainer Put Portainer environments in groups and give users access to a whole group Portainer's Edge Agent checks in every 5 seconds, and you can change that docker run -d -p 9001:9001 --name portainer_agent --restart=always \ Deploy the container → Replace All Portainer tips (28) All topics

Link