Need Help Installing Kobo on my Own Server

Hello, im trying to install Kobo on my own server, i already have the SSL certificates so im selecting use reverse proxy but not sure if im doing it correctly and installation never finishes:

root@ubuntu-s-4vcpu-8gb-intel-TEST-7:~/kobo-install# python3 run.py --setup
╔════════════════════════════════════════════════════════════════════╗
║ ║
║ Welcome to kobo-install. ║
║ ║
║ You are going to be asked some questions that will determine how ║
║ to build the configuration of KoboToolBox. ║
║ ║
║ Some questions already have default values (within brackets). ║
║ Just press enter to accept the default value or enter - to ║
║ remove previously entered value. ║
║ Otherwise choose between choices or type your answer. ║
║ ║
╚════════════════════════════════════════════════════════════════════╝
Where do you want to install?
[/root/kobo-docker]:
Please confirm path [/root/kobo-docker]
1) Yes
2) No
[1]:
Do you want to see advanced options?
1) Yes
2) No
[1]:
What kind of installation do you need?
1) On your workstation
2) On a server
[2]:
Please choose which network interface you want to use?
eth0) xxx
eth1) xxx
other) Other
[eth0]:
Do you want to use separate servers for front end and back end?
1) Yes
2) No
[2]:
Public domain name? [xxx.com]:
KPI sub domain? [kf]:
KoBoCat sub domain? [kc]:
Enketo Express sub domain name? [ee]:
Do you want to use HTTPS?
1) Yes
2) No
[1]:
╔════════════════════════════════════════════════════════════════════╗
║ ║
║ Please note that certificates must be installed on a reverse-proxy ║
║ or a load balancer.kobo-install can install one, if needed. ║
║ ║
╚════════════════════════════════════════════════════════════════════╝
Auto-install HTTPS certificates with Let’s Encrypt?
1) Yes
2) No - Use my own reverse-proxy/load-balancer
[1]: 2
Is your reverse-proxy/load-balancer installed on this server?
1) Yes
2) No
[1]:
Internal port used by reverse proxy?
[8080]:
SMTP server? []:
SMTP port? [25]:
SMTP user? []:
From email address? [tremsdel@gmail.com]:
Super user’s username? [super_admin]:
Super user’s password? [xxx]:
Docker Compose prefix? (leave empty for default) []:
Use staging mode?
1) Yes
2) No
[2]:
KoBoCat PostgreSQL database name?
[kobocat]:
KPI PostgreSQL database name?
[koboform]:
PostgreSQL user’s username?
[kobo]:
PostgreSQL user’s password?
[xxx]:
Do you want to tweak PostgreSQL settings?
1) Yes
2) No
[2]:
MongoDB root’s username?
[root]:
MongoDB root’s password?
[xxx]:
MongoDB user’s username?
[kobo]:
MongoDB user’s password?
[xxx]:
Do you want to run the Redis containers from this server?
1) Yes
2) No
[1]:
Redis password?
[ezAv1Yx50loCyIoEZAXE]:
Max memory (MB) for Redis cache container?
Leave empty for no limits
[]:
Do you want to expose back-end container ports (PostgreSQL, MongoDB, Redis)?
1) Yes
2) No
[2]:
Do you want to customize the application secret keys?
1) Yes
2) No
[2]:
Do you want to use AWS S3 storage?
1) Yes
2) No
[2]:
Google Analytics Identifier []:
Google API Key []:
Do you want to use Sentry?
1) Yes
2) No
[2]:
Do you want to tweak uWSGI settings?
1) Yes
2) No
[2]:
Do you want to add additional settings to the front-end docker containers?
1) Yes
2) No
[2]:
Do you want to add additional settings to the back-end docker containers?
1) Yes
2) No
[2]:
Do you want to activate backups?
1) Yes
2) No
[2]:

Removing network kobomaintenance_kobo-maintenance-network
WARNING: Network kobomaintenance_kobo-maintenance-network not found.
Network kobofe_kobo-fe-network is external, skipping

Stopping kobofe_enketo_express_1 …
Stopping kobofe_enketo_express_1 … done
Stopping kobofe_kpi_1 … done
Stopping kobofe_kobocat_1 … done
Stopping kobofe_nginx_1 … done
Removing kobofe_enketo_express_1 … done
Removing kobofe_kpi_1 … done
Removing kobofe_kobocat_1 … done
Removing kobofe_nginx_1 … done
Network kobobe_kobo-be-network is external, skipping
Removing network kobofe_kobo-fe-network
Stopping kobobe_redis_main_1 … done
Stopping kobobe_mongo_1 … done
Stopping kobobe_redis_cache_1 … done
Stopping kobobe_postgres_1 … done
Removing kobobe_redis_main_1 … done
Removing kobobe_mongo_1 … done
Removing kobobe_redis_cache_1 … done
Removing kobobe_postgres_1 … done
Removing network kobobe_kobo-be-network
Launching environment
Creating network “kobobe_kobo-be-network” with driver “bridge”
Creating kobobe_mongo_1 …
Creating kobobe_postgres_1 …
Creating kobobe_redis_cache_1 …
Creating kobobe_redis_main_1 …
Creating kobobe_mongo_1
Creating kobobe_postgres_1
Creating kobobe_redis_cache_1
Creating kobobe_mongo_1 … done
Waiting for PostgreSQL database to be up & running…
Creating network “kobofe_kobo-fe-network” with driver “bridge”
The PostgreSQL database is running!
Creating kobofe_kobocat_1 …
Creating kobofe_enketo_express_1 …
Creating kobofe_nginx_1 …
Creating kobofe_kpi_1 …
Creating kobofe_kobocat_1
Creating kobofe_nginx_1
Creating kobofe_enketo_express_1
Creating kobofe_kpi_1 … done
Waiting for environment to be ready. It can take a few minutes.

This is my cojnfig for the reverse proxy:

root@ubuntu-s-4vcpu-8gb-intel-TEST-7:/etc/nginx# ls
conf.d koi-utf modules-available proxy_params sites-enabled win-utf
fastcgi.conf koi-win modules-enabled scgi_params snippets
fastcgi_params mime.types nginx.conf sites-available uwsgi_params
root@ubuntu-s-4vcpu-8gb-intel-TEST-7:/etc/nginx# cd sites-enabled/

server {
listen 80;
listen [::]:80;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;

    server_name xxx.com  kf.xxx.com kc.xxx.com ee.xxx.com;

try_files $uri $uri/ =404;
proxy_pass http://localhost:8080;
}
}

What im a doing wrong?

You need to fix your nginx configuration, this is the configuration I used:

server{
  server_name kc.xxx.com kc.xxx.com ee.xxx.com;
   access_log  /var/log/nginx/kobo.access.log;
   error_log  /var/log/nginx/kobo.error_log;
   listen 80;
   client_max_body_size 100M;
   location / {
             proxy_set_header        Host $host;
             proxy_set_header        X-Real-IP $remote_addr;
             proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header        X-Forwarded-Proto $scheme;
             proxy_pass              http://127.0.0.1:8080$request_uri;
             proxy_read_timeout  90;
    }
}

After setting the configuration you need to get your SSL Certificates for your nginx, I recommend you to use Let’s Encrypt with Certbot, its quite easy to get https with that. Then you’re ready to proceed with the installation.

1 Like