You want an application on a server you control, but the installation guide ends just as the business questions begin. Who fixes it when it stops? Where is the backup? Will it survive an update?
A lower subscription bill loses its appeal when a failed deployment takes your reports, customer records or evening with it. To help you judge what you can reliably run yourself, this guide walks through choosing, deploying and maintaining a small application, using a private sales-reporting workflow as the example.
1. Choose an Application You Can Support
Self-hosting means running software on infrastructure you administer. That can be a rented server or equipment you own. You control its setup and data handling, and you take responsibility for security, updates and recovery.
Start with one task you can still perform manually during an outage. I would choose an internal report before moving checkout, customer email or product delivery.
Before choosing software, write down:
- Task: What should the application do, and who uses the result?
- Data: What information will it store, and which outside services will it contact?
- Ownership: Who handles updates, failed jobs and recovery?
- Recovery: How much recent work could you lose, and how long could the application stay unavailable?
- Exit: Can you export useful records and move elsewhere?
Then check for a maintained self-hosted edition, clear deployment instructions, supported dependencies and somewhere to get help.

For the running example, imagine you sell downloadable sewing patterns. You want n8n, a tool for connecting applications into automated workflows, to prepare a weekly internal sales report. Checkout and download delivery stay with your existing providers.
The workflow fetches sales through an API—a controlled way for software to request information from another service. Because it makes scheduled outgoing requests, its editor can remain private.
I use n8n to connect tools and automate workflows. For this shop, I would keep the first deployment this narrow. A late internal report gives you room to learn.
Check the license before installing. n8n’s Community edition allows people within your organization to create and edit workflows. Letting outsiders build or configure workflows requires a commercial license. That distinction matters if your internal tool later becomes a service you sell. n8n’s licensing guidance
If nobody can cover server administration and recovery, arrange technical help or choose managed hosting before moving live work.
2. Choose Infrastructure That Fits the Workload
Your first decision is where the application will run. A virtual private server, or VPS, gives you a rented server in a provider’s data center. Local hardware keeps the machine at your premises.
| Factor | Rented VPS | Hardware at Your Premises |
|---|---|---|
| Suitable workloads | Remote access, scheduled automation and services needing reliable internet connectivity | Local file processing, on-site tools and work tied to nearby equipment |
| Upfront spending | Setup time and any migration help | Equipment, storage and power protection |
| Recurring costs | Server rental, backups, extra storage and possible transfer charges | Electricity, internet, backups and replacement allowance |
| Hardware responsibility | Provider maintains the physical machine; you usually manage its software | You maintain and replace the machine |
| Connectivity | Data-center connection; configure firewall rules and access | Check upload speed, outages, router settings and whether inbound hosting is permitted |
| Recovery arrangements | Rebuild on another server using saved configuration and backups | Restore onto spare or replacement equipment, or move to a VPS |
DigitalOcean is my primary hosting provider, so it would be my starting point for comparing a small VPS. The application’s needs should decide the capacity.
Check CPU, memory, storage and processor compatibility against the software’s requirements. Leave space for growing records, logs, temporary files and updates. A workflow processing large attachments can need far more memory than one adding sales totals.

For the shop’s small reporting task, this guide uses one supported Linux server with Docker, which runs applications in containers alongside the software they need. Docker Compose describes those containers, their storage and their connections in a configuration file.
One server is a single point of failure. Use that arrangement only if you can rebuild it within your downtime limit.
Managed application hosting is worth comparing when you have little time for administration. Ask who installs updates, checks backups and performs restores. “Backups included” leaves an awkward amount unsaid.
Choose locations for both the server and backups that fit your data obligations. Where the EU’s General Data Protection Regulation (GDPR) applies, check contracts with providers handling personal data and the rules for international transfers. An EU server location alone does not establish compliance. EU data-protection guidance
3. Calculate the Full Operating Cost
Count the spending needed to keep the application running and recoverable. Then add the time you expect to spend maintaining it.
The budget below uses a DigitalOcean Basic Regular VPS as its server reference. Check DigitalOcean’s current VPS pricing before renting, and choose capacity from your workload.
Here is an illustrative monthly budget:
| Item | Basis | Monthly Amount |
|---|---|---|
| Server | Basic Regular VPS: 1 vCPU, 2 GiB RAM, 50 GiB SSD | $12 |
| Independent backups | Assumed budget for storing backups off the server | $4 |
| Maintenance time | Assumed 1.5 hours × $40 per hour | $60 |
| Subtotal | Server + backups + maintenance time | $76 |
The backup allowance, maintenance time and hourly rate are assumptions. Replace them with your own figures. This subtotal excludes other costs that may apply.

Check for licenses, monitoring, private-access services, domains, email delivery, external APIs, extra storage, network charges and taxes. Budget setup and migration separately.
Compare equivalent capabilities and support with the service you would replace. I would happily pay more for managed software if maintaining the alternative swallowed the time it was meant to save.
A cheaper server does not necessarily mean a cheaper application. Use the calculator to compare your options and see whether maintenance time would erase the savings.

Free Software Cost Calculator




Set billing alerts and identify which charges increase with usage.
4. Prepare and Secure the Server
Create a server using a supported Linux release that works with both Docker and your application. Enable multi-factor authentication, or MFA, on the hosting account, and make sure you can reach its recovery console.
Secure administration before installing the application:
- Connect with an SSH key. SSH provides an encrypted terminal connection to the server.
- Create a named administrator account with the permissions it needs.
- Open a second terminal and confirm that the new account can log in and perform administration.
- Keep the original connection open while restricting password authentication and direct root login.
- Validate the SSH configuration before reloading the service, then test another login.
That second connection is a cheap way to avoid locking yourself out.
Apply operating-system updates, arrange security updates and plan for required reboots. Restrict incoming SSH access to approved addresses or a private network, and leave unnecessary ports closed.

Install Docker Engine and the Compose plugin from Docker’s supported package repository for your Linux distribution. I would skip the convenience installation script for a business server; Docker recommends it for testing and development. Docker’s installation guidance
Verify the installation:
docker --version
docker compose version
sudo systemctl enable --now docker
sudo systemctl is-active docker
The last command should report active.
Use sudo for Docker administration unless you have deliberately granted another trusted account access. Docker daemon access can allow changes to the host filesystem, so treat it as powerful administrator access. Docker’s security guidance
Before proceeding, confirm that your administrator login still works and the server’s public firewall permits only the connections you intended.
5. Deploy the Application With Persistent Storage
Define the Application Configuration
Use the application’s supported deployment method. Four terms matter here:
- Image: The packaged application software.
- Container: A running instance of that image.
- Volume: Storage that can survive replacing the container.
- Compose file: The instructions for creating the services and connecting their storage and networks.
Create a dedicated directory, such as ~/shop-reports, and restrict it to the administrator. Put compose.yaml and .env inside it.
The .env file supplies configuration values. Start with:
N8N_VERSION=
APP_TIMEZONE=Asia/Kolkata
Fill N8N_VERSION with an exact supported stable release number you have chosen to test. Change the timezone to the one your reporting schedule should use. Leaving the version blank deliberately prevents the configuration below from starting.

Save this as compose.yaml:
services:
n8n:
# Require an exact version from .env.
image: "docker.n8n.io/n8nio/n8n:${N8N_VERSION:?Set an exact stable version}"
restart: unless-stopped
ports:
# Reachable through the host only, not its public address.
- "127.0.0.1:5678:5678"
environment:
GENERIC_TIMEZONE: "${APP_TIMEZONE:?Set APP_TIMEZONE}"
TZ: "${APP_TIMEZONE:?Set APP_TIMEZONE}"
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: "true"
volumes:
# Preserve the SQLite database, settings and encryption key.
- n8n_data:/home/node/.n8n
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
volumes:
n8n_data:
name: shop_reports_n8n_data
This setup uses SQLite, n8n’s default database, and saves its data in the persistent volume. As more workflows run at the same time, reassess the database and server requirements. n8n’s Docker Compose guidance
Keep credentials out of version control and restrict access to files containing secrets. An .env file is plain text, not a secret vault.
Publish only necessary ports. Docker-published ports can bypass UFW, a common Linux firewall tool, so use deliberate port bindings and suitable network firewall controls together. Docker’s firewall explanation
For applications needing a separate database, give it persistent storage and keep its port off the public network.
Verify Startup and Data Persistence
From the project directory, validate and start the configuration:
sudo docker compose config --quiet
sudo docker compose up -d
sudo docker compose ps
sudo docker compose logs --tail=100 n8n
Resolve configuration errors or repeated restarts before opening the application.
For temporary protected access, run this on your computer, replacing the account and server address:
ssh -N -L 5678:127.0.0.1:5678 admin@SERVER_IP
Keep that connection open and visit http://localhost:5678. The connection between your computer and the server travels through SSH. If your browser rejects the application’s secure-cookie requirements, complete setup through the private HTTPS connection in the next section.

Create the initial account and a disposable test workflow before connecting the store.
Then recreate the container:
sudo docker compose up -d --force-recreate n8n
Confirm that the account, settings and test workflow remain. This checks persistence, but it does not prove you can recover from losing the server.
Record the volume name, application version and configuration location. You will need them during recovery.
6. Configure Secure Access
Choose access for each part of the application. An internal editor can stay private even when a separate integration needs a public incoming connection.
Keep Internal Applications Private
For the shop’s reporting editor, I would use a private network. Tailscale connects approved devices and can provide HTTPS access to a service bound to the server’s localhost address.
Install Tailscale on the server and approved computers, authenticate them, and restrict its access rules to the people who need the editor.
On the server, configure Tailscale Serve:
sudo tailscale serve --bg http://127.0.0.1:5678
sudo tailscale serve status
Complete the HTTPS authorization prompts and open the HTTPS address it provides from an approved device. Serve shares the service within your Tailscale network, and its access rules still apply. Tailscale Serve documentation

In compose.yaml, add these settings under n8n’s existing environment block, keeping the same indentation as its other entries:
N8N_EDITOR_BASE_URL: "https://YOUR_TAILSCALE_HOSTNAME"
N8N_PROXY_HOPS: "1"
Replace the example address with the HTTPS address from Tailscale Serve. Serve forwards requests to n8n, so n8n sits behind one proxy in this setup. Apply the changes with sudo docker compose up -d n8n.
Test access from an approved device and from a device your rules should deny. Keep application accounts individual, use strong authentication and enable MFA at the access provider. Store recovery credentials somewhere you can reach during a server outage.
Give the reporting workflow read-only sales access and retrieve only the fields the report needs. There is no reason for a weekly totals report to hold permission to refund orders.
Scheduled outgoing API requests do not require a public editor. Check incoming callback requirements separately when adding integrations.
Publish Applications That Need Public Access
For a customer-facing application or incoming integration, point a dedicated subdomain at the server and place an HTTPS reverse proxy in front of it. The proxy receives the browser’s connection and forwards it to the application.
The path is:
Browser → HTTPS reverse proxy → application’s internal address
Caddy is one option. In its standard public-domain setup, automatic HTTPS needs correct DNS, reachable ports 80 and 443, and writable, persistent certificate storage. Caddy’s HTTPS requirements

If Caddy runs directly on the same host as the example application, it can forward requests to 127.0.0.1:5678. If it runs in another container, connect it to n8n through a shared Docker network instead; that container’s localhost refers to itself.
Set the application’s external address and configure it to trust only the proxies you use. For n8n, a webhook URL is an address an outside service can call to trigger a workflow. Configure that URL and the proxy headers that describe the original request according to the version you run. Authenticate incoming webhook requests using the integration’s supported method. n8n’s reverse-proxy configuration
Publishing a webhook should not expose the editor. Restrict public routing to the required endpoints, and test from outside your private network. Public functions should work while administration and database ports remain inaccessible.
7. Back up the Application and Prove Recovery
Create Complete, Consistent Backups
Turn your acceptable data loss into a backup schedule. If losing a day of configuration changes is acceptable, daily backups may fit. If losing an hour would hurt, you need a tighter schedule and a method that supports it.
Back up everything needed to rebuild:
- Application data: Databases, uploaded files and other persistent storage.
- Deployment configuration: Compose files, environment settings and dependency versions.
- Recovery secrets: Encryption keys and credentials needed to restore access.
For this SQLite setup, stop n8n before copying its complete persistent data folder, then restart it. Copying a database while it is being written can produce an inconsistent backup.
Preserve the credential-encryption key stored in n8n’s configuration. A restored database cannot decrypt saved credentials without the matching key. Workflow exports alone do not contain a complete instance backup. n8n’s backup and restore requirements

You can locate the example volume with:
sudo docker volume inspect shop_reports_n8n_data \
--format '{{ .Mountpoint }}'
Configure the backup job to stop n8n, copy that folder using appropriate permissions, and restart n8n even if copying fails. Transfer encrypted backups off the application server and alert on failure.
Keep multiple recovery points, protect a copy from deletion through compromised production credentials, and include an offline copy in your recovery arrangements. These protections help prevent an attacker from destroying the backups alongside the application. Canadian Centre for Cyber Security backup guidance
Provider snapshots can add another recovery option. Check whether they capture consistent application data and whether you can restore them in the situation you are preparing for.
Restore Into a Separate Environment
A successful backup notification proves that a job finished. A restoration test shows whether the result is useful.
Build a separate test environment from the saved configuration. Use a different server, or change the test copy’s volume name and host port so it cannot reuse production storage or ports. Before starting the restored application, block its access to live integrations. Restored schedules must not send duplicate reports or contact customers.

Restore the data and matching keys, then check:
- Login and saved settings.
- Expected workflows, records and files.
- Credential decryption.
- A complete run using test inputs.
- The time needed to rebuild and verify everything.
Disable restored schedules before selectively allowing test integrations. For the shop, generate a report from test data without sending it to the live report destination.

Compare the measured recovery time with your downtime limit. If rebuilding takes longer than the business can tolerate, improve the process or choose a different hosting arrangement.
Keep recovery instructions and backup-access details outside the original server. Repeat the test periodically and after material storage or deployment changes.
8. Move One Workflow Into Production
Test the whole business task with representative inputs, realistic data sizes and ordinary user permissions. Include empty results, denied API access and a failed request.
For the sewing-pattern shop, a sensible sequence is:
- Retrieve test sales with a read-only credential.
- Check that the workflow handles multiple pages of API results.
- Compare the report with manually checked totals for the same period.
- Confirm how refunds, discounts, currencies and timezone boundaries are handled.
- Reboot the server and verify that storage, protected access and schedules still work.
Choose a clear reporting period, such as the previous calendar week in the shop’s timezone. Otherwise two correct calculations can disagree because they count different orders.

When replacing an existing application, retain an export and trial the import before cutover. Compare important records and attachments, and define what would make you switch back.
Prevent duplicate schedules during the move. Enable one live workflow, inspect its first output and keep the previous service or manual process available until the checks pass.
Also confirm that a responsible person receives failure alerts and can follow the recovery instructions. Automation needs an owner even when it rarely needs attention.
9. Keep the Application Reliable
Monitor the Business Task
Monitor server availability, disk space, memory, backup completion and failed jobs. Run availability checks outside the application server so they can detect the server disappearing.
A private application needs a separate authorized device or monitoring service that can reach it. Send alerts through a channel that still works when the application server is down.
For the shop, the most useful check is whether the expected weekly report arrived. A working login page does not tell you whether the sales request failed.

Set a clear deadline for that check. If the report should arrive on Monday morning, alert when it misses that window.
The Compose example limits container log files. Also limit how long n8n keeps records of workflow runs, retaining enough detail to investigate failures without storing unnecessary customer information.
Review backups, access, billing and capacity on a regular schedule. I would start with a short weekly review for a new deployment and adjust it once its behavior is clear.
Update With a Recovery Path
Assign an update owner and a backup contact. Before an update, read the release notes, check compatibility and take a recoverable backup. Test changes that affect storage, integrations or workflow behavior before production.
For this Compose setup:
- Change
N8N_VERSIONin.envto the exact release you intend to deploy. - Validate the configuration.
- Pull the selected image and recreate the service.
- Check logs, login, persistence and a representative workflow.
The deployment commands are:
sudo docker compose config --quiet
sudo docker compose pull n8n
sudo docker compose up -d n8n
sudo docker compose logs --tail=100 n8n

Apply relevant urgent security fixes promptly. Plan routine updates for a time when someone can check the result.
Keep matching configuration and backups for rollback. A database migration may require restoring pre-update data; changing the image back may not undo it.
Maintain a short operating record with the deployment location, versions, access method, backup schedule, restore procedure, update history and support contacts.
Troubleshoot Failures Systematically
Check the failing layers in order: server, network access, DNS and HTTPS, reverse proxy, application, storage or database, then external integrations. For private access, include the private network connection and its permissions.
| Symptom | First Check | Next Action |
|---|---|---|
| Application is unreachable | Can you reach the server through its approved administration route? | Check server status and network rules, then the proxy and application |
| Authentication fails | Does the account work through the intended HTTPS address? | Check account status, MFA, cookies and proxy settings |
| Container keeps restarting | Inspect recent logs and available memory | Resolve the reported configuration, permission or resource problem |
| Workflow fails | Find the first failed step and its response | Check credentials, API permissions, limits and input changes |
| Disk is full | Identify whether logs, execution history or persistent files grew | Free safely removable data, fix retention and add capacity if needed |
Useful first checks include:
sudo docker compose ps
sudo docker compose logs --tail=100 n8n
sudo docker stats --no-stream
df -h
Inspect recent changes before restarting or restoring. Repeated restarts can hide the original failure, and deleting an unfamiliar Docker volume is a poor troubleshooting technique.

Remove credentials and customer data from logs or screenshots shared with support.
If recovery exceeds your downtime limit, use the documented fallback. After suspected compromise, isolate the server, preserve evidence, rotate exposed credentials from a trusted device and rebuild from a trusted state. Government incident-recovery guidance
Increase resources or obtain managed support when measured workload, maintenance effort or recovery needs exceed what this setup can support.
What Next?
Choose one internal task and write down its owner, manual fallback, acceptable data loss and maximum downtime before renting a server. Those four decisions will make your first deployment easier to judge.
Use the social buttons to share this guide when planning a move from subscriptions to infrastructure you control.
Which task would you trust to your first self-hosted application, and what would you need to prove before relying on it? Share your answer or any other questions in the comments.
Share this post with your friends & followers:
