[Support] binhex - Crafty-4


Recommended Posts

18 hours ago, dkerlee said:

any luck with this? I'd like to make my crafty-4 web backend available to my buddy, and want it to be safe SSL connection.

 

18 minutes ago, dkerlee said:

Anyone proxy this web GUI via SWAG yet? I wasn't able to find much - but perhaps there's an existing template that might work with a few changed items?

 

@dkerlee Unfortunately I haven't been able to get it to work just yet. I checked Crafty's wiki for proxy config for Nginx config so I integrated that into my own proxy-conf and still nothing.

 

This is my current config for Crafty:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name minecraft.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth (requires ldap-location.conf in the location block)
    #include /config/nginx/ldap-server.conf;

    # enable for Authelia (requires authelia-location.conf in the location block)
    #include /config/nginx/authelia-server.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable for ldap auth (requires ldap-server.conf in the server block)
        #include /config/nginx/ldap-location.conf;

        # enable for Authelia (requires authelia-server.conf in the server block)
        #include /config/nginx/authelia-location.conf;

        #include /config/nginx/proxy.conf;
        #include /config/nginx/resolver.conf;

        proxy_http_version 1.1;
        proxy_redirect off;
        proxy_buffering off;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        client_max_body_size 0;
	proxy_connect_timeout 3600s;
        proxy_read_timeout 3600s;
        proxy_send_timeout 3600s;
        send_timeout 3600s;

        set $upstream_app crafty;
        set $upstream_port 8001;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        # Clear Authorization Header if you are using http auth and normal Grafana auth
        #proxy_set_header    Authorization       "";

    }
}

 

As a note on my config I have my containers setup on their own network for SWAG and I've named the container "crafty" which is different from the default "binhex-crafty-4". I've also changed the port from the container to 8001 instead of 8443 because I already have some containers using that port.

 

If anyone has ideas on this I'd appreciate the input.

Link to comment

@RetroJect

Thanks for the response. I managed to get mine working. Do you have any OTHER working SWAG containers that are forwarded? I do, so I started from there.

I copied a working SWAG subdomain.conf to a new name

cd /mnt/user/appdata/swag/nginx/proxy-confs
cp nextcloud.subdomain.conf crafty.subdomain.conf
nano crafty.subdomain.conf

 

Here are the contents of that file:

 

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name crafty.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app binhex-crafty-4;
        set $upstream_port 8443;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_max_temp_file_size 2048m;
    }
}

 

The parts I modified are:
server_name crafty.*;   ## this is the subdomain you setup at your godaddy CNAME, or wherever you host your main domain

set $upstream_app binhex-crafty-4;   ##this must match the name of your docker, Unraid > Docker Container > "Name:"

set $upstream_port 8443;  ## this must match "Host Port 2" container port on the Docker settings for Crafty 4. Hmm, that's not the best name for a variable is it!? But that's what it is.

 

Change Crafty 4 Docker container Network Type to "proxynet" (I had previously followed Ed Spacedinvader video for setting up reverse proxy youtube)

 

Then you gotta add "crafty" to the SWAG Docker > Settings > Subdomain(s):

I have a few others, so for me it looks just like this: "nextcloud,emby,crafty"

 

restart swag container, though when you make a change to the Subdomain(s), it will restart it already for ya.

 

boom, working.

Hope this helps! Let me know if you want screen shots of anything.

 

The SWAG log

Spoiler

text  error  warn  system  array  login  

Saving debug log to /var/log/letsencrypt/letsencrypt.log
No match found for cert-path /config/etc/letsencrypt/live/nextcloud.XXXXX.com/fullchain.pem!
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
cont-init: info: /etc/cont-init.d/50-certbot exited 0
cont-init: info: running /etc/cont-init.d/55-permissions
cont-init: info: /etc/cont-init.d/55-permissions exited 0
cont-init: info: running /etc/cont-init.d/60-renew
cont-init: info: /etc/cont-init.d/60-renew exited 0
cont-init: info: running /etc/cont-init.d/70-outdated
cont-init: info: /etc/cont-init.d/70-outdated exited 0
cont-init: info: running /etc/cont-init.d/85-version-checks
cont-init: info: /etc/cont-init.d/85-version-checks exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun fail2ban (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
s6-rc: info: service 99-ci-service-check successfully started
error: state file /config/log/logrotate.status is world-readable and thus can be locked from other unprivileged users. Skipping lock acquisition...
SUBDOMAINS=nextcloud,emby,crafty
EXTRA_DOMAINS=
ONLY_SUBDOMAINS=true
VALIDATION=http
CERTPROVIDER=
DNSPLUGIN=
[email protected]
STAGING=false

Using Let's Encrypt as the cert provider
SUBDOMAINS entered, processing
SUBDOMAINS entered, processing
Only subdomains, no URL in cert
Sub-domains processed are:  -d nextcloud.XXXXX.com -d emby.XXXXX.com -d crafty.XXXXX.com
E-mail address entered: [email protected]
http validation is selected
Different validation parameters entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created
Generating new certificate
Account registered.
Requesting a certificate for nextcloud.XXXXX.com and 2 more domains

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/nextcloud.XXXXX.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/nextcloud.XXXXX.com/privkey.pem
This certificate expires on 2023-01-15.
These files will be updated when the certificate renews.
NEXT STEPS:
- The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See https://certbot.org/renewal-setup for instructions.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                   https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
New certificate generated; starting nginx
The cert does not expire within the next day. Letting the cron script handle the renewal attempts overnight (2:08am).
/config/nginx/geoip2.conf exists.
        Please migrate to https://github.com/linuxserver/docker-mods/tree/swag-maxmind
/config/nginx/ldap.conf exists.
        Please apply any customizations to /config/nginx/ldap-server.conf
        Ensure your configs are updated and remove /config/nginx/ldap.conf
        If you do not use this config, simply remove it.
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
/config/nginx/nginx.conf
/config/nginx/ldap-server.conf
/config/nginx/authelia-server.conf
/config/nginx/authelia-location.conf
/config/nginx/ssl.conf
/config/nginx/proxy.conf
/config/nginx/site-confs/default.conf

[custom-init] No custom files found, skipping...
[ls.io-init] done.
Server ready

 

screencapture-192-168-11-53-Dashboard-UpdateContainer-2022-10-18-09_48_36.png

screencapture-192-168-11-53-Dashboard-UpdateContainer-2022-10-18-09_49_07.png

Edited by dkerlee
Link to comment

@dkerlee Glad to hear you've gotten yours working!

 

Unfortunately I still can't get mine to work. When I first started I had copied an existing config and tried to use that but nothing worked. I just tried using the config you provided but that also didn't work for me.

I must be missing something somewhere because all my other apps work through SWAG but just not this one. My subdomain is setup as "minecraft" so I have that configured in my SWAG container.

Link to comment

it's not a single step of copying a config over. There are variables that have to be changed.

  • Did you do each item that I mentioned above?
  • Is the error message you're getting from a DNS error, or from the SWAG server? They look different.
  • Try following a spacedinvader how-to video that includes a SWAG setup, do all those steps with the different configuration files you've got to make sure you didn't miss anything.
  • I forgot to mention above, I also changed the Network Type to "proxynet". I'll add that in to the previous post so it's a more complete list of things to do.

 

Looks like screenshots might be helpful. I'll follow up with those.

Edited by dkerlee
Link to comment

Yep, I've made sure to change everything to match for what I need for this container. I've got many other applications running behind SWAG so I'm pretty familiar with how it works.

 

Also, I initially did follow a spaceinvaderone video when I initially setup my reverse proxy (before switching to SWAG) so just like you mentioned I have a "proxynet" network that I've assigned my containers to. I included a screenshot showing that I have my "crafty" container running on the proxynet along with the other applications I'm hosting. 

 

image.png.8d03fc3a3b5656f6bc2f26ebbb1335d2.png

 

To answer your question about the error message: it seems to be directly from SWAG as I'm not getting a DNS resolution error, it's specifically a 502 error from nginx. I've included a screenshot of that as well.

 

image.png.b9771eb79eccb1a18e22685ff104bbed.png

 

As for my config, I decided to try out your example and match it to my config:

 

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    # "minecraft" is the name I have configured for my DNS CNAME
    server_name minecraft.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        # I've changed the container name to "crafty"
        set $upstream_app crafty;
        # And also changed the "port 2" to 8001 as the default has a conflict
        set $upstream_port 8001;
        set $upstream_proto https;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_max_temp_file_size 2048m;
    }
}

 

Link to comment

Server Timezone. I'm wondering if this is a problem or issue? I'd like to fix it, so it's local to where I'm actually at: PST

 

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

 

There is a setting in the Docker for time zone, but I can't figure out what to put in there.

Container Variable: TZ, default value "Etc/UTC"

 

I tried "PST" and "-8" neither seem to affect the time zone for the server in the crafty 4 GUI

 

time crafty 4.png

Link to comment

I was able to use that parameter and it seems to work just fine when accessing the UI from it's direct IP address. I'm also in PST so I put it as "America/Los_Angeles". I'm unsure if this parameter would have any affect on the nginx config but I could definitely change it back to UTC to match what the SWAG service is probably using.

 

image.png.519d897cdf67abc3fd751383063b8c2b.png

Link to comment

You have a share just for minecraft backups?
That is a weird setup - I mean, people usually make a few basic shares (for example a share for all kinds of backups) and then make sub-category folders inside them.

To each their own, I guess. Anyway.

Also, it doesn't look like you use a front slash (start with "/"), so I guess the backups made a tree under the working directory of crafty itself (possibly).
So, start looking in /appdata/binhex-crafty-4 (and possibly deeper)...

Probably not where you want your backups (as they will stay in your cache).

 

 

Edited by NLS
Link to comment
  • 3 weeks later...

I only have one issue with Crafty and I'm not sure where to start looking to resolve it. When/If I need to restart the docker everything seems fine until I login to the dashboard. I'm always welcomed with:

 

Welcome to Crafty Controller

There are currently no servers. To get started, click create new server.

 

but before I restarted the docker image my minecraft worlds were there and running just fine, it can take from 30 minutes to hours for the worlds to repopulate the dashboard. and Auto start minecraft servers seems to fail because of this.

Link to comment
  • 2 weeks later...
On 9/12/2022 at 1:28 AM, catapultam_habeo said:

Can we get java 8 included in this image for older versions of MC?


Nevermind, it is there already, Crafty just doesn't see it as an alternative java version. Maybe that could be fixed, idk if that's a docker image issue or a crafty issue.

 

usr/lib/jvm/java-8-openjdk/jre/bin/java

 

 

If someone else had struggles with this, as I, I just got it working with the setting "Do not override" and just enter in my case:

""/usr/lib/jvm/java-8-openjdk/jre/bin/java" -Xms12000M -Xmx12000M -jar /opt/crafty/servers/3ad84b4d-4ca6-443e-8b0a-e6edeec4f292/forge-1.12.2-14.23.5.2860.jar nogui"

Into the server execution command. Then it worked.

image.png.106c1101aab28ab65ca59e1c4f3aeb5b.png

Link to comment
  • 2 weeks later...
  • 5 weeks later...

This may not be a good question, but gotta ask...  I have the vanilla binhex-minecraftserver installed and working well.  My daughter and I have a world built in it.  I later installed the binhex-crafty4 and another vanilla server under it and have built my own world, but this server is not stable at all.  Crafty drives my little CPU to 100% and runs me out of ram.

 

So , the question is how do I just make a second install of the binhex-minecraftserver along side of my first so I can move my world over and rid myself of crafty4?

Link to comment

Can someone point me toward a way to modify the default ports in the docker.compose file?  It appears that the port range that I want at install or edit must match the docker.compose file defaults otherwise it will not load. 

 

The other option would be to import my existing server running in another container, but I can't find a clear answer regarding will the import leave the old server intact.

Edited by mattw
Link to comment
On 11/22/2022 at 10:18 AM, XCrownedClownsX said:

Not sure, the modpack specifically requires 17 and nothing past it. When i try to use 18 it doesnt run. 

I am also having this problem with modpacks like ATM8, Stoneblock3, and Seaopolis2. Runs fine on my custom dockers and local machine with 17, but current version installed on this docker is 19, which crashlogs all the modpacks I have tried (all forge servers that I remember) based off java minecraft 1.18 and 1.19

Edited by darkwolf
Link to comment
On 11/22/2022 at 5:18 PM, XCrownedClownsX said:

Not sure, the modpack specifically requires 17 and nothing past it. When i try to use 18 it doesnt run. 

 

11 hours ago, darkwolf said:

I am also having this problem with modpacks like ATM8, Stoneblock3, and Seaopolis2. Runs fine on my custom dockers and local machine with 17, but current version installed on this docker is 19, which crashlogs all the modpacks I have tried (all forge servers that I remember) based off java minecraft 1.18 and 1.19

ok guys, java 17 now included, please pull down the latest image and then change the value for 'JAVA_VERSION' to '17'

  • Like 1
Link to comment
  • 2 weeks later...

Hi! I'm having trouble getting to run some modded servers, both with Fabric and Forge. I tried using JAVA_VERSION 18 instead of latest, as per the modpack instructions but I'm still unable to start them up correctly. I've tried both running it with the default java command and with the start.sh bundled with the modpack. 

Al crashes have the following final message in the Terminal:

 

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000014f3e7185aed, pid=571, tid=864
#
# JRE version: OpenJDK Runtime Environment (19.0.1+10) (build 19.0.1+10)
# Java VM: OpenJDK 64-Bit Server VM (19.0.1+10, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0xe62aed] JVM_handle_linux_signal+0x14d
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /config/crafty/servers/62d67cc8-5923-42ef-886b-98300f450631/hs_err_pid571.log
[thread 865 also had an error]
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#



I'll attach on eof the log files.

Has anyone encountered this issue and managed to fix it? 

hs_err_pid571.log

Link to comment
  • 1 month later...
  • 2 months later...

Can anyone tell me how to reset a forgotten password for the Crafty Minecraft container?  I've tried set_passwd from shell, but that doesn't do anything.

 

I should note, I am using this snapshot: binhex/arch-crafty

 

I would also like to ugprade to binhex/arch-crafty-4.  Any advice on best method?

 

Thanks!

Edited by eoh7678
  • Upvote 1
Link to comment
  • 5 months later...

How about stability? I had ... five players from various areas in US. A few from the Geyser Switch connections, a few on java connecting to my Purpur 1.20.2 server. Plugins are: DropHeads, floodgate, Geyser-Spigot, InfoHUD, spark and Updater.

 

From time to time the game will glitch out, sometimes kicking players. Maybe it's my lacking server hardware? Seems like the docker status seemed alright for CPU and MEM (I forget that command in CLI). Any suggestions on how I might make it more stable?

 

All CPU pinning options are un-checked, in Docker settings > advanced. Defaults.

 

thanks!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.