Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To create a custom app template in Portainer, open Templates, select Custom, choose Add Custom Template, enter the template details, provide its container or Compose definition, and select Create custom template. You can paste a Compose file, upload a local docker-compose.yml, or connect a Git repository. This guide explains each method, variable handling, shared templates.json catalogs, schema choices, and the checks that keep templates safe to reuse.

What a Portainer custom app template does

A Portainer application template packages predetermined deployment settings so a user can launch a container or stack without rebuilding every option by hand. The deployer can still adjust the settings that the template exposes, such as environment variables. Portainer describes a custom template as a way to streamline deployment of a container or stack.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

There are two related concepts to keep separate:

  • Application templates: reusable definitions for containers or stacks. Portainer can display templates supplied by its catalog and templates you add yourself.
  • Custom templates: definitions created by an administrator through the Portainer interface or through a shared template catalog. These are useful for standardizing internal services, lab environments, and repeatable project deployments.

The exact menu and permissions depend on your Portainer installation and edition. Portainer’s documented variable controls for stack templates are marked as available only in Business Edition. If your installation does not show the custom-template controls described below, verify your edition, user role, endpoint selection, and Portainer version before changing the Compose file.

What you need before creating one

  • A Portainer account with permission to create templates and deploy workloads on the target environment.
  • A valid container definition or Compose file. Decide whether the template will deploy one container or a stack.
  • For the Git method, the repository URL, the branch, tag, or commit to use, and the path to the Compose file.
  • For an uploaded file, a local docker-compose.yml that has been checked for syntax and image availability.
  • For a shared catalog, a JSON file hosted at an HTTP(S) address reachable by the Portainer Server instance.

Use image tags that identify a deliberate release rather than silently moving targets. Keep credentials out of the template itself; expose a variable or use the secret-management features available in your deployment environment.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Create a custom template in the Portainer interface

  1. Sign in to Portainer and select the environment where the template should be available.
  2. Open Templates in the navigation.
  3. Choose Custom, then select Add Custom Template.
  4. Enter a descriptive title. Make it specific enough to distinguish variants, such as “Internal PostgreSQL 16 stack” rather than “Database”.
  5. Add a description explaining what the template deploys, which ports it uses, and any required preparation.
  6. Add a note if deployers need a short warning or post-deployment instruction. Add a logo only if you have a stable image location that the Portainer Server and users can reach.
  7. Select the target platform and template type offered by your Portainer installation.
  8. Choose one of the three source methods described below and provide the requested definition.
  9. Review the settings, then select Create custom template.

The template should now appear in the custom-template list. Creating the entry does not prove that the workload will start successfully, so deploy it to a non-production environment and inspect the generated container or stack before sharing it broadly.

Method 1: paste a Compose file into the web editor

Choose the web-editor option when the definition is short, changes infrequently, or is being prototyped. Paste the complete Compose document into the editor, including the services section and any networks, volumes, health checks, or environment declarations required by the application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This method is convenient but has no built-in change history. Keep the canonical copy in source control even if the Portainer editor is the place from which users deploy it. When you update the template later, record what changed and test a new deployment rather than editing a production stack in place.

Method 2: upload a local docker-compose.yml

Select the upload option and choose the file from your workstation. Upload is useful when the Compose document already exists as a reviewed artifact but is not yet in a repository. Confirm that relative paths, bind mounts, and referenced files make sense on the Portainer host; a file that works on your laptop may refer to directories or environment files that do not exist on the server.

After uploading, inspect the parsed configuration in Portainer. Check service names, published ports, volume destinations, restart policies, and environment entries before creating the template. Keep the uploaded source under version control so a later administrator can reproduce or audit the template.

Method 3: connect a Git repository

Use the Git method when the Compose definition needs review, history, branching, or repeatable updates. Enter the repository URL, the reference to use (for example, a branch, tag, or commit), and the path to the Compose file. Portainer’s Git fields also support authentication settings and an optional TLS-verification bypass field. Do not disable certificate verification unless you understand the security consequence and have a controlled reason to do so.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Git-backed templates separate the Portainer catalog entry from the deployable source. The repository should contain only the files required for deployment, with documentation explaining variables, ports, persistent data, and upgrade procedures. Pinning a release tag or commit gives predictable deployments; tracking a moving branch trades reproducibility for faster updates.

Choosing among the three methods

Method Where the source lives How updates are made Review and version control Credentials or connectivity Best fit
Web editor Inside Portainer Edit the template in the UI Limited unless you keep an external copy No repository connection required Small prototypes and simple internal definitions
Local upload Your workstation until upload Upload a revised file Depends on your own source-control process Local file access Reviewed files that are not yet hosted in Git
Git repository Source-control repository Commit and reference a new branch, tag, or revision Strong history, review, and rollback options Repository URL, reference, Compose path, and any required authentication Teams, maintained services, and repeatable releases

All three methods create a Portainer template entry, but they do not provide the same operational guarantees. For a service that several administrators will maintain, a Git repository with a pinned reference is usually easier to review and reproduce than an untracked editor entry.

A minimal Compose template with safe variables

The following example shows a stack with a database password exposed as a deploy-time variable. It uses a placeholder rather than a real credential. The syntax is appropriate for a template that supports Portainer’s documented variable controls.

services:
  db:
    image: postgres:16.4
    restart: unless-stopped
    environment:
      POSTGRES_DB: app
      POSTGRES_USER: app
      POSTGRES_PASSWORD: '{{MYSQL_PASSWORD}}'
    volumes:
      - app-db:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -U app -d app']
      interval: 10s
      timeout: 5s
      retries: 5
volumes:
  app-db:

The variable name in this example is intentionally generic, but the value is used as the PostgreSQL password. Rename it to match the service so deployers do not mistake it for a MySQL credential. The important part is the double-brace form, such as {{DATABASE_PASSWORD}}. Do not commit a real password as a default value in a repository or paste one into a template intended for multiple users.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A production-ready template should also document the persistent volume, the database user, the service name, and the recovery procedure. If another service consumes the database, add it only after you have decided how networking, startup ordering, health checks, and data migration will be handled.

Expose and manage variables

For stack templates, Portainer can expose variables written with double braces. The template author configures a label, description, and default value for each variable. When a deployer launches the template, the configured fields can be edited instead of requiring the Compose document to be rewritten.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Portainer’s documentation marks this variable feature as available only in Business Edition. In an installation without that feature, a literal value or an alternative configuration workflow may be required; do not assume that adding braces alone will create an editable prompt.

Design variables that are safe to deploy

  • Use clear names: DATABASE_PASSWORD, PUBLIC_PORT, and TIME_ZONE communicate intent better than VALUE1.
  • Explain the value: state whether a variable is a password, hostname, port number, path, or optional feature flag.
  • Choose cautious defaults: a non-sensitive development default can make testing easier, but never use a shared production credential.
  • Keep formatting valid: quote values that may contain spaces, punctuation, or YAML-sensitive characters.
  • Separate secrets from ordinary settings: passwords, API tokens, and private keys should be supplied through an appropriate secret mechanism whenever possible.
  • Validate dependencies: if a variable changes a port, volume path, or hostname, check every service that references it.

Variable prompts reduce editing mistakes, but they do not automatically encrypt a value or rotate it. Treat values entered during deployment as sensitive and apply your normal access-control and backup policies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deploy and test the template safely

  1. Open the custom template and select the deployment action for the target environment.
  2. Read the description, note, and variable labels before accepting defaults.
  3. Set every required variable. Replace development values and verify that passwords are not being reused elsewhere.
  4. Choose a stack name that identifies the application and environment without exposing secrets.
  5. Review the rendered Compose settings, including ports, networks, bind mounts, and volumes.
  6. Deploy to a disposable or staging endpoint first.
  7. Inspect container logs, health status, mounted volumes, and published ports.
  8. Exercise the application, then remove the test stack and confirm that persistent-data handling matches your expectations.

A successful Portainer deployment only confirms that the engine accepted the definition. It does not confirm that an image is secure, that a database backup works, or that an upgrade will preserve data. Add those checks to the service’s runbook.

Host a shared templates.json catalog

Use a shared catalog when several Portainer Server instances need the same application-template list. Create a valid JSON file and host it somewhere the Portainer Server can reach. Portainer’s examples name GitHub, a web server, and an nginx container as possible locations. The important requirement is server-side reachability: a URL that opens in your browser may still be inaccessible from the Portainer host because of firewall, DNS, proxy, or certificate settings.

Simple hosting approaches

  • Repository-hosted file: keep templates.json in a repository and expose a raw HTTP(S) address. This is convenient for review and change history.
  • Web server: serve the file as static content from a web server reachable by the Portainer Server.
  • nginx container: build or run an nginx image that serves the catalog. The documented pattern clones a templates repository, edits templates.json, builds an nginx image, and serves the file at an HTTP URL.

For rapid iteration, mount the JSON file into the nginx container so edits are visible without rebuilding the image. For controlled releases, build an image from a reviewed commit and deploy that image with a pinned tag.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reachability and validation checklist

  • Request the catalog URL from the Portainer Server host, not only from a desktop browser.
  • Confirm that the server returns JSON rather than an HTML login page, redirect, or error document.
  • Use a certificate trusted by the Portainer host when serving over HTTPS.
  • Validate the JSON syntax after every edit.
  • Check that every repository URL and Compose path in the catalog is still reachable.
  • Deploy one entry from a test Portainer environment before publishing the catalog to production users.

Understand the templates.json structure

The official format uses a top-level object with a version value and a templates array. Every template object requires a type and title. Other fields describe the deployment, its visibility, and its source.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Container template: type 1

Type 1 represents a single container. A container entry normally carries the image and runtime settings needed to create that container. Use this type when the application does not need multiple coordinated services.

{
  "version": 2,
  "templates": [
    {
      "type": 1,
      "title": "Example web container",
      "description": "Single-container example for a test endpoint",
      "platform": "linux",
      "categories": ["web"],
      "administrator_only": false,
      "logo": "https://example.invalid/logo.png",
      "note": "Replace the example image and settings before production use"
    }
  ]
}

The example shows the shape of the metadata; the placeholder domain is not a working image or logo location. Replace it with resources you control when implementing a real catalog.

Swarm stack template: type 2

Type 2 represents a Docker Swarm stack. Include the stack’s repository information and Compose path when the deployment source is stored in Git. Swarm-specific placement, secrets, configs, and service constraints belong in the referenced stack file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Compose stack template: type 3

Type 3 represents a Compose stack. The repository object includes a public Git URL and the path to the Compose file, commonly expressed as repository and stackfile. Portainer’s format documentation notes that type 3 is limited to the version 2 stack format because of a docker/libcompose limitation. If your file uses newer Compose features, test the exact Portainer and engine combination instead of assuming the catalog parser will accept it.

{
  "version": 2,
  "templates": [
    {
      "type": 3,
      "title": "Example Compose stack",
      "description": "Compose application stored in a Git repository",
      "platform": "linux",
      "categories": ["utility"],
      "administrator_only": true,
      "repository": {
        "url": "https://git.example.invalid/team/example-stack.git",
        "stackfile": "docker-compose.yml"
      },
      "note": "Pin a reviewed reference before production deployment"
    }
  ]
}

Fields such as description, repository, platform, categories, administrator_only, logo, note, and env are documented as optional metadata or configuration around the required type and title. Keep the catalog entries concise and put detailed operational instructions in the repository documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Maintain templates over time

Pin and review image versions

Use a deliberate image tag or digest and record why it was selected. Floating tags can introduce an unreviewed change the next time someone deploys the template. Schedule upgrades, test them in a disposable endpoint, and update the template only after checking application compatibility and data migration requirements.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Review Git references and paths

A repository-backed template can fail when a branch is renamed, a Compose file moves, access permissions change, or a private repository becomes unreachable. Recheck the reference and Compose path whenever you update the repository structure. If reproducibility matters, reference a release tag or commit rather than a moving branch.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate JSON and Compose syntax

Run a JSON parser against templates.json after each edit. Validate the Compose document with the tooling appropriate to the Portainer and Docker versions you operate. A syntactically valid file can still fail because an image, host path, network, or environment variable is missing, so perform a real test deployment as well.

Control access and secrets

Limit who can create or edit custom templates and who can deploy administrator-only entries. Do not place private keys, production passwords, or tokens in a public repository, a logo URL, a note field, or a default variable value. Review logs and backups for accidental exposure.

Retire stale entries

Remove templates for abandoned images, unsupported platforms, or repositories that no longer receive security updates. A smaller catalog with accurate notes is safer than a long list of entries that deploy unpredictably.

Troubleshoot common failures

Symptom Likely cause What to check
The Custom option is missing Edition, role, endpoint, or Portainer version does not expose the feature Confirm you are in the intended environment, have template-management permission, and are using an edition that supports the required function.
The template saves but deployment fails immediately Invalid Compose syntax, unsupported version, missing image, or malformed variable Validate the file, inspect the rendered values, verify image access, and check the Portainer and engine logs.
A variable appears as literal braces The installation does not support the documented variable controls, or the expression is outside a supported stack field Verify Business Edition availability and the exact variable syntax; test with a harmless value before using a secret.
A Git-backed template cannot load its file Incorrect URL, reference, Compose path, authentication, or TLS setting Open the repository from the Portainer Server network, confirm the path and reference, and fix credentials or certificates rather than broadly disabling verification.
The shared catalog will not load Portainer Server cannot reach the URL or receives invalid JSON Fetch the URL from the server host, inspect HTTP status and content type, validate JSON, and check firewall, DNS, proxy, and certificate rules.
A type 3 entry is rejected The Compose file uses features outside the supported version 2 stack format Check the documented type 3 limitation and test a compatible file or a different deployment method.
The container starts but data disappears No persistent volume, wrong mount path, or a host bind path that does not exist Inspect the generated mounts, verify the volume definition, and test stop, remove, and redeploy behavior before storing real data.

Which approach should you use?

  • Choose the web editor for a small, temporary definition that one administrator maintains.
  • Choose upload when you have a reviewed local Compose file and need to register it quickly.
  • Choose Git for team-owned services, code review, release history, rollback, and repeatable deployments.
  • Choose a shared templates.json catalog when multiple Portainer Server instances need a common menu of applications.
  • Use documented variables when deployers must customize values at launch and your Portainer Business Edition installation supports that control.

Whichever route you choose, treat the template as deployment code: keep its source reviewable, avoid embedded secrets, pin dependencies where practical, test it outside production, and remove entries that no longer describe a supported service.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.