> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axottle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# External PostgreSQL

> Install a new Remnawave database or transfer data to an existing PostgreSQL with verification and return of the original connection.

Remnawave can use PostgreSQL on a separate server.
Compose project or managed database provider. Axottle defines active
base on the actual `DATABASE_URL` container panel.
PostgreSQL next to the panel does not replace this connection.

Open **Remnawave → desired panel → Status → External database**.
First, detect the running stack. For remote Remnawave
You can also upgrade to its Axottle Agent, which requires access to Remnawave backups.

## Install a new PostgreSQL

1. Press **Configure external database → Install the new PostgreSQL**.
2. Select a server from the park or select another SSH host.
   and the user is substituted from the node settings.
3. Specify SSH-access to the database server. if Remnawave works separately from
   Axottle, the wizard, will also request SSH access to the Remnawave server itself.
4. Specify the private or VPN address of the new database, free port and IP or subnet,
   From which the database server sees Remnawave after NAT.
   Public bind address, `0.0.0.0` and access from the entire Internet are not allowed.
5. Check the name of the base, user and summary, then start the installation.

Axottle will install Docker if necessary and a separate PostgreSQL 17
with its own volume, random password and limited connection sources.
Verification is done from the Remnawave network.
It continues to work with the previous base.

## Use the existing DB

In the same wizard, select **Use the existing BD**.
Port, database, user, password and TLS. Target PostgreSQL should be
version of **17**, base - dedicated to Remnawave and empty.
rights to create diagrams and tables, including the `public` diagram.

You don't need an SSH on the server. Remnawave requires SSH on the server.
to its server: from there checks and transfers are performed.

| TLS | When using | |
| - | - | - |
| Complete Certificate and | Name Verification by Default; For your CA, specify the path of the certificate already mounted in the Remnawave | container |
| TLS without | Certificate Verification The connection is encrypted, but the identity of the server is not verified by | |
| No TLS | For a prepared private network, if your | configuration permits. |

Click **Check the existing BD**. Axottle will check the availability, version,
void of the base and the right to set up facilities.
After the inspection is complete, the current panel continues to work.

## Transfer data and connect

When the state **is ready to transfer**, press \*\* Transfer data
and connect \*\* and confirm the temporary stop of Remnawave.

Axottle will stop the panel, remove the final dump, restore it to the target database.
Verify the number of users and nodes, change the connection in Compose, launch
Remnawave and check its API. The source base stays in place.

For an existing database, the target is re-checked before the panel stops and before
Transfer to the current or occupied base is rejected.
It is executed in a single transaction without deleting existing target objects.

The wizard supports the Remnawave stack with one Compose file and the right to change it.
Other parameters are saved; YAML formatting and comments can be
Don't start moving the same panel to another server while you're working.

## Verification

1. Wait for the final status of the connection, not just the acceptance of the command.
2. Repeat the runtime detection and check the address, port, and name of the external base.
3. Open Remnawave and check users, nodes, and API availability.
4. In [profile backup](https://docs.axottle.com/en/remnawave/backups.md) check access, create an archive
   and perform a check on its integrity.

Backups run from Remnawave host; separate Agent on PostgreSQL server
The PostgreSQL client uses a temporary Docker container.
usually `postgres:17`. The image must be available on the artist's host.
With a non-standard version of the server, select a compatible client through
`AXOTTLE_RW_PGTOOLS_IMAGE`; `pg_dump` should not be older than the server.

TLS files must be accessed in the Remnawave container.
the user or database has changed after detection, the operation stops
Repeat detection after changing the settings.
Changing the password does not require resaving the backup profile.

## Rollback

When a switching error occurs, Axottle tries to return the original connection.
If the return is not completed or Axottle restarted during the switch,
The card will prompt **to restore the original connection**. Confirm the action;
Access to a new DB server is not required.

> [!WARNING]
>
> Records that appeared in the new database after the launch of Remnawave, when returning to the original
> The base is not portable. The reconnection does not connect the two bases.

If the recovery in the existing database is completed and the panel is then checked
If it fails, the copied data stays on target.
select another empty base or prepare the previous one manually: its master
It doesn't automatically clean.

The original Compose is stored alongside `<compose>.axottle-<setup-id>.before`.
Dump - in the Axottle `remnawave-database-setups/<setup-id>/source.rwbak` data catalog.
These copies are not in the shelf life of conventional backups.
on the selected server in `/opt/axottle/remnawave-databases/<setup-id>`.

**Complete without connection** leaves installed PostgreSQL and data.
After successful connection or termination without it saved in Axottle
SSH details and job secrets are deleted. Secrets are not returned in API responses.
They don't show up on the progress screen.

If you need to transfer the panel itself along with the data to a new server, use it.
[Remnawave](https://docs.axottle.com/en/remnawave/migration.md).

Features depend on the installed build; transfer on live servers within this reconciliation was not performed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.