Xylok Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Directory Layout and Storage

Default Installation Location

By default, Xylok installs to /opt/xylok and these instructions assume this location. If installed to a different location, adjust the example commands as needed.

Directories in /opt/xylok

Inside the install directory may be a few important directories. Not all will necessarily be present and these will generally be created when Xylok starts if they are needed.

  • _passthrough/: User-accessible location for moving data in and out of the container. While there are other directories mounted into the container, this passthrough directory is the recommended method because there are no automatic cleanups or Xylok processes that directly touch it.
  • ad-certs/: Used for Active Directory certifications when using AD authentication
  • backups/: This directory is the default location for automatic update backups during backups and periodic backups using the built-in script. See Backups for more information.
  • certs/: This directory contains cert.crt and key.key PEM files which will be used by the proxy for HTTPS connections to the server. See the dedicated HTTPS page for more details.

Logs

Xylok logs all data by default to /var/log/xylok. All logs are user and group owned by the xylok user. As of this writing, there are processes in the container which write logs. You will find a corresponding directory inside /var/log/xylok for each of these six and the current log for each is named current.

  • db: The Xylok Postgres server
  • mx: A simple maintenance script which takes care of cleaning old files in temporary directories
  • redis: The Xylok Redis server, which handles user session storage and communication with the backend workers running longer tasks.
  • web: The Xylok frontend, responding to requests when you navigate in the browser
  • worker: The Xylok backend process, handling longer processing tasks
  • api: An additional API interface.

If desired, these logs can be directly accessed. For quick administrative and debugging needs, they can are accessible to two additional ways.

Accessing Logs via the Browser

Super users may access the server logs by logging in to Xylok and going to the User Menu -> Server Logs. The last hundred lines of each current log are recorded here.

Server logs via browser example

Following Logs via the Command Line

For users with access to the command line, or if Xylok is not responding to the web browser, logs can also be quickly checked by running /opt/xylok/xylok logs -f:

root@install-testing /v/l/x/h/certmagic# /opt/xylok/xylok -v logs -f
21:13:32        DEBUG   primaryserver/run.go:83 Configuration ready, logger fully configured    {"path": "/etc/xylok.conf"}
21:13:32        DEBUG   primaryserver/run.go:326        Final configuration     {"config": {"Verbose":true,"ConfigPath":"/etc/xylok.conf","ImageTag":"990f5f","DevMode":false,"AutoStartContainer":true,"AutoStopContainer":true,"SecretKey":"j254rJmg1n4lM
03LgDKNtfIOg4bHguau","RequestAuthMarker":"FycLycSnikdkfOtlLSoIzaego","RedisAddress":"","RedisPassword":"humbly-himmler-rutledge-frazer","PostgresAddress":"","PostgresPassword":"cAQCWzWcvZPSgxMQV5MxrtkxWfJpMKSs","InstallDir":"/opt/xylok","PassthroughDi
r":"/opt/xylok/_passthrough","DataDir":"/var/lib/xylok/","LogDir":"/var/log/xylok/","ADCertificatesDir":"/opt/xylok/ad-certs","UserName":"xylok","UID":996,"GID":996,"Limits":{"Memory":"","CPUShares":0},"ControlSet":"rmfrev4","License":null,"Features":
null,"Logging":{"SimpleLogging":false,"LogRequestHeaders":false,"LogSQL":true},"HTTP":{"AllowSearchIndexing":false,"BindIP":"0.0.0.0","HTTPOnly":false,"HTTPPort":80,"HTTPSPort":443,"ACME":{"Server":"le-production","Email":"support@xylok.io"},"DataDir"
:"/var/lib/xylok/http","FixedCertificatePath":"/opt/xylok/certs/cert.crt","FixedKeyPath":"/opt/xylok/certs/key.key","AllowedDomains":["testing.xylok.io"],"Banner":""},"OtherServers":{"Core":"","TRPC":"","UIComponents":"","Doc":""}}}
redis     : 26:M 28 Apr 2025 21:12:56.096 * 5 changes in 30 seconds. Saving...
redis     : 26:M 28 Apr 2025 21:12:56.097 * Background saving started by pid 868
redis     : 868:C 28 Apr 2025 21:12:56.102 * DB saved on disk
redis     : 868:C 28 Apr 2025 21:12:56.103 * RDB: 0 MB of memory used by copy-on-write
redis     : 26:M 28 Apr 2025 21:12:56.198 * Background saving terminated with success
redis     : 26:M 28 Apr 2025 21:13:27.088 * 5 changes in 30 seconds. Saving...
redis     : 26:M 28 Apr 2025 21:13:27.089 * Background saving started by pid 891
redis     : 891:C 28 Apr 2025 21:13:27.093 * DB saved on disk
redis     : 891:C 28 Apr 2025 21:13:27.094 * RDB: 0 MB of memory used by copy-on-write
web       : INFO: 172.17.0.1 - - [28/Apr/2025:20:59:40 +0000] "GET /reference/benchmark/akamai_ksd_service_il2_ndm_stig/check/05cdc408-3ffe-4ed5-bc2d-23cf826e07d2/?version=20dea1e0-2e94-4db4-9216-503108a2a0d3 HTTP/1.1" 200 25264 "https://xylokproxy" "
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot) Chrome/119.0.6045.214 Safari/537.36"
web       : INFO: Licensed for Xylok, LLC (Xylok)
web       : INFO: 172.17.0.1 - - [28/Apr/2025:20:59:48 +0000] "GET /reference/benchmark/a10_networks_adc_alg_stig/check/5ec0300b-9552-4c24-9e38-f588fc92315c/?version=ee9a393b-f51f-44bb-891f-1663de37e0e7 HTTP/1.1" 200 24779 "https://xylokproxy" "Mozill
a/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot) Chrome/119.0.6045.214 Safari/537.36"
web       : INFO: 172.17.0.1 - - [28/Apr/2025:20:59:48 +0000] "GET /reference/benchmark/a10_networks_adc_alg_stig/check/5ec0300b-9552-4c24-9e38-f588fc92315c/?version=ee9a393b-f51f-44bb-891f-1663de37e0e7 HTTP/1.1" 200 24779 "https://xylokproxy" "Mozill
a/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot) Chrome/119.0.6045.214 Safari/537.36"
web       : INFO: Licensed for Xylok, LLC (Xylok)
web       : INFO: 172.17.0.1 - - [28/Apr/2025:20:59:52 +0000] "GET /reference/benchmark/airwatch_mdm_stig/check/d0d17bdf-ab57-4156-b782-2ab88e73600d/?version=dc4b03fe-7ad1-4678-b507-15d1e976fa3a HTTP/1.1" 200 25623 "https://xylokproxy" "Mozilla/5.0 Ap
pleWebKit/537.36 (KHTML, like Gecko; compatible; Amazonbot/0.1; +https://developer.amazon.com/support/amazonbot) Chrome/119.0.6045.214 Safari/537.36"

This display follows all the current logs, letting you quickly check if particular requests are causing errors.