TServerWeb

An online tshock server manager interface. Fully manage your server from the website, anywhere.

  1. Evinagro

    Evinagro Level 0

    Joined:
    Oct 5, 2013
    Messages:
    4
    Would it be something with the SQL DB? I don't have SQLite or whatever so I don't know if its the problem.
    Also should I try
    Code:
      "StorageType": "sqlite",
      "MySqlHost": "localhost:3306",
      "MySqlDbName": "",
      "MySqlUsername": "",
      "MySqlPassword": "",
    filling in the name/username/pass?
    or does it have something to do with
    Code:
      "RestUseNewPermissionModel": true,
      "ApplicationRestTokens": {},
     
  2. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    I'm not sure if this is the right place to be asking. Try making a topic here. Sorry.
     
  3. 4rz0

    4rz0 Level 0

    Joined:
    Oct 7, 2013
    Messages:
    4
    Thanks for clarifying this.
    I'm used to how it works in Minecraft without that xD
     
  4. 4rz0

    4rz0 Level 0

    Joined:
    Oct 7, 2013
    Messages:
    4
    What permissions does the user that's used by TServerWeb need?
    The tutorial says "restapi", but I cannot find that permission in any TShock documentation.
     
  5. Scerion

    Scerion Level 4

    Joined:
    Sep 30, 2013
    Messages:
    55
    Permission for restapi is "tshock.restapi"
    However I found this wasn't enough permissions to allow access to the server. First I tried adding admin as parent group, this worked for a bit but later I was receiving authentication errors again.
    Finally gave up and just used my superadmin's account, seems to have all the permissions necessary for tserverweb to work.
     
  6. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    Yes, for a while it worked fine with just "tshock.restapi" permission, but tshock dev's changed something. Any account with superadmin has always worked the best. If you have success not using a superadmin account please let me know.
     
  7. Olink

    Olink Nyx Developer, Occasional TShock Developer
    Banned

    Joined:
    Jul 21, 2011
    Messages:
    1,397
  8. 4rz0

    4rz0 Level 0

    Joined:
    Oct 7, 2013
    Messages:
    4
    Information directly from the source, thanks!

    Now I created a group with permissions "tshock.rest.*" and added a user to it, which is used by tserverweb to login.

    Works now as intended!
     
    • Like Like x 2
  9. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    is the relaying of the "like" not working anymore?
     
  10. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    I'm glad you got it working! :)

    The like button still works, what is it doing for you?
     
  11. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    it just doesnt post a message on the server anymore that someone liked the server
     
  12. Scerion

    Scerion Level 4

    Joined:
    Sep 30, 2013
    Messages:
    55
    Confirmed.
    My old group had the tshock.restapi permission, that was working briefly, then after it stopped, I gave it the admin group as a parent, this then stopped working and was using superadmin.

    With the update in permissions, I removed admin from parent, added tshock.rest.* and all appears working with my rest user account instead of superadmin.

    Also, I tried removing the permission tshock.restapi from the group by clicking on it via the interface in tserverweb. The page updated and the permission was no longer listed, however Invalid command entered. Type /help for a list of valid commands. was listed at the top of the page. Upon going back into the group permission, the tshock.restapi permission was still listed with the group. This was still while I was using the superadmin as my rest account via tserverweb.
     
  13. Marcus101RR

    Banned

    Joined:
    Sep 16, 2012
    Messages:
    220
    Question,

    My Server Page shows "OFFLINE" image with no Users online, however, when I goto the management of the server it reports "Online (Users)" in green. What gives?

    TServerWeb Link: https://www.tserverweb.com/terraria-server/911/
     
  14. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    If this is happening, it's because the token is invalid, you probably restarted your server. Just login and view your server list and it will re-generate a token for you. When I get a chance, I will set it up so it does this automatically in the future.

    This is probably a bug, I will check it out. Thanks for sharing!

    I've fixed the status. Your server is requiring a token to pull the server status, did you do anything different to make this a requirement?
     
  15. Marcus101RR

    Banned

    Joined:
    Sep 16, 2012
    Messages:
    220

    All I did was use a user named "RestAPI" who is in "Admin" group and has a password, which I used on the TServerWeb settings. I did not use a Token, or receivea Token. I also tried using my superadmin account, but the same thing happened. Not sure what I can do, I think I have tried everything to get it to work...I am out of ideas... My settings are Enabled, the port is 7878, and the NewModule mode is on, as well as the EnableTokenEndpointAuthentication is false.

    Am I missing something?
     
  16. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    You should be able to access this: http://SERVERIP:APIPORT/status/
    When I do that on your server, it is saying a token is required not sure why it's requesting a token here.

    You can see my test server here: http://t.ghoztcraft.net:7778/status/
     
  17. Marcus101RR

    Banned

    Joined:
    Sep 16, 2012
    Messages:
    220

    It refuses to, and gives me the info I need a token... my admin account is the token...or is that wrong?
     
  18. Spoliarium

    Spoliarium Level 4

    Joined:
    Jun 21, 2013
    Messages:
    61
    did you use tshock.rest.useapi ? or tshock.rest.* ?

    I think your still using the old permission
     
  19. Marcus101RR

    Banned

    Joined:
    Sep 16, 2012
    Messages:
    220

    tshock.rest.* for admin group.

    That is what I read on the forums, i will change it to tshock.rest.useapi if you say i should?
     
  20. Scerion

    Scerion Level 4

    Joined:
    Sep 30, 2013
    Messages:
    55
    I would suggest to start from scratch, and admin privileges aren't needed.
    Do the following:
    1) Create a new group, i.e. restusers /group add restusers
    2) Create a new user in that group; /user add butler password restusers
    3) assign rest permissions to that group (nothing else needed, parent or otherwise); /group addperm restusers tshock.rest.*
    4) Goto tserverweb, edit your server entry, tshock config -> butler, password, no token, save.

    Hopefully that clears up any issues for you.
     
    • Like Like x 1