Short answer

Run sudo journalctl -u nginx to see one service’s logs (use your service’s name). Add -f to follow new lines, -n 50 for the last 50, -p err for errors only, --since "1 hour ago" for a time window, and -b -1 for the boot before the last reboot. Without sudo, you see nothing from system services.

Tested on Ubuntu 26.04 and 24.04, two separate runs. On 24.04, every step is the same. Everything that differed

The example service

To show every option on the same lines, the test server got a small backup job, backup.service, that prints an info line, a warning and an error, then fails:

/usr/local/bin/backup-job
#!/bin/shecho "<6>backup started"echo "<4>backup: 2 files skipped"echo "<3>backup failed: disk full"exit 1

The <6>, <4> and <3> at the start of each line set its priority (info, warning, error). journald reads that prefix from any service’s output and removes it, so the error is filed as an error. Your own services already log this way, or through syslog with a priority.

Why journalctl shows nothing without sudo

Server
$ journalctl -u backup --no-pagerHint: You are currently not seeing messages from other users and the system.      Users in groups 'adm', 'systemd-journal' can see all messages.      Pass -q to turn off this notice.-- No entries --
Output hidden (4 lines)

A normal user sees only their own messages. The hint names the two groups that may read everything. Use sudo, or add yourself to a group (at the end).

Step 1: One service’s logs

Server
$ sudo journalctl -u backup --no-pagerNov 19 22:51:18 web-server systemd[1]: Starting backup.service - Nightly backup...Nov 19 22:51:18 web-server backup-job[2063]: backup startedNov 19 22:51:18 web-server backup-job[2063]: backup: 2 files skippedNov 19 22:51:18 web-server backup-job[2063]: backup failed: disk fullNov 19 22:51:18 web-server systemd[1]: backup.service: Main process exited, code=exited, status=1/FAILURENov 19 22:51:18 web-server systemd[1]: backup.service: Failed with result 'exit-code'.Nov 19 22:51:18 web-server systemd[1]: Failed to start backup.service - Nightly backup.
Output hidden (7 lines)

systemd’s own lines (Starting, exited with status 1, Failed) sit between the program’s lines, so you see what the program said and what systemd did about it. --no-pager prints everything at once; without it, journalctl opens a pager (q to quit, G to jump to the end). The last lines only:

Server
$ sudo journalctl -u backup --no-pager -n 2Nov 19 22:51:18 web-server systemd[1]: backup.service: Failed with result 'exit-code'.Nov 19 22:51:18 web-server systemd[1]: Failed to start backup.service - Nightly backup.
Output hidden (2 lines)

Step 2: Follow new lines as they come

-f keeps running and prints each new line, like tail -f; press Ctrl+C to stop. Here it ran for 6 seconds while the job was started again in the background:

Server
$ (sleep 2; sudo systemctl start backup) & sudo timeout 6 journalctl -u backup -f -n 0[1] 2556Job for backup.service failed because the control process exited with error code.See "systemctl status backup.service" and "journalctl -xeu backup.service" for details.Nov 19 22:51:24 web-server systemd[1]: Starting backup.service - Nightly backup...Nov 19 22:51:24 web-server backup-job[2567]: backup startedNov 19 22:51:24 web-server backup-job[2567]: backup: 2 files skippedNov 19 22:51:24 web-server backup-job[2567]: backup failed: disk fullNov 19 22:51:24 web-server systemd[1]: backup.service: Main process exited, code=exited, status=1/FAILURENov 19 22:51:24 web-server systemd[1]: backup.service: Failed with result 'exit-code'.Nov 19 22:51:24 web-server systemd[1]: Failed to start backup.service - Nightly backup.
Output hidden (10 lines)

The first lines are the background systemctl start reporting that the job failed; then come the job’s lines as journald received them. -n 0 skips the old lines. In everyday use: sudo journalctl -u backup -f.

Step 3: Only errors, a time window, a word

Server
$ sudo journalctl -u backup -p err --no-pagerNov 19 22:51:18 web-server backup-job[2063]: backup failed: disk fullNov 19 22:51:18 web-server systemd[1]: Failed to start backup.service - Nightly backup.Nov 19 22:51:24 web-server backup-job[2567]: backup failed: disk fullNov 19 22:51:24 web-server systemd[1]: Failed to start backup.service - Nightly backup.
Output hidden (4 lines)

-p err shows errors and anything worse; the info and warning lines are gone. -p warning would add the warnings. A time window takes plain words:

Server
$ sudo journalctl -u backup --since "10 min ago" --no-pager | tail -n 3Nov 19 22:51:24 web-server systemd[1]: backup.service: Main process exited, code=exited, status=1/FAILURENov 19 22:51:24 web-server systemd[1]: backup.service: Failed with result 'exit-code'.Nov 19 22:51:24 web-server systemd[1]: Failed to start backup.service - Nightly backup.
Output hidden (3 lines)

--since and --until also take today, yesterday or "2026-11-19 21:00". -g searches the message text (a regular expression):

Server
$ sudo journalctl -u backup -g "disk full" --no-pagerNov 19 22:51:18 web-server backup-job[2063]: backup failed: disk fullNov 19 22:51:24 web-server backup-job[2567]: backup failed: disk full
Output hidden (2 lines)

And -o cat prints only the messages, handy to copy into a bug report:

Server
$ sudo journalctl -u backup -o cat --no-pager -n 4backup failed: disk fullbackup.service: Main process exited, code=exited, status=1/FAILUREbackup.service: Failed with result 'exit-code'.Failed to start backup.service - Nightly backup.
Output hidden (4 lines)

Step 4: Logs from before a reboot

Ubuntu keeps the journal on disk, in /var/log/journal, so it survives a reboot:

Server
$ ls -d /var/log/journal/var/log/journal
Output hidden (1 line)
Server
$ sudo reboot

After the server is back, list the boots the journal knows:

Server
$ sudo journalctl --list-boots --no-pagerIDX BOOT ID                          FIRST ENTRY                 LAST ENTRY -1 ccde594eaff840088ea00e684662f0d3 Thu 2026-11-19 22:51:04 UTC Thu 2026-11-19 22:51:32 UTC  0 114d8eb03fa34ba994f35a320dc921aa Thu 2026-11-19 22:51:36 UTC Thu 2026-11-19 22:51:45 UTC
Output hidden (3 lines)

0 is this boot, -1 the one before. -b alone means this boot, where the job has not run yet:

Server
$ sudo journalctl -u backup -b --no-pager-- No entries --
Output hidden (1 line)
Server
$ sudo journalctl -u backup -b -1 --no-pager -n 6Nov 19 22:51:24 web-server backup-job[2567]: backup startedNov 19 22:51:24 web-server backup-job[2567]: backup: 2 files skippedNov 19 22:51:24 web-server backup-job[2567]: backup failed: disk fullNov 19 22:51:24 web-server systemd[1]: backup.service: Main process exited, code=exited, status=1/FAILURENov 19 22:51:24 web-server systemd[1]: backup.service: Failed with result 'exit-code'.Nov 19 22:51:24 web-server systemd[1]: Failed to start backup.service - Nightly backup.
Output hidden (6 lines)

The lines from before the reboot are still there. This is how you find out why a server went down: sudo journalctl -b -1 -n 50 shows the last lines it wrote.

Step 5: How much disk the journal uses, and a limit

Server
$ sudo journalctl --disk-usageArchived and active journals take up 16M in the file system.
Output hidden (1 line)

Without a setting, journald picks its own limit from the size of the disk, and a busy service can fill it. Set your own limit in a drop-in file instead of editing journald.conf, so a package update never asks about it:

Server
$ sudo mkdir -p /etc/systemd/journald.conf.d
Server
$ sudo tee /etc/systemd/journald.conf.d/size.conf <<'EOF'[Journal]SystemMaxUse=200MEOF[Journal]SystemMaxUse=200M
Output hidden (2 lines)
Server
$ sudo systemctl restart systemd-journald
Server
$ sudo journalctl -u systemd-journald -b --no-pager | grep -m 1 -i "max 200"Nov 19 22:51:47 web-server systemd-journald[2017]: System Journal (/var/log/journal/d1a1e42b92c742d58506c03f78260355) is 16M, max 200M, 183.9M free.
Output hidden (1 line)

journald’s own start line confirms the new maximum. Older entries go first when it is reached. To delete old entries now, by age (or --vacuum-size=100M by size):

Server
$ sudo journalctl --vacuum-time=2weeksVacuuming done, freed 0B of archived journals from /var/log/journal.Vacuuming done, freed 0B of archived journals from /run/log/journal.Vacuuming done, freed 0B of archived journals from /var/log/journal/d1a1e42b92c742d58506c03f78260355.
Output hidden (3 lines)

On a fresh server nothing is old enough yet, so it freed 0 bytes.

Read the journal without sudo

Add your user to systemd-journal, one of the two groups the hint names (it gives read-only access to every log). Log out and in again for the group to apply:

Server
$ sudo usermod -aG systemd-journal deploy
Server
$ id -nGdeploy sudo users systemd-journal
Output hidden (1 line)
Server
$ journalctl -u backup -b -1 -g "disk full" --no-pagerNov 19 22:51:18 web-server backup-job[2063]: backup failed: disk fullNov 19 22:51:24 web-server backup-job[2567]: backup failed: disk full
Output hidden (2 lines)

The configuration files, ready to copy

The drop-in as it was on the test server once journald had applied it.

The journal size limit
/etc/systemd/journald.conf.d/size.conf
[Journal]SystemMaxUse=200M

Read back from the test server (Ubuntu 26.04) on 2026-11-19, after the steps had worked. Placeholders such as [password]: type your own value in the box above the file to fill them in, or replace them yourself.

Troubleshooting

  • “Hint: You are currently not seeing messages from other users and the system”: use sudo, or join systemd-journal. Details.
  • -- No entries --: wrong unit name (check with systemctl list-units --type=service), or the service has not logged in this boot; try without -b, or -b -1. Details.
  • The logs from before a reboot are gone: the journal was kept in memory only; /var/log/journal must exist (it does on Ubuntu). Details.
  • The journal takes too much disk: set SystemMaxUse= in a drop-in and vacuum. Details.

What these steps changed on the server

Both runs recorded the server before the first step and after the last (see the Tested on box below): the size drop-in in /etc/systemd/journald.conf.d/ and the group change for deploy. Nothing was installed.

Ubuntu 26.04 vs 24.04

The same check ran on a fresh 26.04 server and on a fresh 24.04 server, each with its own run log. Every command printed the same lines; only small details differed:

WhatUbuntu 26.04Ubuntu 24.04
SystemUbuntu 26.04.1 LTS7.0.0-43-genericUbuntu 24.04.5 LTS6.8.0-147-generic
systemd259.9-0ubuntu0.1255.4-1ubuntu8.18
journald’s start line with the 200M limitmax 200Mmax 200.0M
Journal size on a fresh server (--disk-usage)16M22.8M
ProofRun log, 25 checks passedRun log, 25 checks passed