[Unit]
Description=Mattermost
After=network.target
After=postgresql.service
BindsTo=postgresql.service
[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
KillMode=mixed
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152
[Install]
WantedBy=multi-user.target
-
Set
DriverName
to"postgres"
. This is the default and recommended database for all Mattermost installations. -
Set
DataSource
to"postgres://mmuser:<mmuser-password>@<host-name-or-IP>:5432/mattermost?sslmode=disable&connect_timeout=10"
replacingmmuser
,<mmuser-password>
,<host-name-or-IP>
, andmattermost
with your database name. -
Set your
"SiteURL"
: The domain name for the Mattermost application (e.g.https://mattermost.example.com
).