Skip to content

Move Mattermost systemd unit file from /lib/systemd/system to /etc/systemd/system - #9129

Merged
mrckndt merged 1 commit into
mattermost:masterfrom
mrckndt:clarify-systemd-unit-file-location
Aug 6, 2026
Merged

Move Mattermost systemd unit file from /lib/systemd/system to /etc/systemd/system#9129
mrckndt merged 1 commit into
mattermost:masterfrom
mrckndt:clarify-systemd-unit-file-location

Conversation

@mrckndt

@mrckndt mrckndt commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • /lib/systemd/system (aliased to /usr/lib/systemd/system on merged-usr systems) is reserved for unit files installed and owned by a package manager. Our tarball and RHEL install guides have the admin create the Mattermost unit file by hand, so /etc/systemd/system is the correct location.
  • Updates the unit file creation step in the tarball and RHEL install guides, with a note that earlier versions of the guide used /lib/systemd/system.
  • Updates every downstream reference to the unit file path (troubleshooting guide, transport encryption guide, MySQL/database prep guides) for consistency. Two other pages already referenced /etc/systemd/system for this file, so this also removes an existing inconsistency rather than introducing one.

…stemd/system

/lib/systemd/system is reserved for package-manager-owned unit files. Since
our guides have the admin create this file by hand, /etc/systemd/system is
the correct location. Updates the install guides and downstream references
to the unit file path for consistency.
@mrckndt
mrckndt requested review from jlandells and shiftZZnet August 6, 2026 09:06
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f8611312-929c-4593-b0f2-4841101afe4a

📥 Commits

Reviewing files that changed from the base of the PR and between 1f18f95 and 2bbaa46.

📒 Files selected for processing (6)
  • source/administration-guide/configure/configuration-in-your-database.rst
  • source/deployment-guide/server/linux/deploy-rhel.rst
  • source/deployment-guide/server/linux/deploy-tar.rst
  • source/deployment-guide/server/prepare-mattermost-mysql-database.rst
  • source/deployment-guide/server/troubleshooting.rst
  • source/deployment-guide/transport-encryption.rst

📝 Walkthrough

Walkthrough

The documentation now uses /etc/systemd/system/mattermost.service for Mattermost systemd units. RHEL and tar deployment instructions also note that /lib/systemd/system/ is reserved for package-managed unit files.

Changes

Systemd unit path documentation

Layer / File(s) Summary
Deployment unit creation
source/deployment-guide/server/linux/deploy-rhel.rst, source/deployment-guide/server/linux/deploy-tar.rst
Deployment commands and editing instructions now use /etc/systemd/system/mattermost.service. The guides identify /lib/systemd/system/ as reserved for package-managed unit files.
Service path references
source/administration-guide/configure/configuration-in-your-database.rst, source/deployment-guide/server/prepare-mattermost-mysql-database.rst, source/deployment-guide/server/troubleshooting.rst, source/deployment-guide/transport-encryption.rst
Service path examples and status commands now use /etc/systemd/system/mattermost.service.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary documentation change: moving manually created Mattermost systemd unit files to /etc/systemd/system.
Description check ✅ Passed The description directly explains the systemd path change, its rationale, and the documentation updates included in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shiftZZnet

Copy link
Copy Markdown

Reviewed changes, looks great. Thanks for implementing.

@shiftZZnet shiftZZnet closed this Aug 6, 2026
@shiftZZnet shiftZZnet reopened this Aug 6, 2026

@shiftZZnet shiftZZnet left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks fine, thanks for implementing, changes approved.

@mrckndt
mrckndt merged commit 0a52646 into mattermost:master Aug 6, 2026
11 checks passed
@mrckndt
mrckndt deleted the clarify-systemd-unit-file-location branch August 6, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants