Skip to content

Docker build and compose files for x2go server to use with remote access desktops

License

Notifications You must be signed in to change notification settings

j-isreal/x2go-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

x2go-docker README.md


**Docker compose scripts and docker hub images which contain different Ubuntu Desktop setups for x2go remote access desktop **

To install docker, https://docs.docker.com/engine/install/#server

Currently, I have linux-based arm64 and amd64 images:

  • Ubuntu 24.04 (latest) with either:
    • LXDE desktop
    • XFCE4 desktop
    • Mate desktop

Check out my development project page: https://www.jinet.us/dev/dev-projects/x2go-docker/

1. Clone the git repo

Clone the git repo or download the files so you can work with them.

git clone https://github.com/j-isreal/x2go-docker.git

2. Create docker network FIRST

Create a macvlan docker network for the local lan FIRST - see 1-create-network.md

How to run on Docker ?

You can use my pre-built docker images or build one for your system architecture/setup using included Dockerfile.

NOTE: It is highly recommended to use a pre-built Docker Hub image by using the Docker compose method below .

Docker Hub images - use the docker compose method below:

To build for your architecture/system - NOT SUGGESTED:

(go to folder you git cloned)
cd [lxde or xfce4 or mate]  # your choice of desktop
docker build -t [yourimagename] . # don't forget the trailing period

3. Create Container using Docker Compose

After you either choose to use a pre-built Docker Hub image or build an image, create your container using Docker Compose.

Don't forget to edit the appropriate docker-compose file to specify the correct image and IP address.

See the README.md file in either the lxde or xfce4 folder first to make the changes.

(go to folder you git cloned)
cd [lxde or xfce4 or mate]  # your choice of desktop
docker compose -f docker-compose-lxde.yml up -d  # or -r docker-compose-xfce4.yml, your choice

** note down the root/dockerx passwords

The initial passwords will be displayed if you omit the -d above. It's recommended to change the passwords immediately, for security.

4. Connect to x2go server with client

Download the x2go client for your OS from: http://wiki.x2go.org/doku.php/doc:installation:x2goclient

Connect to your server with

Host : (Your Server IP)

Port : 22

Username : dockerx

Password : (varies or could be just 'changeme')

Select the Session TYPE as : XFCE or LXDE or MATE depending on your setup.

You can also SSH to the docker container directly with root or dockerx users and their passwords over the port 22 with linux ssh or windows putty clients.

User dockerx can be used to login; however, for some reason you need to use root for your very first login - then you can use dockerx to login with x2go :)

ssh root@dockerhost -p 22

Persistent Disk Volume

The docker compose file sets up a disk storage volume called "x2go_homes" and is mounted inside the x2go server at "/home" - the user home folders location.

This volume will be located on the host machine at "/var/lib/docker/volumes/x2go_homes/_data" so you can make backups or perform file operations there.

Why this project?

I wanted to expand on the original project and images that were created over a decade ago by https://github.com/paimpozhil/ to include the latest version of Ubuntu (including arm64 for my Raspberry Pi 4b) and the 2 lightweight desktops, XFCE4 and LXDE, via X2go. Also created /home storage volume on host so it can be backed up from the docker host, updated network to use the local network for easy access, and created docker compose files for both desktop versions.

This system also works as a VERY cheap remote-desktop for anyone who wants a desktop on the cloud for anything from working remotely or browse internet where there are VPN restrictions.

You can run 2-3 desktops over a cheap DigitalOcean VPS. I run this on my Raspberry Pi (which has 8GB RAM) and can get several users logged in at the same time.

Need support?

Credits:

Check out my development project page: https://www.jinet.us/dev/dev-projects/x2go-docker/

Copyright © 2024 Jacob Eiler, Isreal Consulting, LLC. All rights reserved.

About

Docker build and compose files for x2go server to use with remote access desktops

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published