Self-hosting means running your own apps, such as file sharing or media streaming, on a computer you control.
This guide is for people who run, or want to run, a home server for files, photos or films. It uses Nextcloud and Plex as examples, listed alphabetically. You need basic comfort with your home router, but no coding.
In short
- The biggest choice is how you reach your server from outside your home.
- Opening a port on your router puts the server on the public internet. A VPN or tunnel can keep it more hidden.
- Keep the server, its apps and your router up to date, with automatic updates where you can.
- Back up your data to a separate place, and check the backups work.
What you will learn
- Compare three ways to reach a home server from outside.
- Explain why updates matter more when you run the server yourself.
- Set up a backup that survives a broken or infected server.
- Protect the accounts that control your server.
- Home server
- a computer at home that runs apps for you and your family.
- Router
- the box that links your home network to the internet.
- Port
- a numbered door that lets a certain kind of traffic reach a device.
What is self-hosting?
Think of self-hosting like growing your own vegetables instead of buying them. You get more control, but you also do the weeding, watering and pest control yourself.
With a cloud service, the company keeps the servers updated and backed up. When you self-host, those jobs are yours. In this guide, Nextcloud stands for a files app and Plex for a film and music app.
Many people want to use these apps away from home. Plex calls this Remote Access, and you turn it on in the server's settings [1]. How you open that remote door is the most important security choice you make.
Where the comparison stops working: pests in a garden stay local. A server on the internet can be found and probed by people anywhere in the world.
Why does it matter?
Home servers often hold family photos, documents and passwords. If someone breaks in, they could read, lock or delete them.
If you run a home server
What could happen: an old, unpatched app on an open port is found and taken over.
Check this: which ports your router forwards, and whether automatic updates are on.
If you share the server with family
What could happen: a family member reuses a weak password, and someone signs in as them.
Check this: everyone has their own account with a strong password and two-step sign-in.
If your server holds your only copy of photos
What could happen: a failed disk or malware wipes years of pictures.
Check this: a copy lives somewhere else, and you have tested restoring it.
What does it look like?
Here is a made-up note of a home server set-up. It shows the parts worth checking.
Example only. All values are made up.
Server: EXAMPLE-homebox (files and films) Router rule: forward outside port 0000 to the server (1) Auto-forward: UPnP on (2) Admin account: admin / password reused from email (3) Last update: EXAMPLE date, many months ago (4) Backups: USB drive, always plugged in (5)
- In a real file, this line would contain the port number the router opens to the internet.
- UPnP lets apps ask the router to open ports by themselves [1]. Check what it has opened.
- A reused password on the admin account is a quick way in for anyone who knows it.
- Months without updates means months of known flaws left unfixed.
- A backup drive that stays plugged in can be hit by the same malware as the server [4].
Why this is risky: the server is open to the internet, out of date and protected by a reused password.
The safer way: reach it through a VPN or tunnel, turn on updates, use a unique password with two-step sign-in, and unplug the backup drive.
How does it work?
There are three common ways to reach a home server from outside.
- Port forwarding. You tell your router to send traffic on one port to your server. For Plex, the outside port you choose is sent on to port 32400 on the server [1]. Anyone on the internet can then try to connect.
- A VPN. Your phone or laptop joins your home network through an encrypted link. With WireGuard, a VPN tool, each device has a key, and traffic from unknown keys is dropped [2]. Only your own devices can reach the server.
- A tunnel. A small program on your server reaches out to a tunnel service. Cloudflare Tunnel, for example, uses outbound-only connections, so you can block all inbound traffic at your firewall [3].

| Option | Who can try to connect | Good for |
|---|---|---|
| Port forwarding | Anyone on the internet | Sharing with people who will not install anything |
| VPN | Only devices you have set up | You and your family |
| Tunnel | People the tunnel service lets through | Reaching the server without opening router ports |
Whichever you pick, updates matter. Patches fix known flaws that attackers can use [5]. The UK's NCSC advises turning on automatic updates where possible, and checking now and then that they still arrive [5]. Nextcloud ships security fixes in its regular releases, so stay on a supported version [6].
Backups are your safety net. The NCSC says a backup should be stored in a separate, safe place. It also advises unplugging backup drives when not in use, so malware cannot reach them [4].
A worked example
This story is made up to show the idea.
Rania Rosen sets up a small home server for her family. It runs Nextcloud for photos and Plex for films. To watch films on holiday, she forwards a port on her router to the server.
A few months later, she reads that an old app version has a known flaw. She checks her server and finds it has not updated since she set it up. Automatic updates were never turned on.
Rania makes a plan. First she turns on automatic updates and installs everything waiting. Then she removes the port forward from her router and turns off UPnP, so nothing opens ports without her knowing.
She sets up a VPN on the server instead. Each family phone and laptop gets its own key. Now only those devices can reach the server, at home or away.
Next she looks at backups. Her only copy of the photos sat on a USB drive that never left the server. She now copies the photos to that drive once a week and unplugs it afterwards. She also keeps a second copy with a cloud storage service.
Last, she gives each family member their own account with a unique password and two-step sign-in.
Rania learned that self-hosting gave her control, but also the jobs a cloud company would usually do. A few settings made the server much harder to reach and much easier to recover.
Myths and mistakes
| What people think | What is true |
|---|---|
| Nobody will find my little home server. | With a port forward, anyone on the internet can try to connect, not only people who know you. |
| Updates can wait until something breaks. | Patches fix known flaws that attackers can use[5]. Waiting leaves them open. |
| A USB drive always attached counts as a backup. | Malware can spread to attached drives[4]. Unplug it, and keep another copy elsewhere. |
| UPnP is just a convenience. | It lets apps ask your router to open ports on their own[1]. Check what it has opened. |
| A VPN means I can skip updates. | A VPN narrows who can connect. The server and its apps still need updates. |
What can I do this week?
- Log in to your router and list every port it forwards to your server.
- Turn on automatic updates for the server and its apps.
- Make a backup copy of your most important files, and unplug the drive afterwards.
- Give each person their own account with a unique password and two-step sign-in.
Checklist
- I know every port my router forwards, and why.
- I have chosen how I reach the server from outside: port forward, VPN or tunnel.
- Automatic updates are on for the server, its apps and my router.
- I am running a supported version of each app.
- My backups are stored somewhere separate from the server.
- I have tested restoring at least one file from a backup.
- Each person has their own account with a unique password.
Common questions
Is port forwarding always unsafe?
No, but it puts your server on the public internet. If you forward a port, keep the app updated, use strong unique passwords with two-step sign-in, and forward only the one port you need.
VPN or tunnel: which should I choose?
Choose a VPN if only you and your family need access. It keeps the server out of public view. A tunnel avoids opening router ports, but adds a service provider in the middle. Read its terms before you rely on it.
How often should I update my home server?
As soon as updates are ready. The NCSC suggests turning on automatic updates where you can, and installing others within a few days. Check now and then that updates are still arriving.
Where should my backups go?
Somewhere separate from the server. A drive you unplug after each backup is a good start. For things you cannot replace, such as family photos, the NCSC suggests a copy in the cloud and one on a removable drive.
Can I run AI models on my home server too?
Yes, many people do. The same rules apply: limit who can reach it, keep it updated and protect its accounts. Our practitioner guide on self-hosted language models covers the extra risks.
Where next?
Ready for the detail? Read the practitioner guide: Self-Hosted LLM Security Guide. It covers how to lock down AI models you run on your own hardware, including network exposure and access.
Also useful:
Related NHI Mgmt Group resources: Sharing a Home Network for Beginners, Cloud Password Manager vs Self-Hosted Password Vault and Private DNS on Phones and Home Networks Guide.
Key terms
- Port forwarding
- A router rule that sends traffic arriving on one port to a device inside your home.
- VPN
- An encrypted connection that carries your traffic into a private network.
- Tunnel
- A protected path that carries traffic across the internet as if the two ends were directly linked.
- Attack surface
- All the places where someone could try to get into a system.
- Patch management
- Keeping track of software updates and installing them to fix flaws.
- Backup
- A copy of your data kept in a separate, safe place so you can restore it.
Sources and further reading
- Plex, "Remote Access", Plex Support. https://support.plex.tv/articles/200289506-remote-access/ (accessed 30 Nov 2026).
- WireGuard, "WireGuard: fast, modern, secure VPN tunnel". https://www.wireguard.com/ (accessed 30 Nov 2026).
- Cloudflare, "Cloudflare Tunnel", Cloudflare One documentation. https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/ (accessed 30 Nov 2026).
- National Cyber Security Centre, "Always back up your most important data", Top tips for staying secure online. https://www.ncsc.gov.uk/collection/top-tips-for-staying-secure-online/always-back-up-your-most-important-data (accessed 30 Nov 2026).
- National Cyber Security Centre, "Keeping devices and software up to date", Device Security Guidance. https://www.ncsc.gov.uk/collection/device-security-guidance/managing-deployed-devices/keeping-devices-and-software-up-to-date (accessed 30 Nov 2026).
- Nextcloud, "Security". https://nextcloud.com/security/ (accessed 30 Nov 2026).