Rebuild failing, templates missing

I get the following error

cat: templates/postgres.template.yml: No such file or directory
cat: templates/redis.template.yml: No such file or directory
cat: templates/web.template.yml: No such file or directory
cat: templates/web.ratelimited.template.yml: No such file or directory
cat: templates/web.ssl.template.yml: No such file or directory
cat: templates/web.letsencrypt.ssl.template.yml: No such file or directory

Every time I do a rebuild and I can no longer operate my instance, how would I recover it?

1 Like

It looks like you’ve somehow deleted the templates directory?

If you have a recent backup, the surest solution would be to re-install and restore the backup. If not, it’s hard to guess here what the problem might be.

The information that is helpful, you deleted in the other topic.

Don’t do that. Move it back to /var/discourse.

If you want to move it somewhere else, you’re on your own.


Move all the files and directories back where they should be.

You cant just move files and directories around.


I figured out the solution, if you edit app.yml sources, you can change the directory of discourse (I had it located on a different volume. I ended up just taking a backup of it and creating a new instance in the edited directory, then uploading the backup.

1 Like

Be really careful skiing off-piste. You will get less support here, because you make it harder to provide support.


It works exactly the same, it’s even supported in the app.yml file. Moving it was a little risky and that was the only bad part, but creating an instance in another directory is completely supported.

1 Like

I trust you will chime in when the next user comes to #support on that topic :wink:


In terms of the free support provided here we can really only assist with the standard install which uses /var/discourse.

The joys of open source mean that yes, you can color outside the lines if you want, but likewise it’s going to severely limit the amount of assistance we can provide you with.

Being docker-based, there’s no need to create an instance in a different directory, you can run multiple configurations from the same path by defining separate containers.