
Dasrak |

At the 4th spell level, your options aren't too broad yet. Permanency is ludicrously expensive for what it is and your spells don't last long enough if you're going to be leaving your stronghold for more than a day or two. There are a couple good spells available to you that last until discharged. For spells that are within your casting capabilities, stick with stuff with permanent duration like explosive runes, fire trap, animate dead, and illusory wall. That last one can be particularly nice. If you're going to go for 5th or higher level spells you should think carefully about what you want to go for since it'll be pretty pricey.
Unless you can craft them yourself, traps are also unreasonably expensive. Get creative where at all possible. For instance, having some grunt laborers dig a hole will cost you about 1 GP (1 SP per day per laborer). Throw an illusory wall spell over it and you have an automatically-resetting pit trap for a tiny fraction of the cost. Caltrops are another cost-effective option to "trap" an area. Siege Engines are another expensive item, but the light ballista is relatively well-priced. You can get two light ballistae for the price of an arrow trap (not including cost of ammunition), so this is definitely a much better option than going with conventional traps. If you're going to splurge gold-wise, this is the place to do it.
Your best bet for general-purpose defense is to hire cheap henchmen. Money is a big consideration at your level, and a hireling costs only a few SP per day. How much it costs will depend on your GM's ruling, but on the low-end of the spectrum a 1st level warrior is just a trained hireling and costs 3 SP per day to retain. Unless your GM rules for cripplingly high wages, you should be able to retain well over a hundred. Don't under-estimate 1st level warriors. Have some alchemist fire or acid flasks on hand in the armory and they can torch monsters with poor touch AC. Even bows and crossbows en-mass can ventilate enemies of surprisingly high CR, and reach weapons will give them a nice edge if it comes to melee. Have a wizard (that's you!) in the background bringing out magic to support them, and those 1st level warriors will deal disproportionate damage before going down. Just watch out for enemy spellcasters; one well-placed fireball can really ruin your day if you rely on 1 HD hirelings.

TL314 |
Well, the campaign focus is around a keep that produces flying ships. We have multiple factions that are interested in taking the keep from us. The keep is self supporting with hirelings. Also a moat is out of the question for the moment because the flying ship shipyard is under the ground. If you need more information ask a more specific question.
As I stated before my GM dose not make spell casters use expensive material components. So for example no black onyx for creating undead.

Bacon666 |
So you need ideas to defend your stronghold from being taken by other factions, and not from being destroyed...
Golem construction (with detect spells permenent) and zone of truth sounds good to me. Have the golems "work" as butlers, and ask visitors (in the permanent zone of truth) what their purpose is, and sound an alarm / attack the intruders if they are secret agents.
A conference room where your opponent is in an antimagic field and you are not will help you in negotiations...
Any item/spell that enchants your sense motiv...
if you fear they bring catapults and wan't to destroy the keep, wands/staffs with make whole/fabricate/wall of stone etc. can help alot. (especially if some of the hirelings can use them too...)

Adamantine Dragon |

Properly securing a wizards tower will require some time and expense. In general you should investigate every possible means of creating an army that will be your primary means of defense. That can include using spells like animate undead, charm animal, creating constructs, using leadership feat for cohorts/minions, etc. There are lots of ways to build an army. I had a level 9 wizard build an army of undead, charmed animals and constructs that wiped out a full party of level 9 adventurers.
Once you have an army in place, you need to set traps and use spells like alarm and illusion to warn you of invaders and distract or mislead them.
If they gain entrance to your sanctum sanctorum you need to be clever about trapping them. Spells like "stone shape" used in conjunction with alarm are extremely powerful. My wizard waited for the alarm notification of the adventurers entering a large stone room and then used "stone shape" to seal them in the room where she then summoned monsters and fired off AoE spells from a trap door in the ceiling. It was pretty much a slaughter.

Ravingdork |

Turn it into an animated object so that it can defend itself or relocate as needed.
You and your party should be able to afford it by the time you make 8th-level.