2

I am setting up linode server on Ubuntu 16.04 LTS. It will be running only web server with WordPress.

I believe that there are some serviced which I might disable to make the server faster and probably even more secure.

There are questions here about this topic but no answer pointing out exactly what service is safe to disable.

List of service on my server that I got by running ls /lib/systemd/system/*.service /etc/systemd/system/*.service is

/etc/systemd/system/sshd.service
/etc/systemd/system/syslog.service
/lib/systemd/system/accounts-daemon.service
/lib/systemd/system/apt-daily.service
/lib/systemd/system/autovt@.service
/lib/systemd/system/bootlogd.service
/lib/systemd/system/bootlogs.service
/lib/systemd/system/bootmisc.service
/lib/systemd/system/checkfs.service
/lib/systemd/system/checkroot-bootclean.service
/lib/systemd/system/checkroot.service
/lib/systemd/system/console-getty.service
/lib/systemd/system/console-setup.service
/lib/systemd/system/console-shell.service
/lib/systemd/system/container-getty@.service
/lib/systemd/system/cron.service
/lib/systemd/system/cryptdisks-early.service
/lib/systemd/system/cryptdisks.service
/lib/systemd/system/dbus-org.freedesktop.hostname1.service
/lib/systemd/system/dbus-org.freedesktop.locale1.service
/lib/systemd/system/dbus-org.freedesktop.login1.service
/lib/systemd/system/dbus-org.freedesktop.network1.service
/lib/systemd/system/dbus-org.freedesktop.resolve1.service
/lib/systemd/system/dbus-org.freedesktop.timedate1.service
/lib/systemd/system/dbus.service
/lib/systemd/system/debug-shell.service
/lib/systemd/system/emergency.service
/lib/systemd/system/friendly-recovery.service
/lib/systemd/system/fuse.service
/lib/systemd/system/getty@.service
/lib/systemd/system/getty-static.service
/lib/systemd/system/halt.service
/lib/systemd/system/hostname.service
/lib/systemd/system/hwclock.service
/lib/systemd/system/ifup@.service
/lib/systemd/system/initrd-cleanup.service
/lib/systemd/system/initrd-parse-etc.service
/lib/systemd/system/initrd-switch-root.service
/lib/systemd/system/initrd-udevadm-cleanup-db.service
/lib/systemd/system/keyboard-setup.service
/lib/systemd/system/killprocs.service
/lib/systemd/system/kmod.service
/lib/systemd/system/kmod-static-nodes.service
/lib/systemd/system/module-init-tools.service
/lib/systemd/system/motd.service
/lib/systemd/system/mountall-bootclean.service
/lib/systemd/system/mountall.service
/lib/systemd/system/mountdevsubfs.service
/lib/systemd/system/mountkernfs.service
/lib/systemd/system/mountnfs-bootclean.service
/lib/systemd/system/mountnfs.service
/lib/systemd/system/networking.service
/lib/systemd/system/plymouth-halt.service
/lib/systemd/system/plymouth-kexec.service
/lib/systemd/system/plymouth-log.service
/lib/systemd/system/plymouth-poweroff.service
/lib/systemd/system/plymouth-quit.service
/lib/systemd/system/plymouth-quit-wait.service
/lib/systemd/system/plymouth-read-write.service
/lib/systemd/system/plymouth-reboot.service
/lib/systemd/system/plymouth.service
/lib/systemd/system/plymouth-start.service
/lib/systemd/system/plymouth-switch-root.service
/lib/systemd/system/procps.service
/lib/systemd/system/quotaon.service
/lib/systemd/system/rc-local.service
/lib/systemd/system/rc.local.service
/lib/systemd/system/rc.service
/lib/systemd/system/rcS.service
/lib/systemd/system/reboot.service
/lib/systemd/system/rescue.service
/lib/systemd/system/resolvconf.service
/lib/systemd/system/rmnologin.service
/lib/systemd/system/rsync.service
/lib/systemd/system/rsyslog.service
/lib/systemd/system/sendsigs.service
/lib/systemd/system/serial-getty@.service
/lib/systemd/system/setvtrgb.service
/lib/systemd/system/sigpwr-container-shutdown.service
/lib/systemd/system/single.service
/lib/systemd/system/ssh.service
/lib/systemd/system/ssh@.service
/lib/systemd/system/stop-bootlogd.service
/lib/systemd/system/stop-bootlogd-single.service
/lib/systemd/system/systemd-ask-password-console.service
/lib/systemd/system/systemd-ask-password-plymouth.service
/lib/systemd/system/systemd-ask-password-wall.service
/lib/systemd/system/systemd-backlight@.service
/lib/systemd/system/systemd-binfmt.service
/lib/systemd/system/systemd-bootchart.service
/lib/systemd/system/systemd-bus-proxyd.service
/lib/systemd/system/systemd-exit.service
/lib/systemd/system/systemd-fsckd.service
/lib/systemd/system/systemd-fsck-root.service
/lib/systemd/system/systemd-fsck@.service
/lib/systemd/system/systemd-halt.service
/lib/systemd/system/systemd-hibernate-resume@.service
/lib/systemd/system/systemd-hibernate.service
/lib/systemd/system/systemd-hostnamed.service
/lib/systemd/system/systemd-hwdb-update.service
/lib/systemd/system/systemd-hybrid-sleep.service
/lib/systemd/system/systemd-initctl.service
/lib/systemd/system/systemd-journald.service
/lib/systemd/system/systemd-journal-flush.service
/lib/systemd/system/systemd-kexec.service
/lib/systemd/system/systemd-localed.service
/lib/systemd/system/systemd-logind.service
/lib/systemd/system/systemd-machine-id-commit.service
/lib/systemd/system/systemd-modules-load.service
/lib/systemd/system/systemd-networkd-resolvconf-update.service
/lib/systemd/system/systemd-networkd.service
/lib/systemd/system/systemd-networkd-wait-online.service
/lib/systemd/system/systemd-poweroff.service
/lib/systemd/system/systemd-quotacheck.service
/lib/systemd/system/systemd-random-seed.service
/lib/systemd/system/systemd-reboot.service
/lib/systemd/system/systemd-remount-fs.service
/lib/systemd/system/systemd-resolved.service
/lib/systemd/system/systemd-rfkill.service
/lib/systemd/system/systemd-suspend.service
/lib/systemd/system/systemd-sysctl.service
/lib/systemd/system/systemd-timedated.service
/lib/systemd/system/systemd-timesyncd.service
/lib/systemd/system/systemd-tmpfiles-clean.service
/lib/systemd/system/systemd-tmpfiles-setup-dev.service
/lib/systemd/system/systemd-tmpfiles-setup.service
/lib/systemd/system/systemd-udevd.service
/lib/systemd/system/systemd-udev-settle.service
/lib/systemd/system/systemd-udev-trigger.service
/lib/systemd/system/systemd-update-utmp-runlevel.service
/lib/systemd/system/systemd-update-utmp.service
/lib/systemd/system/systemd-user-sessions.service
/lib/systemd/system/udev.service
/lib/systemd/system/ufw.service
/lib/systemd/system/umountfs.service
/lib/systemd/system/umountnfs.service
/lib/systemd/system/umountroot.service
/lib/systemd/system/unattended-upgrades.service
/lib/systemd/system/urandom.service
/lib/systemd/system/ureadahead.service
/lib/systemd/system/ureadahead-stop.service
/lib/systemd/system/user@.service
/lib/systemd/system/uuidd.service
/lib/systemd/system/x11-common.service

I would be great is someone could point out what I can disable. And how.

5
  • 1
    Most of them are system and mandatory services.
    – storm
    Apr 1 '17 at 9:02
  • so is it pointless to look into this?
    – Radek
    Apr 1 '17 at 9:12
  • I dont think there is a sshort anwser to your question possible. What you can disable depends on what you need, which services are you using, what type of devices are you using, etc.
    – psad
    Apr 1 '17 at 10:56
  • 1
    I would suggest, just google something like "ubuntu speed up", there are plenty of howtos with more or less good explanations of what the servies are for, what they do. Its up to you which one do you really need.
    – psad
    Apr 1 '17 at 11:02
  • I thought that saying that it will run only webserver (WordPress) was good enough to give everyone who "knows" what to disable :-) I'll do ubuntu speed up ....
    – Radek
    Apr 1 '17 at 18:25
3

Arbitrarily disabling some of these services wont make your web server faster or more secure. Could you find some that aren't absolutely mandatory? Sure. You can disable rsync and your server won't crash. But your server is neither faster or safer because of this. And, disabling rsync has consequences if/when you decide to use rsync. Identifying services that are superfluous will surely come will a long list of caveats.

For basic security, search the web for articles on how to make your linux server PCI compliant (and review the PCI DSS standard). You will find mass quantities of articles on how to configure basic security elements: local firewall, user password parameters, log storage, etc. The PCI standard isn't the end-all-be-all in security standards. But does have a common sense approach to the minimum security any web server should employ.

For basic performance, look to documents on performance tuning the web server you plan to run, and how to improve wordpress performance. For (trivial) example, optimizing graphics on your site can significantly improve page loading times -- more so than any amount of service disabling could ever achieve. A couple basic bash scripts using curl and date will get you a long way towards understanding if your changes are improving performance. But to truely make a difference in web server performance, you'll have to example ram, cpu, disk, and network load during peak times.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.