How to View cloudSwXtch and swXtchBridge Logs

Prev Next

swx

cloudSwXtch Service Logs

For log requests, the standard Linux command is journalctl. It can be used in a cloudSwXtch with swx-swxtch.service to get a detailed breakdown of its activity, or with swx-bridge.service in a swXtchBridge machine to get a detailed breakdown of its activity.

To find the logs, use the following file path:

  • /var/log/swxtch.

NOTE

The following examples are valid both for a cloudSwXtch or a sXtchBridge, changing only the name of the service

It is recommended for users to send logs from both services to support@swxtch.io. The logs should cover 24 hours’ worth of time, starting from before the issue to up until now.

Users can use any combination of the arguments below to create their logs.

NOTE

It is recommended to read journalctl documentation from its man page.

Accessing and Following Logs (-f)

The following command will begin to display logs for a cloudSwXtch service at the time of the request. The -f argument will Follow the logs and continually update. Logs prior to the call will not display. 

sudo journalctl -t swx-swxtch.service -f

NOTE

The .service is not necessary and will work with or without.

Listing a Certain Number of Lines in a Log (-n)

The following argument can be used to list a specific Number of lines in a log, starting from the earliest, and with the ability to scroll down if the number of lines is greater than what the console can show

sudo journalctl -t swx-swxtch.service -n <number of lines>

Example

sudo journalctl -t swx-swxtch -n 200

Displaying Logs within a Timeframe (--since --until)

The following command will display logs within a set timeframe (between 2 dates). 

sudo journalctl -t swx-swxtch.service --since <yyyy-mm-dd> --until <yyyy-mm-dd>

Example

sudo journalctl -t swx-swxtch --since 2025-10-07 --until 2025-10-08 

--since "Yesterday", "today", "now"

You can also use the words "yesterday," "today" or "now" after --since to get logs from that time period. 

sudo journalctl -t swx-swxtch --since yesterday

Displaying Logs since Last Boot (-b)

To display logs since the last boot, users can use the -b argument. 

sudo journalctl -t swx-swxtch -b

List boots (--list-boot)

The following argument can be used to list all the boots in date/time order. 

sudo journalctl -t swx-swxtch --list-boot

Exporting Logs (>)

You can use the shell output redirector (character >) to send the output of any command to a file if you put the filename right after the character. The following command will export your logs to a .log file. Logs should be emailed to support@swxtch.io

sudo journalctl -t swx-swxtch > <file-name.log>

Example: 

sudo journalctl -t swx-swxtch > cloudswxtch-service.log

You can also combine arguments to export logs from a timeframe or from the last boot. It is recommended that logs should cover 24 hours’ worth of time, starting from before the issue until now. 

Example:

LAST BOOT: 
sudo journalctl -t swx-swxtch -b > cloudswxtch-service.log

TIMEFRAME: 
sudo journalctl -t swx-swxtch --since 2025-10-07 --until 2025-10-08 > cloudswxtch-service.log 

Change Logs to UTC (--utc)

To switch logs from local time to UTC, use the following argument: 

sudo journalctl --utc