BlogsCompanyContactFAQsProductsServicesWhy Us
Brownsmith Dynamics

Services, products, company information, learning, and contact paths in one place.

HomeBlogsCompanyContactFAQsProductsServicesWhy Us

Services

AI ImplementationAI-Native SystemsWeb DevelopmentBusiness AutomationCustom SoftwareMCP DevelopmentLegacy ModernisationData and ReportingSEO, AEO and GEOPerformance MarketingTechnical Writing
  1. Home
  2. From Repository to Production
  3. Preparing a VPS Dns Ports and Tls
  1. Home
  2. Courses
  3. Self Hosting Open Source Applications
  4. From Repository to Production
  5. Preparing a VPS Dns Ports and Tls

Design, development, automation, SEO, and marketing systems for the AI age.

contact@brownsmithdynamics.com
RSS feed
BlogsCompanyContactFAQsProductsServicesWhy Us
Hostinger Partner affiliate marketing link

Affiliate link: Brownsmith Dynamics may receive a benefit if you purchase through this referral.

Sitemap

HomeProductsCoursesMCP DevelopmentServicesAI ImplementationAI-Native SystemsWeb DevelopmentBusiness AutomationCustom SoftwareLegacy ModernisationData and ReportingSEO, AEO and GEOPerformance MarketingTechnical WritingContact
Expand to See the Full SitemapCollapse the Full Sitemap

Core Pages

CompanyWhy UsAgent SkillsCase StudiesFAQsToolsQuizPrivacy PolicySubstack Publication

Founder Learning

Course BundleBuilding an AI-Native BusinessMVP Building for FoundersProduct and Interface DesignFrontend for FoundersBackend for FoundersDatabases for FoundersInfrastructure and DeploymentAI-Assisted Product BuildingTesting and Quality AssuranceSecurity, Ownership, and OperationsDesigning Work for AI AgentsSelf-Hosting Open-Source Applications

AI-Native Systems

AI-Native Business SystemsPublic AI DocumentationStructured Business Datallms.txt

Product Pages

Fonte UIPrivate Agent WorkspaceWeb Conversation EnginePrivate Model InfrastructureWorkflow Automation HubData Intelligence WorkbenchGrowth Intelligence PlatformWorkforce Intelligence SuiteContract & Compliance DeskIndustrial Operations PlatformHealthcare Operations WorkbenchLearning Operations PlatformSecurity Operations ConsoleProperty Intelligence SuiteCommerce Intelligence PlatformScreen Context AssistantPrompt Composer

Contact and Discovery

contact@brownsmithdynamics.comXML Sitemap

Core Pages

CompanyHomeWhy UsProductsCoursesAgent SkillsCase StudiesMCP DevelopmentFAQsToolsQuizPrivacy PolicySubstack Publication

Services

ServicesAI ImplementationAI-Native SystemsWeb DevelopmentBusiness AutomationCustom SoftwareMCP DevelopmentLegacy ModernisationData and ReportingSEO, AEO and GEOPerformance MarketingTechnical Writing

Founder Learning

Course BundleBuilding an AI-Native BusinessMVP Building for FoundersProduct and Interface DesignFrontend for FoundersBackend for FoundersDatabases for FoundersInfrastructure and DeploymentAI-Assisted Product BuildingTesting and Quality AssuranceSecurity, Ownership, and OperationsDesigning Work for AI AgentsSelf-Hosting Open-Source Applications

AI-Native Systems

AI-Native Business SystemsMCP DevelopmentPublic AI DocumentationStructured Business Datallms.txt

Product Pages

Fonte UIPrivate Agent WorkspaceWeb Conversation EnginePrivate Model InfrastructureWorkflow Automation HubData Intelligence WorkbenchGrowth Intelligence PlatformWorkforce Intelligence SuiteContract & Compliance DeskIndustrial Operations PlatformHealthcare Operations WorkbenchLearning Operations PlatformSecurity Operations ConsoleProperty Intelligence SuiteCommerce Intelligence PlatformScreen Context AssistantPrompt Composer

Contact and Discovery

Contactcontact@brownsmithdynamics.comXML Sitemap
Course Navigation
Self-Hosting Open-Source Applications
  1. 1.Self-Hosting Economics and Responsibility
  2. 2.Preparing a VPS, DNS, Ports, and TLS
  3. 3.Git and Repository Preparation
  4. 4.Building and Inspecting a Docker Image
  5. 5.Compose, Environment Files, and Secrets
  6. 6.Deploying with Coolify or Dokploy
  7. 7.OAuth and API Key Management
  8. 8.AI APIs and MCP Services
  9. 9.Private Access with Tailscale
  10. 10.Production Deployment and Recovery Capstone
Self-Hosting Open-Source Applications
  1. 1.Self-Hosting Economics and Responsibility
  2. 2.Preparing a VPS, DNS, Ports, and TLS
  3. 3.Git and Repository Preparation
  4. 4.Building and Inspecting a Docker Image
  5. 5.Compose, Environment Files, and Secrets
  6. 6.Deploying with Coolify or Dokploy
  7. 7.OAuth and API Key Management
  8. 8.AI APIs and MCP Services
  9. 9.Private Access with Tailscale
  10. 10.Production Deployment and Recovery Capstone
  1. Courses
  2. /
  3. Self-Hosting Open-Source Applications
  4. /
  5. From Repository to Production
  6. /
  7. Preparing a VPS, DNS, Ports, and TLS

Preparing a VPS, DNS, Ports, and TLS

A production VPS needs a maintained operating system, restricted administrative access, a firewall, DNS, and a TLS-terminating reverse proxy. Application ports should be exposed only where the architecture requires them.

15 minute lessonUpdated July 30, 2026intermediate

What You Will Be Able to Decide

  • Explain the role of preparing a vps, dns, ports, and tls in a self-hosted system.
  • Apply the procedure to a real open-source deployment.
  • Recognise unsafe defaults and verify the resulting control.
  • Record enough evidence for another operator to repeat or recover the work.

A VPS is a remote computer with a public network identity. That makes it flexible and inexpensive, but it also means every exposed service must be deliberate.

Ports are numbered network doors. DNS points a human-readable name at the server, while a reverse proxy receives web traffic and forwards it to the correct container. TLS protects the connection between a user and that public entry point.

The goal is not to memorise every command. It is to draw the path from a browser to a process and know which component owns each boundary.

Technical term

Published port

A mapping from a host address and port to a container port, such as host port 8080 forwarding to port 3000 inside a container.

A building directory maps a public reception desk to the correct internal room; the room number and street entrance do not need to match.

The Working Model

Use a supported Linux release and create a non-root administrative user. Prefer SSH keys over passwords, retain a tested recovery route through the VPS provider, and apply security updates before installing an application platform.

For a typical web service, public traffic should enter on TCP 80 and 443 through a reverse proxy. Databases, queues, and internal application ports usually belong on a private Docker network, not on every internet-facing interface.

Docker-managed port publishing can interact with host firewall rules in surprising ways. Treat a published container port as an exposure decision, verify it from outside the server, and avoid assuming that a simple UFW rule is the complete boundary.

Implementation Procedure

  1. Provision a supported Ubuntu LTS VPS and record its public IPv4 or IPv6 address.
  2. Create a non-root sudo user, install an SSH public key, test a second login, and only then restrict password and root login.
  3. Apply updates, enable time synchronisation, and configure the provider firewall plus the host firewall.
  4. Create an A or AAAA DNS record for a deployment subdomain and wait for it to resolve.
  5. Reserve public ports 80 and 443 for the reverse proxy; document every additional port and its reason.
# Inspect listening sockets on the VPS
sudo ss -tulpn

# Resolve the deployment hostname
dig +short app.example.com

# Test the public TLS endpoint after deployment
curl -I https://app.example.com

Knowledge Check

What does a mapping such as 127.0.0.1:8080:3000 mean?

Controlled Practice and Fragile Practice

Controlled Practice

The deployment stays explainable, constrained, and recoverable.

  • Bind an application to 127.0.0.1 or a private container network behind the reverse proxy.
  • Use both provider-level and host-level network controls.
  • Verify exposure from another network, not only from the VPS itself.

Fragile Practice

Convenient shortcuts create hidden exposure or an unrecoverable dependency.

  • Publishing a database port to 0.0.0.0 for convenience.
  • Disabling SSH password access before a key-based second session works.
  • Opening a range of ports without documenting the service behind each one.

Exercise

Apply the Boundary

Choose the services that normally need a public inbound route for a reverse-proxied web application.

Select all answers that apply

Verification and Recovery Evidence

  • A port scan from outside shows only the intended public services.
  • The hostname resolves to the server and the TLS certificate matches it.
  • The provider console can recover access if SSH configuration fails.

Knowledge Check

What is the reverse proxy's central job?

Warning Signs

  • Administrative panels are exposed without an access restriction.
  • Several containers publish default database or cache ports publicly.
  • Nobody can explain which service owns a listening port.

Questions to Ask a Consultant

  • Which ports must be public, which must be private, and why?
  • Where does TLS terminate and how is the certificate renewed?
  • What recovery access remains if an SSH change locks out the operator?

Exercise

Founder Decision Note

Record the decision, its current constraint, recommended option, main reason, primary risk, and the condition that would make you revisit it.

Key takeaway

Key Takeaway

A secure network boundary is a documented traffic path. Publish only the ports the path requires and verify the result externally.

Apply This Decision to Your Product.

Understanding a technical concept is useful. Applying it still depends on your product, users, budget, data, and operating constraints.

Brownsmith Dynamics can review an MVP scope, technical proposal, architecture, deployment plan, AI-assisted workflow, or existing application.

For corrections, questions, and suggested improvements to this lesson, contact us directly.

Book a Technical Consultation Ask a Question or Suggest an Improvement
Previous LessonSelf-Hosting Economics and ResponsibilityNext Lesson Git and Repository Preparation

Related Lessons

  • Self-Hosting Economics and Responsibility
  • Git and Repository Preparation

On This Lesson

  1. Published Port
  2. The Working Model
  3. Implementation Procedure
  4. Knowledge Check
  5. Controlled Practice and Fragile Practice
  6. Apply the Boundary
  7. Verification and Recovery Evidence
  8. Knowledge Check
  9. Warning Signs
  10. Questions to Ask
  11. Key Takeaway