# Changes to a configuration file are overwritten

UrbeStack sysadmin note about UrbeStack. Last updated 30 Nov 2026.

An edit to a configuration file disappears after the next change you make in the panel. Files that start with `Managed by UrbeStack` are rewritten, so use the location that preserves your changes for each daemon.

## Symptoms

An edit to a file such as a site's Apache configuration, Postfix's `main.cf`, or a zone file disappears after a change in UrbeStack or a run of `urbestack-rebuild`. The file's first line says `Managed by UrbeStack`.

## Cause

UrbeStack rewrites these files from its database and templates on every change and when you run `urbestack-rebuild`. Editing the file directly changes neither the database nor the template.

## Resolution

- For server-wide Apache settings, use `urbestack-web-server-set`. It writes the file UrbeStack keeps for those settings, which Apache reads after its own files.
- For MariaDB, use the distribution's configuration files. UrbeStack leaves them alone. A file you add that sorts after `zz-urbestack.cnf` also overrides the few settings UrbeStack writes.
- For a site's PHP settings, use `urbestack-domain-set --php-setting`.

For other changes, copy the template into the overrides folder under the same name. Edit the copy before running `urbestack-rebuild`. Updates leave the overrides folder alone.

```
cp /usr/local/urbestack/templates/dovecot.conf.tmpl /usr/local/urbestack/overrides/
urbestack-rebuild
```

The copy replaces UrbeStack's template on future rebuilds, including after updates. To restore the original template, delete the copy and run `urbestack-rebuild` again.

If the problem persists after you follow this note, you can [open a support ticket](https://support.urbestack.com/new?type=support). Including the output of the commands you ran helps support diagnose the problem.
