diff --git a/src/constants.js b/src/constants.js index e78d2e20a..67f62ce82 100644 --- a/src/constants.js +++ b/src/constants.js @@ -38,6 +38,9 @@ exports = module.exports = { DOCKER_IPv4_GATEWAY: '172.18.0.1', APPS_IPv4_START: '172.18.16.1', // after DOCKER_IPv4_RANGE APPS_IPv4_END: '172.18.20.255', + + DOCKER_IPv6_SUBNET: 'fd00:c107:d509::/64', + // these are hardcoded to allow connections from outside. this is not in "172.18.0.xx" since docker starts allocating from there MYSQL_SERVICE_IPv4: '172.18.30.1', POSTGRESQL_SERVICE_IPv4: '172.18.30.2', diff --git a/src/platform.js b/src/platform.js index 213c830be..23450f703 100644 --- a/src/platform.js +++ b/src/platform.js @@ -59,7 +59,7 @@ async function createDockerNetwork() { await shell.spawn('docker', ['network', 'rm', '-f', 'cloudron'], {}); // the --ipv6 option will work even in ipv6 is disabled. fd00 is IPv6 ULA await shell.spawn('docker', ['network', 'create', `--subnet=${constants.DOCKER_IPv4_SUBNET}`, `--ip-range=${constants.DOCKER_IPv4_RANGE}`, - `--gateway=${constants.DOCKER_IPv4_GATEWAY}`, '--ipv6', '--subnet=fd00:c107:d509::/64', 'cloudron'], {}); + `--gateway=${constants.DOCKER_IPv4_GATEWAY}`, '--ipv6', `--subnet=${constants.DOCKER_IPv6_SUBNET}`, 'cloudron'], {}); } async function removeAllContainers() {