Server File System Layout
  • 24 Dec 2024
  • 1 Minute to read
  • Dark
    Light

Server File System Layout

  • Dark
    Light

Article summary

If installing Polarity Server onto a single server, we recommend placing your PostgreSQL installation on a separate partition from your Operating System (OS) partition.  In addition, we recommend placing your system audit logs (found by default in /var/logs/audit) into their own partition so that in the event application logs fill up your OS partition, the system audit logs can continue to be written. 

In general, we recommend a mirrored (RAID 1) setup for your OS partition, and a RAID 10 (1+0) setup for your database partition.  The size of the partitions and the types of disks used will depend on the number of simultaneous users you expect to be connected as well as the amount of data (tag, entities, and comments) that you expect to store directly in Polarity. 

For the PostgreSQL partition we recommend sizing the disks so that the total disk space is equal to the required space for your data plus 30% for the overhead of Postgres logs, caches, and other database operations. In general, we recommend the use of SSD drives over spinning disks.

Important File System Locations

Log file locations

Software

Directory

Filename

Polarity Platform 

/var/lib/docker/containers<platform container name> 

<platform container name>-json.log

Polarity Integrations

/app/integrations/<integrationName>/logs

integration.log

Polarity Web

/var/lib/docker/containers<web container name> 

<web container name>-json.log

Redis Caches & OS 

/var/log

messages

PostgreSQL 

/var/lib/pgsql/<version>/data/logs

Postgresql-<Day>.log

System Audit

/var/log/audit

audit.log

Important Default File System Locations

  /app

  Contains Polarity Software

/app/caddy

Contains Polarity Caddy Configurations

/app/certs/polarity.pem /app/caddy/config/server.crt

SSL Public Certificate (both)

/app/certs/polarity_key.pem /app/caddy/config/server.key

SSL Certificate Private Key (both)

/app/certs/ca/{{CApubcert.crt/.pem}} /app/caddy/config/{{CApubcert.crt/.pem}}

Certificate Authority Public Certificate

/var/lib/pgsql/{{13/15}}/data

PostgreSQL configuration and database data

/var/lib/docker

Contains Polarity Container Images

Default Mount Points

When installing Polarity software onto a single server we recommend putting the OS partition, PostgreSQL partition, and Polarity software partition on separate volumes.  The table below shows the default filesystem locations for the OS, PostgreSQL, and Polarity.

Name

Mount Point

FS

Min Size

OS partition

/

XFS

24 GB

PostgreSQL & Docker

/var/lib

XFS

80 GB

Polarity

/app

XFS

40 GB

Note

When possible, we would recommend mounting /, /var, and /app onto different disks.


Was this article helpful?