Instructions for installing Tyk on Ubuntu 16.04 results in broken portal

I’ve gone through the installation instructions twice now, and after finishing the instructions for installing Tyk Dashboard on Ubuntu, the portal does not work (the link to Open Your Portal returns Not Found). This is on a public-facing server with actual DNS entries for the dashboard (let’s call it tyk-dashboard.mydomain.com) and a different DNS CNAME for the portal (let’s call it tyk-portal.myotherdomain.com), both pointing at same IP address. The instructions had me run this setup.sh command, which I modified to set the values for --tyk_api_hostname and --domain as suggested:

sudo /opt/tyk-dashboard/install/setup.sh --listenport=3000 --redishost=localhost --redisport=6379 --mongo=mongodb://127.0.0.1/tyk_analytics --tyk_api_hostname="tyk-dashboard.mydomain.com" --tyk_node_hostname=http://localhost --tyk_node_port=8080 --portal_root=/portal --domain="tyk-dashboard.mydomain.com"

and then a little later, after entering my Tyk Dashboard license, it asks me to run this:

sudo /opt/tyk-dashboard/install/bootstrap.sh tyk-dashboard.mydomain.com

Nowhere in the instructions did any of the steps require a portal hostname, and the tutorial doesn’t discuss the portal any further, it just goes on to installing and configuring tyk-pump and tyk-gateway. I can log into the dashboard, and then if I go to Portal Management → Settings I get the notification that no config was found so one was created, but the portal link still returns Not Found. If I manually go to tyk-portal.myotherdomain.com/portal (with or without a trailing /) I also get Not Found.

Once I’m at the end of the instructions, what additional steps are required to achieve a functional portal?

Thanks,
Fran

Have you tried the portal tutorial:

https://www.tyk.io/docs/get-started/with-tyk-on-premise/tutorials/tyk-on-premise-pro/create-portal-entry/

Now I have, thanks for the pointer (would be good to put a link to that in the installation instructions). I get stuck at Step 6 - trying to set the portal domain from the Dashboard results in a “There was a problem updating your CNAME, please contact support” dialog. Manually replacing the IP-based URL that Open Your Portal is trying to go to with the domain name-based URL is still resulting in a Not Found.

Yes the domain regex is super strict in the UI, we need to fix that.

The way to manually change this is to use the Dashboard Admin API and modify the organisation object.

Here’s how you can do it with curl and jq:

#You can find the Org ID under Users -> Your User -> RPC Key
export MYORG=591ea6b10668f001852ae77a

# Get the object
curl -s -X GET \
    http://localhost:3000/admin/organisations/$MYORG\
    -H 'admin-auth: 12345'  > org.json

# Add the CNAME to the JSON
jq '.cname="mytestdomain.com"' org.json > org_fixed.json

# PUT it back
curl -X PUT \
    http://localhost:3000/admin/organisations/$MYORG\
    -H 'admin-auth: 12345' \
    -H 'content-type: application/json'\
    -d @org_fixed.json

# Restart the dashboard
sudo service tyk-dashboard restart

Thanks Martin, that got me over the hurdle. Working dev portal now!! Appreciate the help.