2015-07-20 00:09:47 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
2025-08-14 11:17:38 +05:30
|
|
|
const fs = require('node:fs'),
|
|
|
|
|
path = require('node:path');
|
2019-07-25 14:40:52 -07:00
|
|
|
|
2019-07-25 15:43:51 -07:00
|
|
|
const CLOUDRON = process.env.BOX_ENV === 'cloudron',
|
|
|
|
|
TEST = process.env.BOX_ENV === 'test';
|
|
|
|
|
|
2015-07-20 00:09:47 -07:00
|
|
|
exports = module.exports = {
|
2022-07-14 15:18:17 +05:30
|
|
|
SMTP_SUBDOMAIN: 'smtp',
|
|
|
|
|
IMAP_SUBDOMAIN: 'imap',
|
2016-05-04 15:35:59 -07:00
|
|
|
|
2016-09-26 22:17:35 -07:00
|
|
|
// These are combined into one array because users and groups become mailboxes
|
|
|
|
|
RESERVED_NAMES: [
|
|
|
|
|
// Reserved usernames
|
|
|
|
|
// https://github.com/gogits/gogs/blob/52c8f691630548fe091d30bcfe8164545a05d3d5/models/repo.go#L393
|
2018-01-19 22:10:10 -08:00
|
|
|
// apps like wordpress, gogs don't like these
|
|
|
|
|
// postmaster is used in dovecot and haraka
|
2023-03-05 10:52:30 +01:00
|
|
|
'admin', 'no-reply', 'postmaster', 'mailer-daemon', 'root',
|
2016-09-26 22:17:35 -07:00
|
|
|
|
|
|
|
|
// Reserved groups
|
|
|
|
|
'admins', 'users' // ldap code uses 'users' pseudo group
|
|
|
|
|
],
|
|
|
|
|
|
2022-07-14 15:18:17 +05:30
|
|
|
DASHBOARD_SUBDOMAIN: 'my',
|
2015-07-20 00:09:47 -07:00
|
|
|
|
2019-07-25 15:43:51 -07:00
|
|
|
PORT: CLOUDRON ? 3000 : 5454,
|
2025-05-18 16:26:33 +02:00
|
|
|
GRAPHITE_PORT: 2003,
|
2019-07-25 15:27:28 -07:00
|
|
|
INTERNAL_SMTP_PORT: 2525, // this value comes from the mail container
|
2020-11-09 20:34:48 -08:00
|
|
|
AUTHWALL_PORT: 3001,
|
2019-07-25 15:33:34 -07:00
|
|
|
LDAP_PORT: 3002,
|
|
|
|
|
DOCKER_PROXY_PORT: 3003,
|
2022-01-07 14:06:13 +01:00
|
|
|
USER_DIRECTORY_LDAPS_PORT: 3004, // user directory LDAP with TLS rerouting in iptables, public port is 636
|
2023-03-21 14:39:58 +01:00
|
|
|
OIDC_PORT: 3005,
|
2025-06-04 13:11:12 +02:00
|
|
|
TURN_PORT: 3478, // tcp and udp
|
|
|
|
|
TURN_TLS_PORT: 5349, // tcp and udp
|
|
|
|
|
TURN_UDP_PORT_START: 50000,
|
2025-06-04 13:23:47 +02:00
|
|
|
TURN_UDP_PORT_END: 50100,
|
2021-11-22 21:10:36 +01:00
|
|
|
|
2023-02-21 12:03:58 +01:00
|
|
|
// docker IPs
|
|
|
|
|
DOCKER_IPv4_SUBNET: '172.18.0.0/16',
|
2025-04-28 18:06:26 +02:00
|
|
|
DOCKER_IPv4_RANGE: '172.18.0.0/20', // addresses are dynamically allocated within this range (172.18.0.0-172.18.15.255)
|
2023-02-21 12:03:58 +01:00
|
|
|
DOCKER_IPv4_GATEWAY: '172.18.0.1',
|
2025-04-28 18:06:26 +02:00
|
|
|
APPS_IPv4_START: '172.18.16.1', // after DOCKER_IPv4_RANGE
|
2023-02-21 12:03:58 +01:00
|
|
|
APPS_IPv4_END: '172.18.20.255',
|
2025-04-28 18:20:04 +02:00
|
|
|
|
|
|
|
|
DOCKER_IPv6_SUBNET: 'fd00:c107:d509::/64',
|
|
|
|
|
|
2023-02-21 12:03:58 +01:00
|
|
|
// 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',
|
|
|
|
|
MONGODB_SERVICE_IPv4: '172.18.30.3',
|
2025-01-02 23:31:57 +01:00
|
|
|
MAIL_SERVICE_IPv4: '172.18.30.4',
|
2025-03-03 17:06:09 +01:00
|
|
|
GRAPHITE_SERVICE_IPv4: '172.18.30.5',
|
2025-12-04 09:09:19 +01:00
|
|
|
SFTP_SERVICE_IPv4: '172.18.30.6',
|
2023-02-21 12:03:58 +01:00
|
|
|
|
2018-11-10 22:02:42 -08:00
|
|
|
NGINX_DEFAULT_CONFIG_FILE_NAME: 'default.conf',
|
2017-01-06 14:19:38 +01:00
|
|
|
|
2021-04-30 10:31:09 -07:00
|
|
|
DEFAULT_TOKEN_EXPIRATION_MSECS: 365 * 24 * 60 * 60 * 1000, // 1 year
|
|
|
|
|
DEFAULT_TOKEN_EXPIRATION_DAYS: 365,
|
2016-08-01 10:14:45 +02:00
|
|
|
|
2016-08-31 21:00:05 -07:00
|
|
|
DEFAULT_MEMORY_LIMIT: (256 * 1024 * 1024), // see also client.js
|
|
|
|
|
|
2023-08-04 14:13:30 +05:30
|
|
|
DEMO: fs.existsSync('/etc/cloudron/DEMO'),
|
2016-12-14 14:54:17 +01:00
|
|
|
DEMO_USERNAME: 'cloudron',
|
2024-05-23 09:52:05 +02:00
|
|
|
DEMO_BLOCKED_APPS: [
|
2022-11-30 21:36:29 +01:00
|
|
|
'org.jupyter.cloudronapp',
|
2021-01-11 22:04:12 -08:00
|
|
|
'com.github.cloudtorrent',
|
|
|
|
|
'net.alltubedownload.cloudronapp',
|
|
|
|
|
'com.adguard.home.cloudronapp',
|
|
|
|
|
'com.transmissionbt.cloudronapp',
|
2021-01-11 22:29:21 -08:00
|
|
|
'io.github.sickchill.cloudronapp',
|
2023-11-01 23:54:09 +01:00
|
|
|
'to.couchpota.cloudronapp',
|
|
|
|
|
'org.qbittorrent.cloudronapp'
|
2021-01-11 22:04:12 -08:00
|
|
|
],
|
2021-11-15 13:55:29 -08:00
|
|
|
DEMO_APP_LIMIT: 20,
|
2016-12-14 14:54:17 +01:00
|
|
|
|
2022-06-09 13:57:57 +02:00
|
|
|
PROXY_APP_APPSTORE_ID: 'io.cloudron.builtin.appproxy',
|
2022-06-06 20:04:22 +02:00
|
|
|
|
2025-07-24 21:47:33 +02:00
|
|
|
CRON_PATTERN_NEVER: 'never',
|
2019-02-15 10:55:15 -08:00
|
|
|
|
2025-07-30 11:19:07 +02:00
|
|
|
SNAPSHOT_INFO_FILENAME: 'snapshot-info.json',
|
|
|
|
|
|
2025-07-16 17:42:38 +02:00
|
|
|
CLOUDRON,
|
|
|
|
|
TEST,
|
2019-07-25 14:40:52 -07:00
|
|
|
|
2022-01-31 16:55:45 -08:00
|
|
|
PORT25_CHECK_SERVER: 'port25check.cloudron.io',
|
|
|
|
|
|
2022-01-07 14:06:13 +01:00
|
|
|
USER_DIRECTORY_LDAP_DN: 'cn=admin,ou=system,dc=cloudron',
|
2022-01-07 09:57:02 +01:00
|
|
|
|
2025-10-17 16:56:53 +02:00
|
|
|
FOOTER: '© %YEAR% [Cloudron](https://cloudron.io)',
|
2020-03-06 18:08:26 -08:00
|
|
|
|
2024-06-03 19:34:22 +02:00
|
|
|
VERSION: process.env.BOX_ENV === 'cloudron' ? fs.readFileSync(path.join(__dirname, '../VERSION'), 'utf8').trim() : '8.0.0-test'
|
2015-07-20 00:09:47 -07:00
|
|
|
};
|
|
|
|
|
|