Making snap of XWiki

hey guys, I wanted to make a snap of the XWiki using the Debian package (Since it already has a working Debian package ).

when you install XWiki it installs a service, it’s registered in systemd. How do I expose the service to the host using the apps part of the snap? I can’t find the service startup script when I unsquashfs the contents of the snap . The startup script is located in


When I use the following location in the command(in apps part): it throws this error

Failed to generate snap metadata: The specified command ‘usr/libexec/tomcat9/’ defined in the app ‘xwiki’ does not exist. Ensure that ‘usr/libexec/tomcat9/’ is installed with the correct path.

thank you :slight_smile:

Hey Wingman,

have you tried building the snap with --debug and/or --shell? That way you could poke around the different stages of the snap and see where is being put.

As for running the systemd service, you are going to have to look into services and daemons when defining it in the app: portion of your snapcraft.yaml.

1 Like

You’re using apt-get to install xwiki. This won’t work to build a snap package. If you want to use a debian package to create the snap from, then you either need to use the dump plugin with the deb package listed as the source: entry, or you need to use package-repositories: to configure your debian package store and signing key and then list the package name in stage-packages:


hey @Kjell, I tried looking into the snap with --debug and was able to find where the tomcat-start. sh file is located .(usr/libexec/tomcat9/ But I can’t seem to use the file location in the app part (file or folder does not exist ). will just adding the file in the command make it work? (the service might need a lot of things and I don’t really understand how to make it work ?)

how can I access those files?

have updated my parts to the following :



plugin: dump
source: ./xwiki-tomcat9-mysql_14.4.1_all.deb
source-type: deb

thanks :slight_smile: