Last modified: May 21, 2026

Local Development

Getting started with local development

During application development, you will need to work both in Altinn Studio and in a local development environment. Here’s an overview of how to get started with local development.

How to clone the application to a local development environment

studioctl is the recommended command-line tool for local development of Altinn Studio apps. It logs in to Altinn Studio, clones the app repository and configures Git authentication for you.

studioctl is currently released as v0.1.0-preview. Breaking changes may still occur, although no breaking changes are planned at the moment.

Supported platforms

studioctl can be used on Windows, Linux and macOS. To run the local test platform, you need a container runtime. Use Docker, Podman or Colima.

Install studioctl:

curl -sSL https://altinn.studio/designer/api/v1/studioctl/install.sh | sh

On Windows, install from PowerShell:

iwr https://altinn.studio/designer/api/v1/studioctl/install.ps1 -useb | iex

Log in and clone the app:

studioctl auth login
studioctl app clone <org>/<app-name>
cd <app-name>

For automation and CI, pass an existing Studio/Designer API key through standard input from an environment variable:

printf '%s' "$STUDIO_DESIGNER_API_KEY" | studioctl auth login --with-token
  1. Find the application you want to work with locally in the Dashboard in Altinn Studio.
  2. Navigate to the repository by clicking the Repository button.

    Repository button highlighted in an image

  3. Copy the repository link (the blue square) either manually or by clicking the button marked with a red circle.

    Highlighted repository URL in Gitea in an image

  4. Open a terminal in your local development environment.
    • Navigate to the desired location for the application repository.
    • Enter the command git clone and paste the URL you copied in the previous step.
    $ git clone https://altinn.studio/repos/<org>/<app-name>.git
    
    $ git clone https://<username>:<access-token>@altinn.studio/repos/<org>/<app-name>.git
    
    • You should see an output in the terminal similar to this:
    Cloning into 'app-name'...
    remote: Enumerating objects: 982, done.
    remote: Counting objects: 100% (982/982), done.
    remote: Compressing objects: 100% (950/950), done.
    remote: Total 982 (delta 600), reused 0 (delta 0), pack-reused 0
    Receiving objects: 100% (982/982), 166.38 KiB | 1.51 MiB/s, done.
    Resolving deltas: 100% (600/600), done.
    

A folder with the same name as the application has been created, and the contents of the application repository have been cloned into the folder. Now you can open your preferred development tool and start coding.

How to synchronize changes in the local development environment

Changes made locally need to be uploaded (pushed) to the repository from which the code was cloned. If changes are made in Altinn Studio Designer (and uploaded to the repository), these must be downloaded (pulled) to update the local code.

Synchronizing changes made in the local development environment can be done in several ways. Many development tools have good integrations for this purpose, so check if your tool has that type of support.

Below is a description of how you can synchronize changes from the command line.

Uploading changes

  1. Navigate to your application repository in a terminal.
  2. Add the files you want to upload changes for (push) with the command git add <file path>. The command can be executed for individual files, multiple files at once (space separated), or a directory.
  3. Save (commit) the changes with a meaningful message using the command git commit -m <commit message>.
  4. Upload (push) the changes to the master branch with the command git push.

Downloading changes

Navigate to your application repository in a terminal and run the command git pull.

Read more about git pull here

How to synchronize changes in Altinn Studio

If you’re using Altinn Studio for development, changes need to be synchronized with the Altinn Repository.

Downloading changes

  1. Click on Hent endringer (Fetch changes) on the ‘Lage’ page of the application in Altinn Studio.

    Fetch changes in Altinn Studio

  2. If everything went well, you will see this confirmation.

    Fetch changes confirmation

Uploading changes

  1. Click on Last opp dine endringer (Upload your changes) on the ‘Lage’ page of the application in Altinn Studio.

    Upload changes in Altin Studio

  2. Enter a descriptive message for the change(s) and click Valider endringer (Validate changes).

    Commit message

  3. Wait for the changes to be validated. If a conflict occurs, click Løs konflikt (Resolve conflict) and follow the instructions.
  4. Click lagre (Save) to upload the changes to the repository (master).

    Save validated changes

  5. If everything went well, you will see this confirmation.

    Save confirmation

Local testing

You can preview the changes you make when working locally. studioctl starts the local test platform, runs the app and connects the app to local.altinn.cloud on port 8000. You need a container runtime, such as Docker, Podman or Colima, and the .NET SDK to run the app as a local process. Run studioctl doctor to check that your machine has the required tools.

NOTE To run the app in LocalTest, the application must have an associated data model.
WARNING If you have an existing app-localtest stack, stop and remove it completely before running studioctl env up. Use the command that matches your container runtime, such as docker compose down -v or the Podman equivalent.
  1. Start the local test platform: Go to the app repository in a terminal and run studioctl env up.
  2. Run your application within LocalTest: Run studioctl run from the app repository. The command detects the app directory and starts the app with the correct local settings.
  3. Preview and test the application: Go to http://local.altinn.cloud:8000 and log in with a test user.

You can also open the browser when the test platform starts:

studioctl env up --open
studioctl run

Useful commands:

CommandDescription
studioctl env up --openStarts the local test platform and opens local.altinn.cloud on port 8000.
studioctl env statusShows local test platform status.
studioctl env logsShows logs from the LocalTest containers.
studioctl run --detachRuns the app in the background.
studioctl app logsShows logs from an app running in the background. Use --follow for live logs.
studioctl stopStops apps started with studioctl run --detach.
studioctl env downStops the local test platform.
studioctl doctorDiagnoses missing tools and local environment issues.

Preview changes in real-time

  • For changes related to JSON files, simply reload the page.
  • For changes in prefilling, the application must be instantiated again (go to http://local.altinn.cloud:8000 and log back in).
  • For changes in C# files, the application must be stopped (ctrl+C) and restarted (studioctl run).

To automatically update when there are changes in C# files, start the application with dotnet watch. This command will either start the application or reload it (hot reload) when changes are made to the source code.

Stop the application and LocalTest

Stop the application by pressing ctrl+C in the terminal window where you started it. Stop LocalTest with studioctl env down.

The old workflow uses the app-localtest repository directly. This method can still be useful when troubleshooting an old setup, but the recommended local workflow is studioctl.

  1. Download and start LocalTest by following the steps described on GitHub (includes starting the app, which is also explained below).
  2. Run your application within LocalTest: Open a new terminal window and go to the subfolder App in your application (<app-name>/App). Start the app with the command dotnet run and wait for confirmation in the terminal.
  3. Preview and test the application: Go to http://local.altinn.cloud:8000 and log in with a test user.

Stop the application by pressing ctrl+C in the terminal window where you started it. Stop LocalTest by going to the app-localtest folder in the terminal and running the command docker compose down.