Download file

Warning!!! The Information on this project is outdated. Since the release SP17, the install script doesn't work anymore, due to the modularization of CODESYS.
CODESYS 4 Linux is just a small install helper, to install CODESYS on top of wine. This works, since the release of version 3.5 SP13, more or less smoothly. You can't expect, that all features are working, or that the usability is as smooth as under windows. But big parts of the product are working, what makes it well usable for many scenarios.
This describes, the prefered way, using the install script.
To manually do the installation, you might want to take a look into this page.
Download the install script. This can be done with
e.g.:
wget -c "https://forge.codesys.com/tol/codesys-4-linux/docker/ci/master/tree/codesys-ide/install2.sh?format=raw"
Make sure, that you own a valid Windows license. Because the installer will install DotNet from Microsoft. And this software requires a valid Windows license.
Change the rights of the script, and run it.
chmod u+x install2.sh
./install2.sh
After the installer finished, you should have a folder "~/.wine.cds/drive_c/CODESYS". From there you can start CODESYS like this...
export WINEPREFIX=~/.wine.cds
wine ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe
You can build a docker container, which contains a CODESYS installation running on top of wine. The installation process is automated in the same way as described above. To build the docker image, you can simply use the Dockerfile from the Git repository:
sudo docker build https://forge.codesys.com/git/tol,codesys-4-linux,docker.git\#:codesys-ide -t codesys-ide
The image can be used to automate tasks. It contains a wrapper to start CODESYS, which contains already a few scripts, which can be used to automate specific tasks.
For example:
sudo docker run codesys-ide codesys compile-library
But again, be aware, that you need to own a Windows license to use the image, as it contains a DotNet installation from Microsoft.
The CODESYS Control runtime is natively running on Linux. The Soft PLC CODESYS Control Linux SL contains a free 2h Demo mode. You can easily create a debian based docker inage, which contains this demo:
sudo docker build https://forge.codesys.com/git/tol,codesys-4-linux,docker.git\#:codesys-control -t codesys-control
The runtime can then be started inside the container. Note that the runtime needs to be started with root privileges. This is not very common for docker, but currently the easiest solution to get it running:
sudo docker run --privileged codesys-control
Building the codesys-ide container does not work for me with the command you provided here. After downloading
dotNetFx40_Full_x86_x64.exe, my build is simply stuck on the "Executing load_remove_mono internal" command. Do you have any idea what could cause this?Thanks for providing this! I'm changing jobs soon and will be using codesys on Linux for my next round of development.
Hi everyone,
I’ve successfully got CODESYS 64 3.5.21.30 (SP21 Patch 3) running on Linux!
I’ve compiled and gone online with a very large, highly complex project containing hundreds of thousands of lines of code, with an architecture that makes extremely heavy use of polymorphism. Compilation succeeded, and I was able to connect to the PLC and work online.
The Wine version used is Wine 11.20, built from development commit:
66caeb46aea4aa8fe6f87b7a209e7867651c09dd
This is a new WoW64 build supporting both 32-bit and 64-bit Windows applications, with two local patches:
NCrypt: implements NCryptEnumAlgorithms and NCryptFreeBuffer, with regression tests.
NTDLL: addresses a thread-suspension livelock affecting the x86 .NET runtime under Linux split-lock mitigation. This resolved the freeze when opening Change in CODESYS Installer. The kernel mitigation remains enabled.
The environment also uses native .NET Framework 4.8 and Windows Desktop Runtime 8.0.33 x86 for CODESYS Installer.
I’m attaching both patches with the exact Wine base commit, plus a screenshot showing CODESYS running on my Linux desktop. Project and device names have been blurred.
These are locally tested patches; the NTDLL change is still experimental, and not every CODESYS feature has been validated.
To patch wine:
Update: patched Wine packages for Ubuntu are now available
I have now published Ubuntu amd64 packages of my patched Wine build for CODESYS, targeting Ubuntu 22.04, 24.04, 26.04 and 26.10.
The packages are based on Wine 11.20 and include all five compatibility patches covering NCrypt, thread suspension, security tokens, service tokens and local WMI marshalling. Both 32-bit and 64-bit Windows applications are supported through WoW64.
In my working environment, CODESYS 3.5 SP21 successfully compiled and went online with a very complex project containing hundreds of thousands of lines of code and extensive use of polymorphism.
PPA and installation
All four binary builds have completed successfully and are now published and available through APT.
Wine ADV for CODESYS PPA
The runtime installs under /opt/wine-adv and provides dedicated commands, allowing it to coexist with your existing Wine installation.
For example, to launch CODESYS from an existing dedicated prefix:
Adjust the executable path to match your installed version. Use the same WINEPREFIX when running the CODESYS installer or installing its prerequisites.
The package contains the patched Wine runtime. CODESYS and its required Microsoft .NET components must be installed separately inside the prefix.
Source code, patches and packaging are available on the project page.
This is an experimental community build. Feedback and test results from other users are welcome!
CODESYS Installer and CodeMeter licensing are also working in my setup.
For CodeMeter, I use the native Linux CodeMeter runtime, while the Windows applications run under the patched Wine build.