Linkr
Home Resources Tools Documentation Blog Demo
FR
  • What is Linkr?
  • Deployment modes
  • Quick start
  • Local install
  • With Docker
  • Manual install
  • Client-only
  • Publish a portal
  • Install LibreChat
  • Your first project
  • Linkr in a clinical data warehouse
  • Workspaces and projects
  • The data pipeline
  • Entities and sharing
  • Versioning and collaboration
  • Overview
  • Projects
  • Wiki
  • Plugins
  • Members and roles
  • Settings
  • Schemas
  • Getting and exploring
  • Mapping
  • Databases
  • Derived sub-databases
  • Data quality
  • Data catalog
  • Build and publish
  • Anonymize
  • SQL script collections
  • ETL pipelines
  • Building and running
  • Generating the scripts
  • Overview
  • Mapping projects
  • Global view
  • Target concepts
  • Mapping editor
  • Suggestions
  • AI agent
  • Evaluation
  • Export
  • Overview
  • Databases
  • Concepts
  • Cohorts
  • Building
  • Results, SQL and report
  • Patient data
  • Manual collection
  • Pipeline
  • Datasets
  • IDE
  • Web apps
  • Versioning
  • Overview
  • Tabs and widgets
  • Built-in widgets
  • Analysis widgets
  • Control charts (SPC)
  • Surveys and eCRF
  • R and Python code
  • Filters, settings and export
  • Overview
  • Presentation mode
  • Exporting a report
  • Agents
  • MCP server
  • Skills
  • Import and export
  • Git versioning
  • Community catalog
  • Creating your own catalog
  • Publishing content
  • Production install
  • Configuration
  • Database connectors
  • Authentication and permissions
  • Files on the server
  • Backup and restore
  • Contributing code
  • Automated tests
  • Glossary
  • Keyboard shortcuts
  • Release notes
Documentation Getting started Publish a portal

Publish a portal

Publish a workspace and everything linked to it as a static site on GitLab Pages, rebuilt automatically every week, with Linkr Portal.

Summary

A portal is a static website that opens on Linkr with a workspace already loaded: its projects, mapping projects, ETL pipelines, schemas and databases. Linkr Portal builds it from the workspace’s Git repository and its linked repositories, then publishes it on GitLab Pages. The site rebuilds every week: a newly linked item shows up without any change to the portal.

How it works

A portal repository holds no content. It only names the workspace to publish, in a portal.conf file. Each build:

  1. fetches Linkr, at the version set in portal.conf;
  2. clones the workspace and reads its git-links.json, the list of items linked to their own repository (see Versioning and collaboration);
  3. clones each of those repositories and places its content in the workspace;
  4. builds the site and publishes it.

Every build takes the current state of the workspace and of each linked repository. To publish a new item, link it to its repository in Linkr and push the workspace: the next build picks it up. Nothing needs changing in the portal, and nothing needs configuring in the linked repositories.

The site runs entirely in the browser, like the client-only install: there is no server to host. Visitors work on their own copy of the data, which stays in their browser.

Before you start

  • A workspace pushed to a Git repository from Linkr (the workspace’s Git Remote tab), with the items to publish linked to their own repositories.
  • A GitLab account (gitlab.com, or a GitLab instance with Pages) and an empty project for the portal.
  • If the content is private: the Owner role on the GitLab group that holds the content repositories, to create the access token in step 3.

Set up the portal

Create the portal repository

Create an empty GitLab project, for example my-org/linkr-portal-my-workspace, then start from the linkr-portal template:

git clone https://framagit.org/interhop/linkr/linkr-portal.git linkr-portal-my-workspace
cd linkr-portal-my-workspace
git remote rename origin template
git remote add origin git@gitlab.com:my-org/linkr-portal-my-workspace.git

The template stays reachable as template, so you can pull its improvements later.

Point it at the workspace

In portal.conf, set the HTTPS address of the workspace repository and a short name for it:

: "${WORKSPACE_URL:=https://gitlab.com/my-org/linkr-content/workspaces/my-workspace}"
: "${WORKSPACE_FOLDER:=my-workspace}"

Use the HTTPS address, not SSH: the build authenticates over HTTPS. Once the portal is in use, keep WORKSPACE_FOLDER unchanged: visitors’ browsers store their copy of the data under that name.

Give access to private repositories

Skip this step if the workspace and every linked repository are public.

If they are private, you give the build one read-only key for the whole group that holds them. You do not authorise each repository in turn.

Create the token. On the GitLab group of the content repositories, open Settings > Repository > Deploy tokens > Add token:

FieldValue
Namelinkr-portals
Expiration dateempty (no expiry), or a date you will renew it by
Usernameempty: GitLab generates one (gitlab+deploy-token-…)
Scopesread_repository only

Write down the username and the token (gldt-…): the token is shown only once. This deploy token reads every repository of the group and its subgroups, including those created later.

Store it in the portal. In the portal project, not the group, open Settings > CI/CD > Variables > Add variable, twice:

KeyValueVisibilityProtect variable
CONTENT_TOKEN_USERthe token’s usernameVisiblechecked
CONTENT_TOKENthe tokenMasked and hiddenchecked

Leave Expand variable reference unchecked.

  • Masked hides the token in build logs.
  • Protect variable passes it only to the main branch, protected by default.
  • A group variable would be readable by every project in the group, including content repositories many people can push to. That is why the token goes in the portal project alone.

Push and check the first build

git push -u origin main

The push starts the pages job (Build > Pipelines). In its log, check that:

  • every [default-data] … cloning line passes, with no ERROR;
  • the list of repositories and their versions is printed;
  • the log ends with [portal] Done.

The same list is kept in the job’s build-info.txt file.

Open the site and choose who sees it

Deploy > Pages gives the site’s address, for example https://linkr-portal-my-workspace-a1b2c3.gitlab.io/.

If the content is private, restrict access: in Settings > General > Visibility, project features, permissions, under Pages, choose Only project members. Visitors then sign in to GitLab and must be members of the portal project.

Schedule the weekly rebuild

Build > Pipeline schedules > New schedule:

FieldValue
DescriptionWeekly rebuild
Interval pattern0 6 * * 1 (Mondays, 06:00)
Target branchmain

If a build fails, GitLab emails the schedule’s owner, and the version already published stays online.

The portal is in place

From now on, link an item in Linkr and push the workspace: it appears on the portal at the next rebuild. To publish right away, run a build by hand (Build > Pipelines > Run pipeline).

What the token lets the portal publish

Any repository in the token’s group that the workspace’s git-links.json names gets published, and anyone who can push the workspace can edit that file. Outside the group, only public repositories can be cloned. Choose the group accordingly: a narrower subgroup narrows what the portal can publish.

Day-to-day

To…Do
Publish a newly linked itemLink it in Linkr and push the workspace. Wait for the weekly rebuild, or run one by hand.
Publish changes right awayBuild > Pipelines > Run pipeline on main.
Move to a new Linkr versionChange LINKR_REF in portal.conf and push.
Know what a build containedDownload its job’s build-info.txt.

Public and private content

Keep public and private apart in the structure itself: two content groups, and one portal per visibility.

  • A public portal, with no token, reading linkr-content-public. It cannot clone a private repository, even one linked by mistake: its build fails instead of leaking it.
  • A private portal, whose token covers only linkr-content-private, and whose site is restricted to project members.

Troubleshooting

could not clone … Authentication failed. The repository is private and the build cannot read it. Possible causes: variables missing or misspelled, main branch not protected, token expired, or repository outside the token’s group.

tracks files with git-lfs, but git lfs pull failed. Same checks. A database’s data files (Parquet) are stored with Git LFS and go through the same token.

content needs a newer Linkr than this build. A linked repository was saved by a newer Linkr. Raise LINKR_REF in portal.conf.

JavaScript heap out of memory. The build machine is short of memory. Use a runner (the machine that runs GitLab jobs) with at least 8 GB of RAM.

Further reading

  • Versioning and collaboration — linking an item to its own repository, and what git-links.json holds.
  • Deployment modes — what a client-only site can and cannot do.
  • linkr-portal — the template, with the full configuration reference and local builds.
PreviousClient-onlyNextInstall LibreChat

Product

  • Home
  • Demo

Resources

  • Documentation
  • Resources
  • Tools
  • Blog

Community

  • Framagit source code
  • Github source code

About

  • InterHop.org
  • Contact

2021–2026 InterHop — CC BY-NC-SA 4.0 (site) · AGPLv3 (software)