Need to store specific files in $SNAP_DATA directory


hello everybody,

I’m opening this Topic to understand better the argument of the title.

My situation is:

I need to insert some files in the $SNAP_DATA directory during compiling (snapcraft) phase, the software i am snapping is cripted, so i cannot modify it.

is there anyways to do so?
I’ve read the documentation about layouts but it is not really what i’m looking for, i would prefer to not use any binds or symlink.

If you need any more information i will be ready to answer it.

Thank you and great job, i love snaps


The $SNAP_DATA directory doesn’t exist inside the snap, it’s created on the end-user’s system when the snap is installed. If you need to put files inside $SNAP_DATA during the install process, you can use the install hook to copy files from your snap (located at $SNAP) to the user’s $SNAP_DATA folder.

See for more details on using the install hook