diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0fa450c46c763c54153855a1733a1e92690933b3..e4accd722d66823a067fe8f2c1212746bc18b076 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ test_api:
   variables:
     DJANGO_ALLOWED_HOSTS: "localhost"
     DATABASE_URL: "postgresql://postgres@postgres/postgres"
-
+    FUNKWHALE_URL: "https://funkwhale.ci"
   before_script:
     - cd api
     - pip install -r requirements/base.txt
diff --git a/api/config/settings/common.py b/api/config/settings/common.py
index e5389756f473c8d61aeb17576cb923d1c8b38849..4c574b4c76c43eb1b796b9bb341edddc86e7e07f 100644
--- a/api/config/settings/common.py
+++ b/api/config/settings/common.py
@@ -25,7 +25,7 @@ except FileNotFoundError:
     pass
 
 ALLOWED_HOSTS = env.list('DJANGO_ALLOWED_HOSTS')
-
+FUNKWHALE_URL = env('FUNKWHALE_URL')
 
 # APP CONFIGURATION
 # ------------------------------------------------------------------------------
diff --git a/api/test.yml b/api/test.yml
index e892dfb178221ccd5ba8ed83558f3a6436b20dad..5e785cb1ac3e20eba418a5d89673a207a84519de 100644
--- a/api/test.yml
+++ b/api/test.yml
@@ -12,5 +12,6 @@ services:
     environment:
       - "DJANGO_ALLOWED_HOSTS=localhost"
       - "DATABASE_URL=postgresql://postgres@postgres/postgres"
+      - "FUNKWHALE_URL=https://funkwhale.test"
   postgres:
     image: postgres
diff --git a/deploy/env.prod.sample b/deploy/env.prod.sample
index 6a4b15b67cf04857b87296c30a23060e650f2d7c..037dc4651aae2cace9375b34c563691d572cd984 100644
--- a/deploy/env.prod.sample
+++ b/deploy/env.prod.sample
@@ -2,6 +2,7 @@
 # following variables:
 # - DJANGO_SECRET_KEY
 # - DJANGO_ALLOWED_HOSTS
+# - FUNKWHALE_URL
 
 # Additionaly, on non-docker setup, you'll also have to tweak/uncomment those
 # variables:
@@ -28,6 +29,9 @@ FUNKWHALE_VERSION=latest
 FUNKWHALE_API_IP=127.0.0.1
 FUNKWHALE_API_PORT=5000
 
+# Replace this by the definitive, public domain you will use for
+# your instance
+FUNKWHALE_URL=https.//yourdomain.funwhale
 
 # API/Django configuration