Skip to content

Commit d929dfa

Browse files
committed
Add: FreeScout
1 parent bf9fd89 commit d929dfa

3 files changed

Lines changed: 260 additions & 0 deletions

File tree

‎ct/freescout.sh‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env bash
2+
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main"
3+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
4+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
5+
# Copyright (c) 2021-2026 community-scripts ORG
6+
# Author: MickLesk (CanbiZ)
7+
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
8+
# Source: https://github.com/freescout-help-desk/freescout
9+
10+
APP="FreeScout"
11+
var_tags="${var_tags:-helpdesk;ticketing}"
12+
var_cpu="${var_cpu:-2}"
13+
var_ram="${var_ram:-1024}"
14+
var_disk="${var_disk:-6}"
15+
var_os="${var_os:-debian}"
16+
var_version="${var_version:-13}"
17+
var_arm64="${var_arm64:-yes}"
18+
var_unprivileged="${var_unprivileged:-1}"
19+
20+
export var_admin_email="${var_admin_email:-}"
21+
export var_admin_pass="${var_admin_pass:-}"
22+
23+
header_info "$APP"
24+
variables
25+
color
26+
catch_errors
27+
28+
function update_script() {
29+
header_info
30+
check_container_storage
31+
check_container_resources
32+
33+
if [[ ! -d /opt/freescout ]]; then
34+
msg_error "No ${APP} Installation Found!"
35+
exit
36+
fi
37+
38+
if check_for_gh_release "freescout" "freescout-help-desk/freescout"; then
39+
msg_info "Stopping FreeScout"
40+
systemctl stop cron nginx php8.4-fpm
41+
pkill -u www-data -f artisan || true
42+
msg_ok "Stopped FreeScout"
43+
44+
create_backup /opt/freescout/.env
45+
CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="storage Modules public/modules" fetch_and_deploy_gh_release "freescout" "freescout-help-desk/freescout" "tarball"
46+
restore_backup
47+
48+
msg_info "Updating FreeScout"
49+
cd /opt/freescout
50+
$STD php artisan freescout:after-app-update
51+
$STD php artisan storage:link
52+
chown -R www-data:www-data /opt/freescout
53+
msg_ok "Updated FreeScout"
54+
55+
msg_info "Starting FreeScout"
56+
systemctl start php8.4-fpm nginx cron
57+
msg_ok "Started FreeScout"
58+
msg_ok "Updated successfully!"
59+
fi
60+
exit
61+
}
62+
63+
start
64+
build_container
65+
description
66+
67+
msg_ok "Completed Successfully!\n"
68+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
69+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
70+
echo -e "${GATEWAY}${BGN}http://${IP}${CL}"
71+
echo -e "${INFO}${YW}Admin credentials: ~/freescout.creds (inside the container)${CL}"

‎install/freescout-install.sh‎

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE
6+
# Source: https://github.com/freescout-help-desk/freescout
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
var_admin_email="${var_admin_email:-admin@example.com}"
17+
if [[ ! "$var_admin_email" =~ ^[^@[:space:]]+@[^@[:space:]]+\.[^@[:space:]]+$ ]]; then
18+
msg_warn "Invalid admin email '${var_admin_email}', using admin@example.com"
19+
var_admin_email="admin@example.com"
20+
fi
21+
var_admin_pass="${var_admin_pass:-$(random_password 16)}"
22+
23+
msg_info "Installing Dependencies"
24+
$STD apt install -y nginx
25+
msg_ok "Installed Dependencies"
26+
27+
setup_mariadb
28+
MARIADB_DB_NAME="freescout" MARIADB_DB_USER="freescout" setup_mariadb_db
29+
PHP_VERSION="8.4" PHP_FPM="YES" setup_php
30+
fetch_and_deploy_gh_release "freescout" "freescout-help-desk/freescout" "tarball"
31+
32+
msg_info "Configuring FreeScout"
33+
cd /opt/freescout
34+
cat <<EOF >/opt/freescout/.env
35+
APP_URL=http://${LOCAL_IP}
36+
DB_CONNECTION=mysql
37+
DB_HOST=localhost
38+
DB_PORT=3306
39+
DB_DATABASE=freescout
40+
DB_USERNAME=freescout
41+
DB_PASSWORD=${MARIADB_DB_PASS}
42+
APP_KEY=
43+
EOF
44+
$STD php artisan key:generate --force
45+
$STD php artisan storage:link
46+
$STD php artisan migrate --force
47+
$STD php artisan freescout:create-user --role=admin --firstName=Admin --lastName=FreeScout --email="$var_admin_email" --password="$var_admin_pass" --no-interaction
48+
touch /opt/freescout/storage/.installed
49+
$STD php artisan freescout:clear-cache
50+
chown -R www-data:www-data /opt/freescout
51+
cat <<EOF >>~/freescout.creds
52+
53+
FreeScout Admin
54+
Email: ${var_admin_email}
55+
Password: ${var_admin_pass}
56+
EOF
57+
chmod 600 ~/freescout.creds
58+
msg_ok "Configured FreeScout"
59+
60+
msg_info "Configuring Nginx"
61+
sed -i 's/^;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php/8.4/fpm/php.ini
62+
systemctl restart php8.4-fpm
63+
PHP_SOCK=$(get_php_fpm_socket)
64+
cat <<EOF >/etc/nginx/sites-available/freescout
65+
server {
66+
listen 80;
67+
listen [::]:80;
68+
server_name _;
69+
70+
root /opt/freescout/public;
71+
index index.php index.html index.htm;
72+
73+
client_max_body_size 128M;
74+
75+
location / {
76+
try_files \$uri \$uri/ /index.php?\$query_string;
77+
}
78+
location ~ \.php\$ {
79+
fastcgi_split_path_info ^(.+\.php)(/.+)\$;
80+
fastcgi_pass unix:${PHP_SOCK};
81+
fastcgi_index index.php;
82+
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
83+
include fastcgi_params;
84+
}
85+
location ~* ^/storage/attachment/ {
86+
expires 1M;
87+
access_log off;
88+
try_files \$uri \$uri/ /index.php?\$query_string;
89+
}
90+
location ~* ^/(?:css|js)/.*\.(?:css|js)\$ {
91+
expires 2d;
92+
access_log off;
93+
add_header Cache-Control "public, must-revalidate";
94+
add_header X-Content-Type-Options "nosniff";
95+
}
96+
location ~* ^/storage/.*\.((?!(jpg|jpeg|jfif|pjpeg|pjp|apng|bmp|gif|ico|cur|png|tif|tiff|webp|pdf|txt|diff|patch|json|mp3|wav|ogg|wma)).)*\$ {
97+
add_header Content-disposition "attachment; filename=\$2";
98+
add_header X-Content-Type-Options "nosniff";
99+
default_type application/octet-stream;
100+
}
101+
location ~* ^/(storage/|.*\.).*\$ {
102+
expires 1M;
103+
access_log off;
104+
add_header Cache-Control "public";
105+
add_header X-Content-Type-Options "nosniff";
106+
}
107+
location ~ /\. {
108+
deny all;
109+
}
110+
}
111+
EOF
112+
nginx_enable_site "freescout"
113+
msg_ok "Configured Nginx"
114+
115+
msg_info "Setting up Cron"
116+
cat <<EOF >/etc/cron.d/freescout
117+
* * * * * www-data php /opt/freescout/artisan schedule:run >/dev/null 2>&1
118+
EOF
119+
systemctl enable -q --now cron
120+
msg_ok "Set up Cron"
121+
122+
motd_ssh
123+
customize
124+
cleanup_lxc

‎json/freescout.json‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "FreeScout",
3+
"slug": "freescout",
4+
"categories": [
5+
25
6+
],
7+
"date_created": "2026-11-03",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"architectures": ["amd64", "arm64"],
12+
"interface_port": 80,
13+
"documentation": "https://github.com/freescout-help-desk/freescout/wiki",
14+
"website": "https://freescout.net/",
15+
"repository": "https://github.com/freescout-help-desk/freescout",
16+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/freescout.webp",
17+
"description": "FreeScout is a self-hosted help desk and shared mailbox, an open-source alternative to Zendesk and Help Scout. It turns support email into conversations that agents assign, tag and answer together, with saved replies, internal notes, collision detection and customer history. Modules add features like a knowledge base, satisfaction ratings and workflows.",
18+
"install_methods": [
19+
{
20+
"type": "default",
21+
"script": "ct/freescout.sh",
22+
"config_path": "/opt/freescout/.env",
23+
"resources": {
24+
"cpu": 2,
25+
"ram": 1024,
26+
"hdd": 6,
27+
"os": "Debian",
28+
"version": "13"
29+
}
30+
}
31+
],
32+
"default_credentials": {
33+
"username": "admin@example.com",
34+
"password": null
35+
},
36+
"notes": [
37+
{
38+
"text": "Sign in with the admin email and the generated password saved in ~/freescout.creds inside the container.",
39+
"type": "info"
40+
},
41+
{
42+
"text": "FreeScout only answers on the host in APP_URL (the container IP). For a domain or reverse proxy, change APP_URL in /opt/freescout/.env, then click Clear Cache under Manage > System > Tools.",
43+
"type": "warning"
44+
},
45+
{
46+
"text": "Mail servers on private IPs are rejected until listed in APP_REMOTE_HOST_WHITE_LIST in /opt/freescout/.env (clear the cache afterwards).",
47+
"type": "info"
48+
}
49+
],
50+
"app_vars": [
51+
{
52+
"name": "var_admin_email",
53+
"label": "Admin Email",
54+
"type": "text",
55+
"default": "admin@example.com"
56+
},
57+
{
58+
"name": "var_admin_pass",
59+
"label": "Admin Password",
60+
"type": "password",
61+
"secret": true,
62+
"help": "Generated when left empty"
63+
}
64+
]
65+
}

0 commit comments

Comments
 (0)