Alter server to store template to database