VeilNet

Service Recipes

Publish thirteen common databases and self-hosted apps on the overlay, each with the exact commands and settings it needs.

The Two Machines

Every recipe uses two machines with conflux installed: a server that runs the service, and a client that connects to it.

The service stays on loopback, where it already listens. The overlay makes it reachable from every machine whose taints are compatible with the server's.

Set up the two machines once, as shown below for the instance VeilNet hosts. Every recipe on this page then works between them.

0 of 3 done
  1. Run proxy on the server, so nothing changes on the host. The first run mints a taint, and --ipv4 answers the only question conflux would ask. Copy the taint:

    $ sudo conflux proxy 5432=127.0.0.1:5432 --ipv4 10.128.0.5/24
    
    Minted a taint for this network:
    
        brhk-2mq9-tzva-6pjs-k4xe-nw7d-qf

Some setups need a different approach:

  • In Docker, publish the container's port to 127.0.0.1. Conflux connects from the host, where container names do not resolve.
  • If the server already runs conflux up, it has no proxy. Bind the service to the overlay address instead, as each recipe describes.
  • For several services on one server, run one proxy command with every spec in it. See Several Services on One Machine.

Choosing a Service

PostgreSQL

Databases · overlay 5432

Reach a database from laptops, CI runners and app servers without opening port 5432 to anything else.

On the server
# PostgreSQL listens on localhost by default; leave it there
$ sudo conflux proxy 5432=127.0.0.1:5432 --ipv4 10.128.0.5/24
Or, in Docker
$ docker run -d --name postgres -e POSTGRES_PASSWORD='change-me' \
    -p 127.0.0.1:5432:5432 postgres:17
$ sudo conflux proxy 5432=127.0.0.1:5432 --ipv4 10.128.0.5/24
From another machine
$ psql "postgresql://app@10.128.0.5:5432/app"
$ psql "postgresql://app@[fd80:c4b9:99ae:4411:c531:fd4f:754f:f08a]:5432/app"
If the server runs conflux up instead
# postgresql.conf
listen_addresses = 'localhost,10.128.0.5'

# pg_hba.conf: the client's own overlay IPv6, which is bound to its identity
host  app  app  fd80:c4b9:99ae:df9b:5261:d178:18f1:783c/128  scram-sha-256

Have clients connect to the server's IPv6 address, so pg_hba.conf can tell each client apart. Over IPv4, clients arrive from the shared 198.18.0.0/15 range.