# Packages Tutorial

**URL:** https://community.zammad.org/t/packages-tutorial/12079
**Category:** Development
**Tags:** packages, docs, custom-development, tutorial, zpm
**Created:** [August 28, 2023, 7:58am UTC](https://community.zammad.org/t/packages-tutorial/12079 "2023-08-28T07:58:02Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![rolfschmidt](https://community.zammad.org/user_avatar/community.zammad.org/rolfschmidt/32/3368_2.png) [@rolfschmidt](https://community.zammad.org/u/rolfschmidt)
#### Post date: [August 28, 2023, 8:00am UTC](https://community.zammad.org/t/packages-tutorial/12079/3 "2023-08-28T08:00:52Z")

</div>

# Basics

Zammad contains the functionality to install and remove packages. You can find the package manager in the admin interface:

Admin → Packages

To install a package, you will need a package build:

A \*.zpm

ZPM stands for Zammad Package Module. It can be selected and installed. Afterwards in the top there will be list of commands which the normal administrator wants to execute.

`root> zammad config:set BUNDLE_DEPLOYMENT=0`  
`root> zammad run bundle config set --local deployment 'false'`

These commands will allow package installations to handle custom gem files. In zammad it is also possible to inject your own gem files to include own libraries for your custom development.  
To introduce your own gem files, you need to create them with the following naming: `Gemfile.local.ExampleTestPackage`. All `Gemfile.local*` will be included into the bundle install.

`root> zammad run bundle install`

If your package contains a local gem file, then the 3 upper commands will be shown in the admin interface. This command is needed to install gems of zammad and also of your custom developments.

`root> zammad run rake zammad:package:migrate`

This command will run all specific package migrations. They are handled over a non-rails zammad specific code, which will save executed package migrations and run them only once per install and once per removal of the package.

`root> zammad run rake assets:precompile`

This command will compile all assets for zammad. You want to run this command always if you have installed a new package with frontend files like `*.js`, `*.coffee`, `*.jst.eco` or `*.css`.

`root> zammad run rake zammad:package:post_install`

With newer systems you will only see this command left. It is a coombination of the previous commands and will run the commands which are needed. It simplifies package installations and also provides the foundation for the new tech stack which includes new commands. Since this tutorial is focused on the old tech stack, we will leave it with that for now ([zammad/lib/tasks/zammad/package/post\_install.rb at c81e7ad5a99b76bc76175731c710e298092db218 · zammad/zammad · GitHub](https://github.com/zammad/zammad/blob/c81e7ad5a99b76bc76175731c710e298092db218/lib/tasks/zammad/package/post_install.rb)).

`root> systemctl restart zammad`

This commands obviously restarts zammad. Changes of your ruby files will get activated after the restart.

---

_[View the full topic](https://community.zammad.org/t/packages-tutorial/12079)._
