How to move the Fleio installation to a new URL

Docker installation

In order to change the Fleio URL you will need to replace all the old url occurrences with the new url in the following locations:

  1. Docker env. variables:
vi /home/fleio/compose/.env
  1. AngularJS enduser panel and staff panel configuration files:
fleio edit site_constants.js
fleio edit staff_constants.js
  1. Angular enduser panel and staff panel configuration files:
fleio edit enduser.config.json
fleio edit staff.config.json
fleio edit reseller.config.json # only if reseller is enabled
  1. file
fleio edit

Answer with n after you edit the file since Fleio does not need to be restarted. Finally, recreate Fleio by running fleio recreate.

Package installation

You have already installed Fleio and you want to change the URL, maybe for adding an SSL certificate. Here’s how to do it.

The following steps have been tested on an Ubuntu 18.04 install, so let’s assume that you have filled address when running the bootstrap:

* Install Fleio at URL []:

and you are logged in as root.

So URL was filled in all the settings and you want to change the URL to

1. Change the nginx config file name

cd /etc/nginx/sites-enabled/

2. Change server name in nginx config

Edit the nginx conf file:

# change the server_name; directive to:

Save, exit the editor, then restart the nginx service:

systemctl restart nginx

3. Change allowed hosts and frontend URL in Fleio

# edit backend settings
fleio edit
# change ALLOWED_HOSTS. You can also have a list of domains if needed:
# change FRONTEND_URL. You can use https:// if you have a SSL ceritificate

Trailing slash is not required and it won’t affect Fleio functionality if it’s added or not.

Optionally, if you have the Fleio frontend on another domain or if you have multiple frontends, each with another domain, you must also uncomment these lines in and add all the domains to CORS_ORIGIN_WHITELIST:

# NEW_MIDDLEWARE.insert(1, 'corsheaders.middleware.CorsMiddleware')
#    'http://host1',
#    'http://host2',
# )

Note that since django-cors-headers version 3.0.0 you need to specify an URI scheme for each origin.

WARNING: Fleio only works if both the backend and the frontend are on the same domain or on different subdomains of the same domain.

If the backend and the frontend are on different subdomains, you need to add this to


This ensures that cookies are accessible by all subdomains of

If you have multiple frontends on a single Fleio backend, also edit this section from


# The mapping consists of key-value pairs where the key stands for the client_group and the value will be its
# corresponding frontend URL; each client account will be associated with a group or multiple groups through ClientGroup
# For two frontend urls using the same backend the setting will look like:
# FRONTEND_URL_MAPPING = {'client_group1' : '', 'client_group2': ''}

Save, exit the editor, then restart fleio services:

systemctl restart uwsgi
systemctl restart fleio
systemctl restart celery

4. Change backend API URL in frontend settings

Edit end-user panel settings:

vi /var/webapps/fleio/frontend/site/constants/constants.js

and change api_url: '' to

api_url: ''

and the same thing for the staff panel:

vi /var/webapps/fleio/frontend/site/staff/constants/constants.js

change api_url: '' to

api_url: '',

Your Fleio installation should now work on the new domain.