Error code 255 when using script

Duplicati - in a Docker in my unRAID.

I am trying to use the options “–run-script-before-required” and “–run-script-after” to trigger some actions but I am always getting an error: The script “/path/to/script/” returned with exit code 255.

I’ve searched for error code 255 without much luck.

The path is accessible inside and outside the container. I can even run manually the script if I am inside the docker container without any problem.

Does you script exit with a specific exit code?
255 is a general failure error code.

There are some examples that ship with Duplicati (not sure where they are in Linux) that can give you an example of generating a return code.

Try a simple script, such as “env >/tmp/env.txt” to verify that the script is being called, and then make sure to add an exit code.

Most scripts default to existing with exit code 0, but some commands will exit with 255.

Oh, and keep in mind that if duplicati is running as a service, it won’t have a profile, so you’ll have to set any PATH or similar requirements.

Share your script if you want some add’l thoughts.

My script should return exit code 0. The funny thing is that after I started and stopped the Docker container I don’t get an error code anymore, however the script is not been called by the Duplicati job and via command line I get an error code 1


curl -k -s \
-X POST \ \
-d text="$1" \
-d chat_id=12345678 \

exit 0
Backup started at 11/12/2017 1:15:33 AM
Checking remote backup ...
  Listing remote folder ...
Scanning local files ...
  2 files need to be examined (3.84 KB) (still counting)
  0 files need to be examined (0 bytes)
No remote filesets were deleted
Checking remote backup ...
  Listing remote folder ...
removing file listed as Temporary:
removing file listed as Temporary:
Verifying remote backup ...
Remote backup verification completed
  Downloading file (517.90 KB) ...
  Downloading file (100.67 KB) ...
  Downloading file (49.92 MB) ...
  Duration of backup: 00:00:11
  Remote files: 1060
  Remote size: 25.79 GB
  Files added: 0
  Files deleted: 0
  Files changed: 0
  Data uploaded: 0 bytes
  Data downloaded: 50.52 MB
Backup completed successfully!
Return code: 1

I wonder if the curl command is returning the error and exiting the script. Try replacing that with something innocuous, like “touch /tmp/blah”


I started from scratch everything (Docker, Duplicati Jobs, Script) and now it is working fine.

Sorry we weren’t able to figure out the original cause, but I’m glad to hear things are working correctly for you now.