1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, UCS is now available. Get it now for FREE here
    Dismiss Notice
  3. Hi there Guest ! Are you a uploader and you are looking for a way to earn from your uploads? uploadify is a file hosting platform that provides you the possibility to earn from your download without the annoying surveys. Free 10 Gb Space!
    Dismiss Notice
  4. Hey Guest, It is hard to setup a server, that is why there is a documentation to help you here
    Dismiss Notice

IMPORTANT Documentation 2.0 For Ucs And Later

Discussion in 'Documentation' started by MetroGaming, Apr 30, 2017.

Thread Status:
Not open for further replies.
  1. #1 MetroGaming, Apr 30, 2017
    Last edited: May 4, 2017
    Official Documentation

    What is UCS (Ultrapowa Clash Server)?
    UCS is a server emulator for the famous game Clash of Clans.
    UCS allows you to host your own games for you and your friends instead of connecting to Supercell servers.
    Please note that:
    • UCS is not affiliated with Supercell.
    • UCS is not a cheating tool. Everything happening on UCS will remain private and will never synchronize to Supercell servers.

    Tables of contents:
    Host a Private Server
    1. Install and run UCS
    2. Connect to your server
    3. Edit your APK
    4. Edit server configuration
    5. Create game content
    6. SC modding
    7. Mysql
    8. Redis
    9. User privilege
    10. Gameop commands
    11. API managing
    12. Community Ressources
    13. Licence System
  2. #2 MetroGaming, Apr 30, 2017
    Last edited: May 7, 2017
    Install and run UCS

    UCS is a console application developed in C#. It requires:
    • Windows 7 x64 OS (or above)
    • Microsoft .NET Framework 4.6+
    Other configurations may work but are not supported here.

    How to install and launch UCS?
    1. Download latest version at http://www.ultrapowa.com/forum
    2. UCS does not require a system installation. Unrar the archive the folder of your choice (i.e., C:\UCS).
    3. Get your key if you need a plan
    4. Run ucs.exe in UCS folder.
    Please note that:
    UCS does not work with Linux.
  3. #3 MetroGaming, Apr 30, 2017
    Last edited: May 6, 2017
    Connect to a server

    • Any Android or iOS device.
    • I recommand using a rooted version of BlueStacks if you want to play from your computer.

    With an Android device with root:

    1. Download and install Hosts Editor
    2. Install our modded apk
    3. Add a new row: gamea.clashofclans.com <IP Address: address of the computer running UCS (example:>
    With an Android device:
    1. You will need to follow the tutorial below
    With an IOS device:
    1. Download Cydia Impactor (http://www.cydiaimpactor.com/)

    Installation (NO JAILBREAK REQUIRED):

    1. Extract and Run Cydia Impactor.
    2. Connect your iOS device to your computer.
    3. Drag IPA onto Cydia Impactor.
    4. Login to apple ID (don't worry you connect straight to apple's servers).
    5. Hit "OK" if you get any warnings, and wait.
    6. Cydia Impactor should say "Complete" and you should have the patched game on your iOS Device.
    7. Before launching the game go to Settings -> General -> Profiles & Device Managment -> Click on "Your Apple ID" -> Tap "Trust". 9. You're Done, Enjoy!
    Dominik (PM)

    Start the game:

    Ensure you meet all the requirements, then just start the game normally.
    RoyalKing2 and TerryTheBest like this.
  4. #4 MetroGaming, Apr 30, 2017
    Last edited: May 6, 2017
    Edit your APK

    1. AdvancedApkTool (here) (in tutorial AAT)
    2. Modded apk (on the release post)
    3. A DNS (no-ip etc...)
    4. -Notepad ++ (google it)

    If the apk is not signed:
    1. Run AAT
    2. Put in the folder 2-IN the apk (remove any space in the name)
    3. Write 2 and enter, select the number of your apk and enter (wait it might be long)
    4. Go in the folder 3-out, select the apk's folder, go to lib and in the 2 folders there is libg.so
    5. Edit these libg.so with notepad ++ , search for gamea.clashofclans.com,remove it and write your own DNS domain.
    6. In the main folder of your apk there is an androidmanifest.xml you can edit the process name (com.supercell.clashofclans) to your own (for dual apk)
    7. Save the files, go back to AAT, select the 3rd option, apk's number and the 4th option.
    8. In the folder 4-Done there is your new apk.

    If the apk is signed (you can't decompile the apk)

    1. Put your apk in the 4-OUT folder
    2. Open the apk with rar/7zip app
    3. Extract the libg.so from the 2 folders, edit them (Step 5)
    4. Replace the original ligb.so in the apk (put them in the correct folder or it won't work)
    5. Open AAT, select 5 and pick your apk
    Youtube tutorial available here
  5. Edit server configuration

    Server configuration is stored in config.ucs file, which is located in root folder.
    It can be opened with any text editor.
    Config parameters are:
    • startingGems: initial gem amount at player creation
    • startingGold: initial gold amount at player creation
    • startingElixir initial elixir amount at player creation
    • startingDarkElixir: initial dark elixir amount at player creation
    • startingTrophies: initial number of trophies at player creation
    • startingShieldTime: protection shield time (seconds) at player creation
    • clientVersion: required Clash of Clans version to connect to the server
    • useCustomPatch: indicates if UCS enables clients to patch with custom content
    • patchingServer: Web server used for updating client (ie. csv files)
    • maintenanceMode & time: indicates if UCS is under maintenance (players trying to connect will see the maintenance message)
    • databaseConnectionName: indicates which connection string of ucsconfig.config UCS has to use (enabling switching between mysql and redis)
    • Maxonlineplayers: settings only avaible for paid plans which sets the maximum ammount of players online
  6. #6 MetroGaming, Apr 30, 2017
    Last edited: Jun 3, 2017
    Create game content (.csv) patches

    From version 0.4.1, game content can be edited and pushed to clients.
    Content editing includes buildings, characters, heroes, missions, ... You will have to learn by yourself how to edit them (no tutorial available)
    This feature is similar to csv modding, except that every player is getting the new content designed by the server operator.
    Game content files are .csv files located in gamefiles/csv and gamefiles/logic folders.

    How to edit:
    • Open any game content file you want to edit with a text editor. Make changes and save file.
    • In tools folder, run gen_patch.bat. It will:

    1. Generate a new fingerprint.json file in gamefiles folder
    2. Create a new subfolder in patch folder

    • Upload the newly generated subfolder (inside patch folder) on a web server.

    1. Edit the patchingServer value in ucsconf.config file to point the web server.
    2. Restart UCS to apply changes.

    After gen_patch.bat is run, the new fingerprint.json file will indicate players that an update is available.
    If patch server is not set properly, or update folder not available on a web server, clients will loop on the loading screen, searching for patch data indefinitely.
    A temporary solution consists in restoring fingerprint.json to its initial content using the fingerprint.json.backup file.

    Video available here
  7. #7 MetroGaming, Apr 30, 2017
    Last edited: May 1, 2017
    Create game graphics (.sc) patches

    SC editing requires skills with graphics.
    You can find the editor here (credit barbarianland)

    Once done, you have to create a patch as for csv, upload it and update the client.
    naveen, Yaguilarro and TerryTheBest like this.
  8. Run UCS with MySql database

    UCS is running Mysql database by default.
    MySql is a better option for people running a small server

    How to configure:
    • Create a new empty MySql database for UCS
    • Import the ucsdb.sql script located in tools folder
    • In ucsconf.config, set databaseConnectionName value to "ucsdbEntities"
    • In ucs.exe.config, locate ucsdbEntities connection string. It looks like:
    <add name="ucsdbEntities"         connectionString="metadata=res://*/Database.ucsdb.csdl|res://*/Database.ucsdb.ssdl|res://*/Database.ucsdb.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;user id=root;persistsecurityinfo=True;database=ucsdb&quot;" providerName="System.Data.EntityClient" />
    Youtube tutorial available here.
  9. #9 MetroGaming, Apr 30, 2017
    Last edited: May 6, 2017
    Run UCS with Redis database


    UCS is running Mysql database by default.
    Redis is a better option for people running a big server

    How to configure:
    1. Download the Redis Installer.
    2. Install Redis to your PC.
    3. Go ahead and find the installation folder, where you have installed Redis. (Default: "C:\Program Files\Redis\")
    4. Open up files called "redis.windows.service.conf" and "redis.windows.conf" and on line 56, change "bind" to "#bind".
    5. Save the file and run the file named "redis-server.exe".
    6. In config.ucs turn on serverCaching and you're good to go.
    Video tutorial avaiable here


    You need Mysql to use Redis
  10. #10 MetroGaming, Apr 30, 2017
    Last edited: May 20, 2017
    User Privileges

    From version 0.5, UCS supports different levels of privileges for users.
    Privileges allow users to run some game operating commands, depending of their level.
    There are 6 levels of privileges (from 0 to 5):
    • 0: Standard user
    • 1: Moderator (see players id in chat, rename, kick)
    • 2: High Moderator (all preceding + ban, unban)
    • 3: Unused at the moment
    • 4: Administrator (all preceding + server shutdown, set user privileges)
    • 5: Server Owner (all preceding + can promote and demote administrators)
    By default, any player starts with standard privileges (level 0).

    Enable privilege on an account
    An editor is included in redis and mysql. Open it.
    1. Find the acount id
    2. Find the privilege columm
    3. Edit it as you wish
    4. Restart UCS to apply changes
  11. #11 MetroGaming, Apr 30, 2017
    Last edited: May 1, 2017
    GameOp Commands

    From version 0.5, UCS supports GameOp Commands.
    GameOp Commands must be written in chat and require specific privileges in order to be executed by the server.
    The commands are:
    • /ban id: permanently ban the user with playerid id (privileges level 2 required)
    • /kick id: disconnect user with playerid id (privileges level 1 required)
    • /rename id newName: rename the user with playerid id to newName (privileges level 1 required)
    • /setrank id level: set privileges of level level to user with playerid id (privileges level 4 required)
    • /shutdown: print a big red message to all connected players announcing that server is going to shutdown(privileges level 4 required)
    • /unban id: revoke ban for user with playerid id (privileges level 2 required)
    • /sysmsg message: Send message to all online player in inbox (privileges level 1 required)
    • /pm id text: Send private message to player with id with message text
    • /sysrestart : Send message to all player about server going to restart and save player to database before executing the restart (privileges level 4 required)
    • /max Give's the player max currency (privileges level 0 required)
    • /leader Gives the player clan leader (privileges level 4 required)
    • /accinfo : Gives account info
    • /status : Gives server state
  12. #12 MetroGaming, Apr 30, 2017
    Last edited: May 1, 2017
    API Managing


    With UCS, we introduced an API which gives you some information on the server's status.
    You can find on this page:

    1. Online Players
    2. In memory Players
    3. In memory Alliances
    4. Total Connection
    Editing the API
    I-IN CONFIG (config.ucs)

    1. Usewebapi : false or true to disable or enable API
    2. API Port: The Port of the WebAPI
    II- The webpage (webapi folder)
    You can edit the webpage but you can't add ressources in the folder (scripts, pictures etc...). For this use a webserver to host your files. This editing requires HTML skills

    III- Accessing the api

    To access the api, you must :
    1. Start UCS
    2. Go to localhost:88 or publicip:yourport (don't forget to change :88 if you edited the port in config)
    3. If it does not work you should check your firewall and router's settings

    The API is optimised for small servers. Any highload will result of a big use of cpu/network that may crash UCS
  13. #13 MetroGaming, Apr 30, 2017
    Last edited: May 1, 2017
    Ressources by the community


    Here you will find all the ressources by the community. If you have any PM me.

    API Templates

    • BlueTemplate by Metrog : here (UCS
    You have to upload all the ressources needed in the html file (.css/.img etc...files)
    Don't forget to update their link in index.html


    • Soon

    SC mod pack

    • Soon
    daivid2000 and TerryTheBest like this.
  14. #14 MetroGaming, May 1, 2017
    Last edited: May 4, 2017
    Licence system

    The licence system has been introduced in UCS in the perspective of introducing a limit to the abuses around big earnings with ads on big servers. The licence unlocks only more slots. All features are enabled even in the lite plan.

    How to get a key?
    1. Go to license.ultrapowa.com
    2. Click on get a free key
    3. enter your E-mail
    4. On the next page, you will see all your active keys and their status
    5. Click on request keys, it will send then to your E-mail
    6. Check your inbox (even spam)
    7. Get your activation key
    8. Open config.ucs, seach for
       <add key="LicenseKey" value="Your Activation Key; please get it here: http://license.ultrapowa.com/"/>
    9. In value="xxx" enter your key, the string should be looking like
        <add key="LicenseKey" value="5xxx11471x6x11280xxxc471989cxxda"/>
    More slots?

    If you need more slots, you have to buy a plan here. Then send a PM to eiffel with a proof and the following message:
    "Hello I'm “Name”, I've bought a “PlanName” Plan, The donation number is "Donation number" I hereby acknowledge That I have read, understand and agree to the terms of Ultrapowa and relative software “UCS” EULA and TOS
    You will get your activation key in 24~48h


    A licence is bound to a public IP (1) if you use it on another IP/computer It will disable your key.
    Check our EULA/TOS for more information.
    TerryTheBest likes this.
  15. #15 MetroGaming, May 4, 2017
    Last edited: May 6, 2017

    The best thing with UCS is that you can open your server for the world! After setuping UCS it should not be hard for you to open a new server.

    -A VPS if you want to open the server 24/7 or your personal computer
    -obviously, UCS with a plan if you have 256+ users
    -A website or a thread in our forum when the server is ready
    -A good knownledge of VPS, HTML,

    Where do I get a VPS for FREE?
    No miracle. cloud.google.com or aws.amazon.com gives a free trial but you NEED A CREDIT CARD.


    You can get there a little trial for 3 months and 300$ credits. You can get there 8GB RAM and 2 core cpu for free (3 full months).
    1. You must select windows server 2012 R2 or 2016(not linux)
    2. find firewall in settings and add rules for port 9339 (UDP/TCP)
    3. patch an APK (easier to use),
    4. use a DNS.
    5. The best thing would be to get a domain (freenoms domain) and setup a website for your users with some ads (adf.ly/shorte.st)
    6. for a better experience, you should create a custom patch to make it looking different from another private servers
    It's similar but It will take more time to setup (they will need to withdraw a few $ to check that it's not a fake credit card). There you can get 1GB+little cpu for free for 1 year. From my experience you must be very carefull, any overtaking will cost 10$ or more)

    I need some screenshots to give a details, so if you want to setup a VPS take a screenshoot at each steps and PM me a link, please! (you will have credits)
    TerryTheBest likes this.
  16. #16 MetroGaming, May 6, 2017
    Last edited by a moderator: May 6, 2017
    Edit your IPA (iOS)

    1. 7-zip
    2. Patched IPA
    3. A DNS (no-ip, etc ...)
    4. Notepad ++
    1. Open the IPA with 7-zip (DO NOT EXTRACT).
    2. In 7-zip navigate to: `Payload\Clash of Clans.app\`.
    3. Extract or drag the file named "Clash of Clans" to your desktop.
    4. Edit this file with notepad++, (serach for game.clashofclans.com and replace it with your own DNS domain.)
    5. Save the file (IMPORTANT).
    6. Drag the Edited file back to 7-zip, (When it asks you if you're sure you want to copy files select YES).
    7. Wait for 7-zip to copy all of your files and you are now done.

    Dominik (PM)
    TerryTheBest and Fredi120 like this.

    I can't connect to my server
    • You did not setup well your network
    1. Check your router's settings (
    2. Check what is your local ip (cmd --> ipconfig)
    3. Check your firewall (add a rule for ucs.exe or in emergency disable your firewall (high risk))
    4. Check your port here
    • APK/IPA
    1. You don't use our patched apk/IPA, check release's post to download it
    2. You didn't add a rule in host editor (for rooted users)
    3. Your DNS doesn't have 22-23 caracters
    4. Wrong version
    • Patching
    1. Your patch can't be downloaded, check your ftp, try to access to your patching url in your browser
    2. You made a mistake in your csv mod, try to check all the edited files
    • Banned
    1. When you clean the database, all accounts are removed so you get a message as if you are banned, you need to clean your app data in settings -->application-->yourmoddedapk

    These are the most common issues, if all these tips does not help you, open a thread in support section!
    Luca tiziani, TerryTheBest and yuvv like this.
Thread Status:
Not open for further replies.

Share This Page