Connecting Remotely - Clearnet
Use Case
This connection method permits hosting service interfaces on the public Internet as standard (.com
, .net
, etc) domains.
By default, service interfaces are not publicly addressable. StartOS only permits access via private hosts, such as localhost
, local IP addresses (e.g. 192.186.x.x
), local (.local
) domains, and Tor (.onion
) domains.
You can also expose your StartOS UI to the Internet, but this is not recommended, at least until 2FA support is added to StartOS. To do this, go to System > StartOS UI
and complete steps 2-4 (above).
Contents
Opening your Server to the Internet
There are two ways of opening your server to the Internet. Note, this just is a pre-requisite step. No service interfaces will be exposed to the Internet until you publicize them later on.
-
Router Port Forwarding. Free, but exposes your home IP address to visitors.
-
VPS Reverse Tunneling. Hides your home IP address from visitors, but requires renting a VPS.
Option 1: Router Port Forwarding
-
If you have not already, assign a static IP address for your server on the LAN. This is easy to do and supported by all routers. Refer to your router's user manual for detailed instructions.
-
(optional but recommended) Enable dynamic DNS for your home IP address. Your Internet Service Provider (ISP) may unexpectedly change the IP address of your home. If this happens, it will break your clearnet connections until you redo the final step below. To prevent this, you can enable dynamic DNS. Many routers offer this as a free or paid service. If not, there are third party services available.
-
Access the DNS settings for your domain (usually your domain registrar where you originally leased the domain) and create an "A" record.
Even if using an dynamic DNS address, having at least one A record is usually a requirement. The "Host" should be
@
, while the value should be your home IP address (prehaps labeled as WAN IP in your router interface). If you're using a dynamic DNS address (recommended) that provides a unique static IP address, use that in the A record, otherwise you must add a CNAME with a "*
" as the "Host" (if your registrar allows this) andmydomain.com
as the "Value". (If you cannot use "*
" then you'll need to create and use a subdomain).It might take a few minutes for your domain changes to take effect. You can test it using https://dnschecker.org.
-
Open and forward ports. Most websites and APIs on the Internet are hosted on port
443
. Port443
is so common, in fact, that browsers infer its presence. The absence of a port means the port is443
. For maximum compatibility, services on StartOS also use port443
whenever possible, except it is expressed as5443
for port forwarding purposes only. Therefore, it is highly likely you will want to open port443
in your router and forward it to port5443
on your server.Certain service interfaces, such as
Bitcoin RPC
andBitcoin P2P
, do not use port443
. In such cases, you will identify the correct port by viewing the details of the service interface, open that port in your router, and forward it to the same port on your server.In the examples below, replace
###.###.###.###
with your server's IP address from step 1 (above).Example 1
You want to expose port
443
on your server. In your router, open port443
and map it to###.###.###.###:5443
Example 2
You want to expose port
8332
on your server. In your router, open port8332
and map it to###.###.###.###:8332
Option 2: VPS Reverse Tunneling
Instead of forwarding ports on your router and exposing your server's IP address to the Internet, you can rent a small, Virtual Private Server (VPS) that proxies traffic in and out, thereby hiding your server's IP address.
The result of this setup will be a brand new public IP address (e.g. 162.159.x.x
) for your server that will display in the "clearnet" section of every service interface. However, only interfaces that are marked public
will actually be accessible via this IP address or any domain attached thereto.
-
Rent a low-powered, inexpensive VPS that provides a static IP address. Provision it with the latest stable version of Debian. Copy down its IPv4 address and root password.
-
Access the DNS settings for your domain (usually your domain registrar where you originally leased the domain) and create an "A" record. The "Host" should be
*.mydomain.com
and the "Value" should be your VPS's IPv4 address.It might take a few minutes for your "A" record to take effect. You can test it using https://dnschecker.org.
-
SSH into your StartOS server. Instructions
-
Run the following command, replacing
###.###.###.###
with the IPv4 address of your VPS, then follow the on-screen prompts to complete setup:wireguard-vps-proxy-setup -i ###.###.###.###
-
Verify everything is working:
nmcli c show
You should see an entry with your StartOS server name (first 15 characters) of type
wireguard
. -
In your service interfaces, you should now see a brand new
clearnet
IP address (e.g.162.159.x.x
) with a network interface namedwireguard
.
Adding ACME
Automatic Certificate Management Environment (ACME) protocol is used for obtaining SSL/TLS certificates, allowing visitors to access your websites and APIs over secure HTTPS.
-
In StartOS go to
System > ACME > Add Provider
. -
Select a provider to add. StartOS has built-in support for Let's Encrypt and Let's Encrypt Staging. Advanced users may add a custom ACME provider. Let's Encrypt Staging is for testing purposes only.
-
Provide a contact email address. This is required for the ACME provider to generate a certificate.
Assigning a Domain
-
Select an interface to assign a domain.
-
In the "Clearnet" header, click "Add Domain".
-
Select the ACME provider and enter your subdomain/domain. For example, if you own
mydomain.com
, you can entermydomain.com
orexample.mydomain.com
. NOTE: the domain must be one you configured in Opening your Server to the Internet (above).For ACME provider, you can also select
None (use system Root CA)
to generate certificates using your own Root CA. NOTE: anyone who accesses that website or API will need to first trust your Root CA on their phone/laptop.
Publicizing an Interface
Publicizing an interface allows it to be accessed via the public hosts, such as public IP addresses, VPS reverse proxies, and clearnet (.com
, .net
, etc) domains, assuming they were successfully created (above).
-
Select an interface to make public.
-
In the "Clearnet" header, click "Make Public".