Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Headless linux install of Unity version for building on server

Discussion in 'Linux' started by DallasP9124, Nov 4, 2022.

  1. DallasP9124

    DallasP9124

    Joined:
    Jul 15, 2020
    Posts:
    11
    I am using the latest Ubuntu Server and have TeamCity installed as my build server. I have an agent installed and running as well. I want to do this so that I can have a build created for a linux target to ensure it actually builds. In the future I can have Linux users actually playtest these builds.

    I am unable to find any documentation on how I would install Unity build tools and stuff to do a headless build without the editor through UnityHub (which I can't open). Is what I want to do even possible?
     
  2. hhanaytug

    hhanaytug

    Joined:
    Mar 29, 2018
    Posts:
    1
    You can use Unity Hub headless. -m <moduleid> and -cm automatically installs all child modules of selected modules. You can try "--headless help" for more options.

    Example: unityhub --headless install --version 2022.1.22f1 -m android --cm

    This command will install Unity 2022.1.22f1 with android build support. OpenJDK, SDK, NDK everything.

     
    JesseSTG likes this.
  3. DallasP9124

    DallasP9124

    Joined:
    Jul 15, 2020
    Posts:
    11
    Would you be able to link official documentation around installing headless? Would be good for that to be found here in case anyone has the same question and finds this thread. I have tried finding that doc but unsuccessful.
     
  4. defied

    defied

    Joined:
    Dec 4, 2020
    Posts:
    17
    I think I tried this earlier for an automated install, but had to accept a license agreement. Is there a flag to auto-accept that?
     
  5. illia179

    illia179

    Joined:
    Sep 13, 2022
    Posts:
    1
    Is there any way to use unity hub on servers without display? When launching unity hub in headless mode get the error
    Code (csharp):
    1. (unityhub-bin:1761678): Gtk-WARNING **: 12:19:44.890: cannot open display:
    Tried to install unity version without hub, but installer from https://unity.com/releases/editor/archive is unable to install android platform entirely (missing SDK, NDK, JDK and no possibility to add it). The info message says
    Code (csharp):
    1. Available components: Unity,Android,iOS,Linux-IL2CPP,Linux-Server,Mac-Mono,Mac-Server,WebGL,Windows-Mono,Windows-Server
     
    Last edited: Jan 8, 2023