Tripoli starts 1836 at war with the nation it was a tributary state of, the Ottoman Empire. The Ottomans were taking advantage of great disorder within Tripoli, which had revolts changing its government many times during the past few years. This war is usually the breaking of this tiny African state.
The war with the Ottomans is very winnable. Poor luck within the first few days of the attempt might doom the effort, but if you follow the following steps you have a solid chance of winning.
Step 1. Promote officers and balance the budget. I would say full taxes/tariffs and pay what you can to the clergy and military. Ultimately each game will be different depending on how your artisans perform. The rule here is simply to avoid bankruptcy by keeping an eye on your available funds and altering the budget as required.
Step 2. Move the Berbers from Ghadamis to Gharyan to join with the Arabs as they fight the two Ottoman cavalry divisions. Move the Tuareg from Ghat to Sabha. As soon as the Berbers and Arabs can retreat to Sabha, do so.
Unfortunately there is a chance (If the Ottomans roll a 9 at the start of combat) that you will lose the Arabs brigade outright before the Berbers get there. Probably best to restart if this happens. The other possibility is that if the Ottomans get two large rolls in a row and the Arabs brigade will end up with 0 soldiers in it and disappear after retreating. These are fairly uncommon, if they happen to you then you are unlucky.
The Ottomans won‘t follow, but the two cavalry brigades will be joined by two infantry brigades. Stay in Sabha with all your troops.
Step 3. On the 1st of March change the National Focus to promote soldiers. This is so that your brigades can recover.
Step 4. In early May the Ottomans will occupy Gharyan and begin moving towards your troops in Sabha. Pause (if you don‘t have it set up to when your provinces are occupied) and move your troops to Ghat and from there on to Murzuk.
Step 5. At the start of September you will be able to recruit a general. Almost any general will do as long as he isn‘t completely hopeless. You might want to save here, but honestly even a general that only gives a speed advantage is usually enough. You can just play it out. Put the general in charge of the your combined brigades.
Step 6. The Ottomans will occupy Sabha soon. When they do they will head on to Murzuk. You will move your troops to Ghat then onto Sabha. Now depending on where you feel your strength lies you will play this part differently.
If you have an attacking general move to Murzuk as soon as the Ottomans have occupied it and started moving back towards you in Sabha (This avoids the dug in bonus as you are faster and get to attack them on the move). If you have a defensive general just sit in Sabha, the enemy should come to you.
After the first fight the enemy will flee generally you should follow them. Unless perhaps they flee to south or southwest, in which case you can intercept them when they re-enter your country. If they are weak I would recommend following with only two brigades and leaving one to retake Murzuk if it was lost.
Congratulations you have beaten the first wave of Ottomans. You should be able to recruit a new general about now that hopefully offers you more options.
Step 7. Rinse and repeat step. Move your army to Sabha (you can leave one brigade taking Murzuk). I know the temptation is to go to Gharyan and retake it, but that is a death trap. You can‘t flee fast enough when the Ottomans come. As soon as you see the next wave in Gharyan moving towards you in Sabha, pause and move to Ghat and onto Murzuk. Sound familiar? This wave will either be 2 infantry and an artillery or 3 infantry. This time around you will be able to take Sabha and attack without losing Murzuk since there are no cavalry in the wave. If you still don‘t have an attacking general you can just wait in Sabha again. Congratulations on defeating wave two.
Step 8. You know the drill by now. I am just going to tell you not to be intimidated by the next wave. The wave will be either 10 infantry or 9 infantry and an artillery (depending on what the second wave was). They may turn up with 6 at first then move out of your lands. Stop moving in this case and wait for the real deal then just do the same method again and watch the sands of your desert eat them up. Usually as this army is dying of attrition the Ottomans will offer white peace, I would take it generally. Buuuut…
Special Case. The Russians declared war on the Ottomans twice in the about 25 attempts I had at testing my method. If they do, kill off the 10 unit wave and then start taking Gharyan and finally Tripoli and the Libyan Coast. The Ottomans won‘t send anything your way (in my experience) while at war with the Russians. You can make them release Wallachia or Moldavia, but not both (again in my experience). 5 prestige for 0.5 infamy is a great deal if you ask me.
Step 8 continued. If they do not offer white peace you will have to kill this wave in Murzuk like the rest and follow and destroy it or let it come back into your lands and destroy it. If you still don‘t have white peace the final wave before I guarantee they offer it will be 3 cavalry. The Ottomans will probably have a general by now so I can‘t guarantee the method working, but hopefully it will.
Final Note. I am not claiming this is the only way to win this war. Just a simple repeatable method that any player can pull off.