# How to secure the Linux server?

**URL:** https://meta.discourse.org/t/how-to-secure-the-linux-server/143785
**Category:** Self-hosting
**Tags:** hosting
**Created:** [March 10, 2020, 10:07am UTC](https://meta.discourse.org/t/how-to-secure-the-linux-server/143785 "2020-03-10T10:07:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dalerka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dalerka/32/120265_2.png) [@dalerka](https://meta.discourse.org/u/dalerka)
#### Post date: [March 10, 2020, 10:07am UTC](https://meta.discourse.org/t/how-to-secure-the-linux-server/143785/1 "2020-03-10T10:07:11Z")

</div>

I’m going through the following guide and would appreciate any comments about:

1. Which things described in this guide are **absolutely must do**?
2. Which things **may cause issues with Discourse** administration or usage? (e.g. reboots with unattended upgrades).

[https://github.com/imthenachoman/How-To-Secure-A-Linux-Server](https://github.com/imthenachoman/How-To-Secure-A-Linux-Server)

Although the guide is focused on securing a home-based (private) server, I think it’s relevant for self-hosting.

I’m using `Ubuntu 18.04` FYI and already enabled the security recommendations as per [Discourse INSTALL guide](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md#post-install-maintenance)

Are the following recommendations suitable (won’t conflict) for the normal work of a Discourse forum?

[Automatic Security Updates](https://github.com/imthenachoman/How-To-Secure-A-Linux-Server#automatic-security-updates-and-alerts)

[Firewall with UFW](https://github.com/imthenachoman/How-To-Secure-A-Linux-Server#firewall-with-ufw-uncomplicated-firewall)

[Anti-Virus Scanning and Rootkit detection](https://github.com/imthenachoman/How-To-Secure-A-Linux-Server#anti-virus-scanning-with-clamav-wip)

[Gmail and Exim4 As MTA With Implicit TLS](https://github.com/imthenachoman/How-To-Secure-A-Linux-Server#gmail-and-exim4-as-mta-with-implicit-tls)

[iptables Intrusion Detection And Prevention with PSAD](https://github.com/imthenachoman/How-To-Secure-A-Linux-Server#iptables-intrusion-detection-and-prevention-with-psad)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [March 10, 2020, 11:26am UTC](https://meta.discourse.org/t/how-to-secure-the-linux-server/143785/2 "2020-03-10T11:26:57Z")

</div>

I support automatic security updates, UFW hardening

Use something like mailgun for discourse emails.

Everything else is probably unnecessary.
